postalias.1.html revision 1.1.1.2
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=us-ascii"> 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>-Nfinoprsvw</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 18 Postfix alias databases, or updates an existing one. The 19 input and output file formats are expected to be compati- 20 ble with Sendmail version 8, and are expected to be suit- 21 able for the use as NIS alias maps. 22 23 If the result files do not exist they will be created with 24 the same group and other read permissions as their source 25 file. 26 27 While a database update is in progress, signal delivery is 28 postponed, and an exclusive, advisory, lock is placed on 29 the entire database, in order to avoid surprises in spec- 30 tator processes. 31 32 The format of Postfix alias input files is described in 33 <a href="aliases.5.html"><b>aliases</b>(5)</a>. 34 35 By default the lookup key is mapped to lowercase to make 36 the lookups case insensitive; as of Postfix 2.3 this case 37 folding happens only with tables whose lookup keys are 38 fixed-case strings such as btree:, dbm: or hash:. With 39 earlier versions, the lookup key is folded even with 40 tables where a lookup field can match both upper and lower 41 case text, such as <a href="regexp_table.5.html">regexp</a>: and <a href="pcre_table.5.html">pcre</a>:. This resulted in 42 loss of information with $<i>number</i> substitutions. 43 44 Options: 45 46 <b>-c</b> <i>config</i><b>_</b><i>dir</i> 47 Read the <a href="postconf.5.html"><b>main.cf</b></a> configuration file in the named 48 directory instead of the default configuration 49 directory. 50 51 <b>-d</b> <i>key</i> Search the specified maps for <i>key</i> and remove one 52 entry per map. The exit status is zero when the 53 requested information was found. 54 55 If a key value of <b>-</b> is specified, the program reads 56 key values from the standard input stream. The exit 57 status is zero when at least one of the requested 58 keys was found. 59 60 <b>-f</b> Do not fold the lookup key to lower case while cre- 61 ating or querying a table. 62 63 With Postfix version 2.3 and later, this option has 64 no effect for regular expression tables. There, 65 case folding is controlled by appending a flag to a 66 pattern. 67 68 <b>-i</b> Incremental mode. Read entries from standard input 69 and do not truncate an existing database. By 70 default, <a href="postalias.1.html"><b>postalias</b>(1)</a> creates a new database from 71 the entries in <i>file</i><b>_</b><i>name</i>. 72 73 <b>-N</b> Include the terminating null character that termi- 74 nates lookup keys and values. By default, <b>postal-</b> 75 <b>ias</b>(1) does whatever is the default for the host 76 operating system. 77 78 <b>-n</b> Don't include the terminating null character that 79 terminates lookup keys and values. By default, 80 <a href="postalias.1.html"><b>postalias</b>(1)</a> does whatever is the default for the 81 host operating system. 82 83 <b>-o</b> Do not release root privileges when processing a 84 non-root input file. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> drops 85 root privileges and runs as the source file owner 86 instead. 87 88 <b>-p</b> Do not inherit the file access permissions from the 89 input file when creating a new file. Instead, cre- 90 ate a new file with default access permissions 91 (mode 0644). 92 93 <b>-q</b> <i>key</i> Search the specified maps for <i>key</i> and write the 94 first value found to the standard output stream. 95 The exit status is zero when the requested informa- 96 tion was found. 97 98 If a key value of <b>-</b> is specified, the program reads 99 key values from the standard input stream and 100 writes one line of <i>key: value</i> output for each key 101 that was found. The exit status is zero when at 102 least one of the requested keys was found. 103 104 <b>-r</b> When updating a table, do not complain about 105 attempts to update existing entries, and make those 106 updates anyway. 107 108 <b>-s</b> Retrieve all database elements, and write one line 109 of <i>key: value</i> output for each element. The elements 110 are printed in database order, which is not neces- 111 sarily the same as the original input order. This 112 feature is available in Postfix version 2.2 and 113 later, and is not available for all database types. 114 115 <b>-v</b> Enable verbose logging for debugging purposes. Mul- 116 tiple <b>-v</b> options make the software increasingly 117 verbose. 118 119 <b>-w</b> When updating a table, do not complain about 120 attempts to update existing entries, and ignore 121 those attempts. 122 123 Arguments: 124 125 <i>file</i><b>_</b><i>type</i> 126 The database type. To find out what types are sup- 127 ported, use the "<b>postconf -m</b>" command. 128 129 The <a href="postalias.1.html"><b>postalias</b>(1)</a> command can query any supported 130 file type, but it can create only the following 131 file types: 132 133 <b>btree</b> The output is a btree file, named 134 <i>file</i><b>_</b><i>name</i><b>.db</b>. This is available on systems 135 with support for <b>db</b> databases. 136 137 <b>cdb</b> The output is one file named <i>file</i><b>_</b><i>name</i><b>.cdb</b>. 138 This is available on systems with support 139 for <b>cdb</b> databases. 140 141 <b>dbm</b> The output consists of two files, named 142 <i>file</i><b>_</b><i>name</i><b>.pag</b> and <i>file</i><b>_</b><i>name</i><b>.dir</b>. This is 143 available on systems with support for <b>dbm</b> 144 databases. 145 146 <b>hash</b> The output is a hashed file, named 147 <i>file</i><b>_</b><i>name</i><b>.db</b>. This is available on systems 148 with support for <b>db</b> databases. 149 150 <b>fail</b> A table that reliably fails all requests. 151 The lookup table name is used for logging 152 only. This table exists to simplify Postfix 153 error tests. 154 155 <b>sdbm</b> The output consists of two files, named 156 <i>file</i><b>_</b><i>name</i><b>.pag</b> and <i>file</i><b>_</b><i>name</i><b>.dir</b>. This is 157 available on systems with support for <b>sdbm</b> 158 databases. 159 160 When no <i>file</i><b>_</b><i>type</i> is specified, the software uses 161 the database type specified via the <b><a href="postconf.5.html#default_database_type">default_data</a>-</b> 162 <b><a href="postconf.5.html#default_database_type">base_type</a></b> configuration parameter. The default 163 value for this parameter depends on the host envi- 164 ronment. 165 166 <i>file</i><b>_</b><i>name</i> 167 The name of the alias database source file when 168 creating a database. 169 170<b>DIAGNOSTICS</b> 171 Problems are logged to the standard error stream and to 172 <b>syslogd</b>(8). No output means that no problems were 173 detected. Duplicate entries are skipped and are flagged 174 with a warning. 175 176 <a href="postalias.1.html"><b>postalias</b>(1)</a> terminates with zero exit status in case of 177 success (including successful "<b>postalias -q</b>" lookup) and 178 terminates with non-zero exit status in case of failure. 179 180<b>ENVIRONMENT</b> 181 <b>MAIL_CONFIG</b> 182 Directory with Postfix configuration files. 183 184 <b>MAIL_VERBOSE</b> 185 Enable verbose logging for debugging purposes. 186 187<b>CONFIGURATION PARAMETERS</b> 188 The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant 189 to this program. 190 191 The text below provides only a parameter summary. See 192 <a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including examples. 193 194 <b><a href="postconf.5.html#alias_database">alias_database</a> (see 'postconf -d' output)</b> 195 The alias databases for <a href="local.8.html"><b>local</b>(8)</a> delivery that are 196 updated with "<b>newaliases</b>" or with "<b>sendmail -bi</b>". 197 198 <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b> 199 The default location of the Postfix <a href="postconf.5.html">main.cf</a> and 200 <a href="master.5.html">master.cf</a> configuration files. 201 202 <b><a href="postconf.5.html#berkeley_db_create_buffer_size">berkeley_db_create_buffer_size</a> (16777216)</b> 203 The per-table I/O buffer size for programs that 204 create Berkeley DB hash or btree tables. 205 206 <b><a href="postconf.5.html#berkeley_db_read_buffer_size">berkeley_db_read_buffer_size</a> (131072)</b> 207 The per-table I/O buffer size for programs that 208 read Berkeley DB hash or btree tables. 209 210 <b><a href="postconf.5.html#default_database_type">default_database_type</a> (see 'postconf -d' output)</b> 211 The default database type for use in <a href="newaliases.1.html"><b>newaliases</b>(1)</a>, 212 <a href="postalias.1.html"><b>postalias</b>(1)</a> and <a href="postmap.1.html"><b>postmap</b>(1)</a> commands. 213 214 <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b> 215 The syslog facility of Postfix logging. 216 217 <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b> 218 The mail system name that is prepended to the 219 process name in syslog records, so that "smtpd" 220 becomes, for example, "postfix/smtpd". 221 222<b>STANDARDS</b> 223 <a href="http://tools.ietf.org/html/rfc822">RFC 822</a> (ARPA Internet Text Messages) 224 225<b>SEE ALSO</b> 226 <a href="aliases.5.html">aliases(5)</a>, format of alias database input file. 227 <a href="local.8.html">local(8)</a>, Postfix local delivery agent. 228 <a href="postconf.1.html">postconf(1)</a>, supported database types 229 <a href="postconf.5.html">postconf(5)</a>, configuration parameters 230 <a href="postmap.1.html">postmap(1)</a>, create/update/query lookup tables 231 <a href="newaliases.1.html">newaliases(1)</a>, Sendmail compatibility interface. 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 239 software. 240 241<b>AUTHOR(S)</b> 242 Wietse Venema 243 IBM T.J. Watson Research 244 P.O. Box 704 245 Yorktown Heights, NY 10598, USA 246 247 POSTALIAS(1) 248</pre> </body> </html> 249