postalias.1.html revision 1.1.1.6
1<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "http://www.w3.org/TR/html4/loose.dtd"> 3<html> <head> 4<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5<title> Postfix manual - postalias(1) </title> 6</head> <body> <pre> 7POSTALIAS(1) POSTALIAS(1) 8 9<b>NAME</b> 10 postalias - Postfix alias database maintenance 11 12<b>SYNOPSIS</b> 13 <b>postalias</b> [<b>-Nfinoprsuvw</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<b>-d</b> <i>key</i>] [<b>-q</b> <i>key</i>] 14 [<i>file</i><b>_</b><i>type</i>:]<i>file</i><b>_</b><i>name</i> ... 15 16<b>DESCRIPTION</b> 17 The <a href="postalias.1.html"><b>postalias</b>(1)</a> command creates or queries one or more Postfix alias 18 databases, or updates an existing one. The input and output file for- 19 mats are expected to be compatible with Sendmail version 8, and are 20 expected to be suitable for use as NIS alias maps. 21 22 If the result files do not exist they will be created with the same 23 group and other read permissions as their source file. 24 25 While a database update is in progress, signal delivery is postponed, 26 and an exclusive, advisory, lock is placed on the entire database, in 27 order to avoid surprises in spectator processes. 28 29 The format of Postfix alias input files is described in <a href="aliases.5.html"><b>aliases</b>(5)</a>. 30 31 By default the lookup key is mapped to lowercase to make the lookups 32 case insensitive; as of Postfix 2.3 this case folding happens only with 33 tables whose lookup keys are fixed-case strings such as <a href="DATABASE_README.html#types">btree</a>:, <a href="DATABASE_README.html#types">dbm</a>: or 34 <a href="DATABASE_README.html#types">hash</a>:. With earlier versions, the lookup key is folded even with tables 35 where a lookup field can match both upper and lower case text, such as 36 <a href="regexp_table.5.html">regexp</a>: and <a href="pcre_table.5.html">pcre</a>:. This resulted in loss of information with $<i>number</i> 37 substitutions. 38 39 Options: 40 41 <b>-c</b> <i>config</i><b>_</b><i>dir</i> 42 Read the <a href="postconf.5.html"><b>main.cf</b></a> configuration file in the named directory 43 instead of the default configuration directory. 44 45 <b>-d</b> <i>key</i> Search the specified maps for <i>key</i> and remove one entry per map. 46 The exit status is zero when the requested information was 47 found. 48 49 If a key value of <b>-</b> is specified, the program reads key values 50 from the standard input stream. The exit status is zero when at 51 least one of the requested keys was found. 52 53 <b>-f</b> Do not fold the lookup key to lower case while creating or 54 querying a table. 55 56 With Postfix version 2.3 and later, this option has no effect 57 for regular expression tables. There, case folding is controlled 58 by appending a flag to a pattern. 59 60 <b>-i</b> Incremental mode. Read entries from standard input and do not 61 truncate an existing database. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> creates 62 a new database from the entries in <i>file</i><b>_</b><i>name</i>. 63 64 <b>-N</b> Include the terminating null character that terminates lookup 65 keys and values. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> does whatever is the 66 default for the host operating system. 67 68 <b>-n</b> Don't include the terminating null character that terminates 69 lookup keys and values. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> does whatever 70 is the default for the host operating system. 71 72 <b>-o</b> Do not release root privileges when processing a non-root input 73 file. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> drops root privileges and runs as 74 the source file owner instead. 75 76 <b>-p</b> Do not inherit the file access permissions from the input file 77 when creating a new file. Instead, create a new file with 78 default access permissions (mode 0644). 79 80 <b>-q</b> <i>key</i> Search the specified maps for <i>key</i> and write the first value 81 found to the standard output stream. The exit status is zero 82 when the requested information was found. 83 84 Note: this performs a single query with the key as specified, 85 and does not make iterative queries with substrings of the key 86 as described in the <a href="aliases.5.html">aliases(5)</a> manual page. 87 88 If a key value of <b>-</b> is specified, the program reads key values 89 from the standard input stream and writes one line of <i>key: value</i> 90 output for each key that was found. The exit status is zero when 91 at least one of the requested keys was found. 92 93 <b>-r</b> When updating a table, do not complain about attempts to update 94 existing entries, and make those updates anyway. 95 96 <b>-s</b> Retrieve all database elements, and write one line of <i>key: value</i> 97 output for each element. The elements are printed in database 98 order, which is not necessarily the same as the original input 99 order. This feature is available in Postfix version 2.2 and 100 later, and is not available for all database types. 101 102 <b>-u</b> Disable UTF-8 support. UTF-8 support is enabled by default when 103 "<a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> = yes". It requires that keys and values are 104 valid UTF-8 strings. 105 106 <b>-v</b> Enable verbose logging for debugging purposes. Multiple <b>-v</b> 107 options make the software increasingly verbose. 108 109 <b>-w</b> When updating a table, do not complain about attempts to update 110 existing entries, and ignore those attempts. 111 112 Arguments: 113 114 <i>file</i><b>_</b><i>type</i> 115 The database type. To find out what types are supported, use the 116 "<b>postconf -m</b>" command. 117 118 The <a href="postalias.1.html"><b>postalias</b>(1)</a> command can query any supported file type, but 119 it can create only the following file types: 120 121 <b>btree</b> The output is a btree file, named <i>file</i><b>_</b><i>name</i><b>.db</b>. This is 122 available on systems with support for <b>db</b> databases. 123 124 <b>cdb</b> The output is one file named <i>file</i><b>_</b><i>name</i><b>.cdb</b>. This is 125 available on systems with support for <b>cdb</b> databases. 126 127 <b>dbm</b> The output consists of two files, named <i>file</i><b>_</b><i>name</i><b>.pag</b> and 128 <i>file</i><b>_</b><i>name</i><b>.dir</b>. This is available on systems with support 129 for <b>dbm</b> databases. 130 131 <b>fail</b> A table that reliably fails all requests. The lookup ta- 132 ble name is used for logging only. This table exists to 133 simplify Postfix error tests. 134 135 <b>hash</b> The output is a hashed file, named <i>file</i><b>_</b><i>name</i><b>.db</b>. This is 136 available on systems with support for <b>db</b> databases. 137 138 <b>lmdb</b> The output is a btree-based file, named <i>file</i><b>_</b><i>name</i><b>.lmdb</b>. 139 <b>lmdb</b> supports concurrent writes and reads from different 140 processes, unlike other supported file-based tables. 141 This is available on systems with support for <b>lmdb</b> data- 142 bases. 143 144 <b>sdbm</b> The output consists of two files, named <i>file</i><b>_</b><i>name</i><b>.pag</b> and 145 <i>file</i><b>_</b><i>name</i><b>.dir</b>. This is available on systems with support 146 for <b>sdbm</b> databases. 147 148 When no <i>file</i><b>_</b><i>type</i> is specified, the software uses the database 149 type specified via the <b><a href="postconf.5.html#default_database_type">default_database_type</a></b> configuration 150 parameter. The default value for this parameter depends on the 151 host environment. 152 153 <i>file</i><b>_</b><i>name</i> 154 The name of the alias database source file when creating a data- 155 base. 156 157<b>DIAGNOSTICS</b> 158 Problems are logged to the standard error stream and to <b>syslogd</b>(8) or 159 <a href="postlogd.8.html"><b>postlogd</b>(8)</a>. No output means that no problems were detected. Duplicate 160 entries are skipped and are flagged with a warning. 161 162 <a href="postalias.1.html"><b>postalias</b>(1)</a> terminates with zero exit status in case of success 163 (including successful "<b>postalias -q</b>" lookup) and terminates with 164 non-zero exit status in case of failure. 165 166<b>ENVIRONMENT</b> 167 <b>MAIL_CONFIG</b> 168 Directory with Postfix configuration files. 169 170 <b>MAIL_VERBOSE</b> 171 Enable verbose logging for debugging purposes. 172 173<b>CONFIGURATION PARAMETERS</b> 174 The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to this pro- 175 gram. 176 177 The text below provides only a parameter summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for 178 more details including examples. 179 180 <b><a href="postconf.5.html#alias_database">alias_database</a> (see 'postconf -d' output)</b> 181 The alias databases for <a href="local.8.html"><b>local</b>(8)</a> delivery that are updated with 182 "<b>newaliases</b>" or with "<b>sendmail -bi</b>". 183 184 <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b> 185 The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con- 186 figuration files. 187 188 <b><a href="postconf.5.html#berkeley_db_create_buffer_size">berkeley_db_create_buffer_size</a> (16777216)</b> 189 The per-table I/O buffer size for programs that create Berkeley 190 DB hash or btree tables. 191 192 <b><a href="postconf.5.html#berkeley_db_read_buffer_size">berkeley_db_read_buffer_size</a> (131072)</b> 193 The per-table I/O buffer size for programs that read Berkeley DB 194 hash or btree tables. 195 196 <b><a href="postconf.5.html#default_database_type">default_database_type</a> (see 'postconf -d' output)</b> 197 The default database type for use in <a href="newaliases.1.html"><b>newaliases</b>(1)</a>, <a href="postalias.1.html"><b>postalias</b>(1)</a> 198 and <a href="postmap.1.html"><b>postmap</b>(1)</a> commands. 199 200 <b><a href="postconf.5.html#import_environment">import_environment</a> (see 'postconf -d' output)</b> 201 The list of environment variables that a privileged Postfix 202 process will import from a non-Postfix parent process, or 203 name=value environment overrides. 204 205 <b><a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> (yes)</b> 206 Enable preliminary SMTPUTF8 support for the protocols described 207 in <a href="https://tools.ietf.org/html/rfc6531">RFC 6531</a>, <a href="https://tools.ietf.org/html/rfc6532">RFC 6532</a>, and <a href="https://tools.ietf.org/html/rfc6533">RFC 6533</a>. 208 209 <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b> 210 The syslog facility of Postfix logging. 211 212 <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b> 213 A prefix that is prepended to the process name in syslog 214 records, so that, for example, "smtpd" becomes "prefix/smtpd". 215 216 Available in Postfix 2.11 and later: 217 218 <b><a href="postconf.5.html#lmdb_map_size">lmdb_map_size</a> (16777216)</b> 219 The initial OpenLDAP LMDB database size limit in bytes. 220 221<b>STANDARDS</b> 222 <a href="https://tools.ietf.org/html/rfc822">RFC 822</a> (ARPA Internet Text Messages) 223 224<b>SEE ALSO</b> 225 <a href="aliases.5.html">aliases(5)</a>, format of alias database input file. 226 <a href="local.8.html">local(8)</a>, Postfix local delivery agent. 227 <a href="postconf.1.html">postconf(1)</a>, supported database types 228 <a href="postconf.5.html">postconf(5)</a>, configuration parameters 229 <a href="postmap.1.html">postmap(1)</a>, create/update/query lookup tables 230 <a href="newaliases.1.html">newaliases(1)</a>, Sendmail compatibility interface. 231 <a href="postlogd.8.html">postlogd(8)</a>, Postfix logging 232 syslogd(8), system logging 233 234<b>README FILES</b> 235 <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview 236 237<b>LICENSE</b> 238 The Secure Mailer license must be distributed with this software. 239 240<b>AUTHOR(S)</b> 241 Wietse Venema 242 IBM T.J. Watson Research 243 P.O. Box 704 244 Yorktown Heights, NY 10598, USA 245 246 Wietse Venema 247 Google, Inc. 248 111 8th Avenue 249 New York, NY 10011, USA 250 251 POSTALIAS(1) 252</pre> </body> </html> 253