postalias

Aus Foxwiki

postalias - Postfix alias database maintenance

Beschreibung

Der Befehl postalias(1) erstellt oder fragt eine oder mehrere Postfix-Alias-Datenbanken ab oder aktualisiert eine bestehende Datenbank.

  • Die Formate der Eingabe- und Ausgabedateien sollten mit Sendmail Version 8 kompatibel sein und sich für die Verwendung als NIS-Alias-Maps eignen.

Wenn die Ergebnisdateien noch nicht existieren, werden sie mit denselben Gruppen- und anderen Leseberechtigungen wie ihre Quelldatei erstellt.

Während einer Datenbankaktualisierung wird die Signalübermittlung verschoben und eine exklusive, beratende Sperre auf die gesamte Datenbank gelegt, um Überraschungen in Zuschauerprozessen zu vermeiden.

Das Format von Postfix-Alias-Eingabedateien ist in aliases(5) beschrieben.

Standardmäßig wird der Nachschlageschlüssel in Kleinbuchstaben umgewandelt, um die Groß-/Kleinschreibung zu ignorieren.

  • Seit Postfix 2.3 wird die Groß-/Kleinschreibung nur noch bei Tabellen beachtet, deren Nachschlageschlüssel Strings mit fester Groß-/Kleinschreibung sind, wie btree:, dbm: oder hash:.
  • In früheren Versionen wird der Nachschlageschlüssel auch bei Tabellen gefaltet, bei denen ein Nachschlagfeld sowohl auf Groß- als auch auf Kleinbuchstaben passen kann, wie z. B. 
  • regexp: und pcre:.
  • Dies führte zu Informationsverlusten bei $number-Substitutionen.

Aufruf

postalias [-Nfinoprsuvw] [-c config_dir] [-d key] [-q key] [file_type:]file_name ...

Optionen

Option Beschreibung
-c config_dir Read the main.cf configuration file in the named directory instead of the default configuration directory.
-d key Search the specified maps for key and remove one entry per map. The exit status is zero when the requested information was found. If a key value of - is specified, the program reads key values from the standard input stream. The exit status is zero when at least one of the requested keys was found.
-f Do not fold the lookup key to lower case while creating or querying a table. With Postfix version 2.3 and later, this option has no effect for regular expression tables. There, case folding is controlled by appending a flag to a pattern.
-i Incremental mode. Read entries from standard input and do not truncate an existing database. By default, postalias(1) creates a new database from the entries in file_name.
-N Include the terminating null character that terminates lookup keys and values. By default, postalias(1) does whatever is the default for the host operating system.
-n Don't include the terminating null character that terminates lookup keys and values. By default, postalias(1) does whatever is the default for the host operating system.
-o Do not release root privileges when processing a non-root input file. By default, postalias(1) drops root privileges and runs as the source file owner instead.
-p Do not inherit the file access permissions from the input file when creating a new file. Instead, create a new file with default access permissions (mode 0644).
-q key Search the specified maps for key and write the first value found to the standard output stream. The exit status is zero when the requested information was found. Note: this performs a single query with the key as specified, and does not make iterative queries with substrings of the key as described in the aliases(5) manual page. If a key value of - is specified, the program reads key values from the standard input stream and writes one line of key: value output for each key that was found. The exit status is zero when at least one of the requested keys was found.
-r When updating a table, do not complain about attempts to update existing entries, and make those updates anyway.
-s Retrieve all database elements, and write one line of key: value output for each element. The elements are printed in database order, which is not necessarily the same as the original input order. This feature is available in Postfix version 2.2 and later, and is not available for all database types.
-u Disable UTF-8 support. UTF-8 support is enabled by default when "smtputf8_enable = yes". It requires that keys and values are valid UTF-8 strings.
-v Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose.
-w When updating a table, do not complain about attempts to update existing entries, and ignore those attempts.

Parameter

Option Beschreibung
file_type The database type. To find out what types are supported, use the "postconf -m" command. The postalias(1) command can query any supported file type, but it can create only the following file types:
btree The output is a btree file, named file_name.db. This is available on systems with support for db databases.
cdb The output is one file named file_name.cdb. This is available on systems with support for cdb databases.
dbm The output consists of two files, named file_name.pag and file_name.dir. This is available on systems with support for dbm databases.
fail A table that reliably fails all requests. The lookup table name is used for logging only. This table exists to simplify Postfix error tests.
hash The output is a hashed file, named file_name.db. This is available on systems with support for db databases.
lmdb The output is a btree-based file, named file_name.lmdb. lmdb supports concurrent writes and reads from different processes, unlike other supported file-based tables. This is available on systems with support for lmdb databases.
sdbm The output consists of two files, named file_name.pag and file_name.dir. This is available on systems with support for sdbm databases.When no file_type is specified, the software uses the database type specified via the default_database_type configuration parameter. The default value for this parameter depends on the host environment.
file_name The name of the alias database source file when creating a database.

Umgebung

Rückgabewert

Konfiguration

Dateien

Anwendung

Sicherheit

Dokumentation

RFC

Man-Page

  1. POSTALIAS(1)

Info-Pages

Siehe auch

Links

Projekt

Weblinks