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 - virtual(8) </title> 6</head> <body> <pre> 7VIRTUAL(8) VIRTUAL(8) 8 9<b>NAME</b> 10 virtual - Postfix virtual domain mail delivery agent 11 12<b>SYNOPSIS</b> 13 <b>virtual</b> [generic Postfix daemon options] 14 15<b>DESCRIPTION</b> 16 The <a href="virtual.8.html"><b>virtual</b>(8)</a> delivery agent is designed for virtual mail hosting ser- 17 vices. Originally based on the Postfix <a href="local.8.html"><b>local</b>(8)</a> delivery agent, this 18 agent looks up recipients with map lookups of their full recipient 19 address, instead of using hard-coded unix password file lookups of the 20 address local part only. 21 22 This delivery agent only delivers mail. Other features such as mail 23 forwarding, out-of-office notifications, etc., must be configured via 24 virtual_alias maps or via similar lookup mechanisms. 25 26<b>MAILBOX LOCATION</b> 27 The mailbox location is controlled by the <b><a href="postconf.5.html#virtual_mailbox_base">virtual_mailbox_base</a></b> and <b><a href="postconf.5.html#virtual_mailbox_maps">vir</a>-</b> 28 <b><a href="postconf.5.html#virtual_mailbox_maps">tual_mailbox_maps</a></b> configuration parameters (see below). The <b><a href="postconf.5.html#virtual_mailbox_maps">vir-</b> 29 <b>tual_mailbox_maps</a></b> table is indexed by the recipient address as 30 described under TABLE SEARCH ORDER below. 31 32 The mailbox pathname is constructed as follows: 33 34 <b>$<a href="postconf.5.html#virtual_mailbox_base">virtual_mailbox_base</a>/$virtual_mailbox_maps(</b><i>recipient</i><b>)</b> 35 36 where <i>recipient</i> is the full recipient address. 37 38<b>UNIX MAILBOX FORMAT</b> 39 When the mailbox location does not end in <b>/</b>, the message is delivered 40 in UNIX mailbox format. This format stores multiple messages in one 41 textfile. 42 43 The <a href="virtual.8.html"><b>virtual</b>(8)</a> delivery agent prepends a "<b>From</b> <i>sender time</i><b>_</b><i>stamp</i>" enve- 44 lope header to each message, prepends a <b>Delivered-To:</b> message header 45 with the envelope recipient address, prepends an <b>X-Original-To:</b> header 46 with the recipient address as given to Postfix, prepends a <b>Return-Path:</b> 47 message header with the envelope sender address, prepends a > character 48 to lines beginning with "<b>From</b> ", and appends an empty line. 49 50 The mailbox is locked for exclusive access while delivery is in 51 progress. In case of problems, an attempt is made to truncate the mail- 52 box to its original length. 53 54<b>QMAIL MAILDIR FORMAT</b> 55 When the mailbox location ends in <b>/</b>, the message is delivered in qmail 56 <b>maildir</b> format. This format stores one message per file. 57 58 The <a href="virtual.8.html"><b>virtual</b>(8)</a> delivery agent prepends a <b>Delivered-To:</b> message header 59 with the final envelope recipient address, prepends an <b>X-Original-To:</b> 60 header with the recipient address as given to Postfix, and prepends a 61 <b>Return-Path:</b> message header with the envelope sender address. 62 63 By definition, <b>maildir</b> format does not require application-level file 64 locking during mail delivery or retrieval. 65 66<b>MAILBOX OWNERSHIP</b> 67 Mailbox ownership is controlled by the <b><a href="postconf.5.html#virtual_uid_maps">virtual_uid_maps</a></b> and <b><a href="postconf.5.html#virtual_gid_maps">vir</a>-</b> 68 <b><a href="postconf.5.html#virtual_gid_maps">tual_gid_maps</a></b> lookup tables, which are indexed with the full recipient 69 address. Each table provides a string with the numerical user and group 70 ID, respectively. 71 72 The <b><a href="postconf.5.html#virtual_minimum_uid">virtual_minimum_uid</a></b> parameter imposes a lower bound on numerical 73 user ID values that may be specified in any <b><a href="postconf.5.html#virtual_uid_maps">virtual_uid_maps</a></b>. 74 75<b>CASE FOLDING</b> 76 All delivery decisions are made using the full recipient address, 77 folded to lower case. See also the next section for a few exceptions 78 with optional address extensions. 79 80<b>TABLE SEARCH ORDER</b> 81 Normally, a lookup table is specified as a text file that serves as 82 input to the <a href="postmap.1.html"><b>postmap</b>(1)</a> command. The result, an indexed file in <b>dbm</b> or 83 <b>db</b> format, is used for fast searching by the mail system. 84 85 The search order is as follows. The search stops upon the first suc- 86 cessful lookup. 87 88 <b>o</b> When the recipient has an optional address extension the 89 <i>user+extension@domain.tld</i> address is looked up first. 90 91 With Postfix versions before 2.1, the optional address extension 92 is always ignored. 93 94 <b>o</b> The <i>user@domain.tld</i> address, without address extension, is 95 looked up next. 96 97 <b>o</b> Finally, the recipient <i>@domain</i> is looked up. 98 99 When the table is provided via other means such as NIS, LDAP or SQL, 100 the same lookups are done as for ordinary indexed files. 101 102 Alternatively, a table can be provided as a regular-expression map 103 where patterns are given as regular expressions. In that case, only the 104 full recipient address is given to the regular-expression map. 105 106<b>SECURITY</b> 107 The <a href="virtual.8.html"><b>virtual</b>(8)</a> delivery agent is not security sensitive, provided that 108 the lookup tables with recipient user/group ID information are ade- 109 quately protected. This program is not designed to run chrooted. 110 111 The <a href="virtual.8.html"><b>virtual</b>(8)</a> delivery agent disallows regular expression substitution 112 of $1 etc. in regular expression lookup tables, because that would open 113 a security hole. 114 115 The <a href="virtual.8.html"><b>virtual</b>(8)</a> delivery agent will silently ignore requests to use the 116 <a href="proxymap.8.html"><b>proxymap</b>(8)</a> server. Instead it will open the table directly. Before 117 Postfix version 2.2, the virtual delivery agent will terminate with a 118 fatal error. 119 120<b>STANDARDS</b> 121 <a href="http://tools.ietf.org/html/rfc822">RFC 822</a> (ARPA Internet Text Messages) 122 123<b>DIAGNOSTICS</b> 124 Mail bounces when the recipient has no mailbox or when the recipient is 125 over disk quota. In all other cases, mail for an existing recipient is 126 deferred and a warning is logged. 127 128 Problems and transactions are logged to <b>syslogd</b>(8) or <a href="postlogd.8.html"><b>postlogd</b>(8)</a>. 129 Corrupted message files are marked so that the queue manager can move 130 them to the <b>corrupt</b> queue afterwards. 131 132 Depending on the setting of the <b><a href="postconf.5.html#notify_classes">notify_classes</a></b> parameter, the postmas- 133 ter is notified of bounces and of other trouble. 134 135<b>BUGS</b> 136 This delivery agent supports address extensions in email addresses and 137 in lookup table keys, but does not propagate address extension informa- 138 tion to the result of table lookup. 139 140 Postfix should have lookup tables that can return multiple result 141 attributes. In order to avoid the inconvenience of maintaining three 142 tables, use an LDAP or MYSQL database. 143 144<b>CONFIGURATION PARAMETERS</b> 145 Changes to <a href="postconf.5.html"><b>main.cf</b></a> are picked up automatically, as <a href="virtual.8.html"><b>virtual</b>(8)</a> processes 146 run for only a limited amount of time. Use the command "<b>postfix reload</b>" 147 to speed up a change. 148 149 The text below provides only a parameter summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for 150 more details including examples. 151 152<b>MAILBOX DELIVERY CONTROLS</b> 153 <b><a href="postconf.5.html#virtual_mailbox_base">virtual_mailbox_base</a> (empty)</b> 154 A prefix that the <a href="virtual.8.html"><b>virtual</b>(8)</a> delivery agent prepends to all 155 pathname results from $<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a> table lookups. 156 157 <b><a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a> (empty)</b> 158 Optional lookup tables with all valid addresses in the domains 159 that match $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>. 160 161 <b><a href="postconf.5.html#virtual_minimum_uid">virtual_minimum_uid</a> (100)</b> 162 The minimum user ID value that the <a href="virtual.8.html"><b>virtual</b>(8)</a> delivery agent 163 accepts as a result from $<a href="postconf.5.html#virtual_uid_maps">virtual_uid_maps</a> table lookup. 164 165 <b><a href="postconf.5.html#virtual_uid_maps">virtual_uid_maps</a> (empty)</b> 166 Lookup tables with the per-recipient user ID that the <a href="virtual.8.html"><b>virtual</b>(8)</a> 167 delivery agent uses while writing to the recipient's mailbox. 168 169 <b><a href="postconf.5.html#virtual_gid_maps">virtual_gid_maps</a> (empty)</b> 170 Lookup tables with the per-recipient group ID for <a href="virtual.8.html"><b>virtual</b>(8)</a> 171 mailbox delivery. 172 173 Available in Postfix version 2.0 and later: 174 175 <b><a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a> ($<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>)</b> 176 Postfix is final destination for the specified list of domains; 177 mail is delivered via the $<a href="postconf.5.html#virtual_transport">virtual_transport</a> mail delivery 178 transport. 179 180 <b><a href="postconf.5.html#virtual_transport">virtual_transport</a> (virtual)</b> 181 The default mail delivery transport and next-hop destination for 182 final delivery to domains listed with $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>. 183 184 Available in Postfix version 2.5.3 and later: 185 186 <b><a href="postconf.5.html#strict_mailbox_ownership">strict_mailbox_ownership</a> (yes)</b> 187 Defer delivery when a mailbox file is not owned by its recipi- 188 ent. 189 190<b>LOCKING CONTROLS</b> 191 <b><a href="postconf.5.html#virtual_mailbox_lock">virtual_mailbox_lock</a> (see 'postconf -d' output)</b> 192 How to lock a UNIX-style <a href="virtual.8.html"><b>virtual</b>(8)</a> mailbox before attempting 193 delivery. 194 195 <b><a href="postconf.5.html#deliver_lock_attempts">deliver_lock_attempts</a> (20)</b> 196 The maximal number of attempts to acquire an exclusive lock on a 197 mailbox file or <a href="bounce.8.html"><b>bounce</b>(8)</a> logfile. 198 199 <b><a href="postconf.5.html#deliver_lock_delay">deliver_lock_delay</a> (1s)</b> 200 The time between attempts to acquire an exclusive lock on a 201 mailbox file or <a href="bounce.8.html"><b>bounce</b>(8)</a> logfile. 202 203 <b><a href="postconf.5.html#stale_lock_time">stale_lock_time</a> (500s)</b> 204 The time after which a stale exclusive mailbox lockfile is 205 removed. 206 207<b>RESOURCE AND RATE CONTROLS</b> 208 <b><a href="postconf.5.html#virtual_mailbox_limit">virtual_mailbox_limit</a> (51200000)</b> 209 The maximal size in bytes of an individual <a href="virtual.8.html"><b>virtual</b>(8)</a> mailbox or 210 maildir file, or zero (no limit). 211 212 Implemented in the <a href="qmgr.8.html">qmgr(8)</a> daemon: 213 214 <b><a href="postconf.5.html#virtual_destination_concurrency_limit">virtual_destination_concurrency_limit</a> ($<a href="postconf.5.html#default_destination_concurrency_limit">default_destination_concur</a>-</b> 215 <b><a href="postconf.5.html#default_destination_concurrency_limit">rency_limit</a>)</b> 216 The maximal number of parallel deliveries to the same destina- 217 tion via the virtual message delivery transport. 218 219 <b><a href="postconf.5.html#virtual_destination_recipient_limit">virtual_destination_recipient_limit</a> ($<a href="postconf.5.html#default_destination_recipient_limit">default_destination_recipi</a>-</b> 220 <b><a href="postconf.5.html#default_destination_recipient_limit">ent_limit</a>)</b> 221 The maximal number of recipients per message for the virtual 222 message delivery transport. 223 224<b>MISCELLANEOUS CONTROLS</b> 225 <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b> 226 The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con- 227 figuration files. 228 229 <b><a href="postconf.5.html#daemon_timeout">daemon_timeout</a> (18000s)</b> 230 How much time a Postfix daemon process may take to handle a 231 request before it is terminated by a built-in watchdog timer. 232 233 <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b> 234 The maximal number of digits after the decimal point when log- 235 ging sub-second delay values. 236 237 <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b> 238 The time limit for sending or receiving information over an 239 internal communication channel. 240 241 <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b> 242 The maximum amount of time that an idle Postfix daemon process 243 waits for an incoming connection before terminating voluntarily. 244 245 <b><a href="postconf.5.html#max_use">max_use</a> (100)</b> 246 The maximal number of incoming connections that a Postfix daemon 247 process will service before terminating voluntarily. 248 249 <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b> 250 The process ID of a Postfix command or daemon process. 251 252 <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b> 253 The process name of a Postfix command or daemon process. 254 255 <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b> 256 The location of the Postfix top-level queue directory. 257 258 <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b> 259 The syslog facility of Postfix logging. 260 261 <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b> 262 A prefix that is prepended to the process name in syslog 263 records, so that, for example, "smtpd" becomes "prefix/smtpd". 264 265 Available in Postfix version 3.0 and later: 266 267 <b><a href="postconf.5.html#virtual_delivery_status_filter">virtual_delivery_status_filter</a> ($<a href="postconf.5.html#default_delivery_status_filter">default_delivery_status_filter</a>)</b> 268 Optional filter for the <a href="virtual.8.html"><b>virtual</b>(8)</a> delivery agent to change the 269 delivery status code or explanatory text of successful or unsuc- 270 cessful deliveries. 271 272 Available in Postfix version 3.3 and later: 273 274 <b><a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> (yes)</b> 275 Enable support for the original recipient address after an 276 address is rewritten to a different address (for example with 277 aliasing or with canonical mapping). 278 279 <b><a href="postconf.5.html#service_name">service_name</a> (read-only)</b> 280 The <a href="master.5.html">master.cf</a> service name of a Postfix daemon process. 281 282 Available in Postfix 3.5 and later: 283 284 <b>info_log_address_format (external)</b> 285 The email address form that will be used in non-debug logging 286 (info, warning, etc.). 287 288<b>SEE ALSO</b> 289 <a href="qmgr.8.html">qmgr(8)</a>, queue manager 290 <a href="bounce.8.html">bounce(8)</a>, delivery status reports 291 <a href="postconf.5.html">postconf(5)</a>, configuration parameters 292 <a href="postlogd.8.html">postlogd(8)</a>, Postfix logging 293 syslogd(8), system logging 294 295<b>README_FILES</b> 296 Use "<b>postconf <a href="postconf.5.html#readme_directory">readme_directory</a></b>" or 297 "<b>postconf <a href="postconf.5.html#html_directory">html_directory</a></b>" to locate this information. 298 <a href="VIRTUAL_README.html">VIRTUAL_README</a>, domain hosting howto 299 300<b>LICENSE</b> 301 The Secure Mailer license must be distributed with this software. 302 303<b>HISTORY</b> 304 This delivery agent was originally based on the Postfix local delivery 305 agent. Modifications mainly consisted of removing code that either was 306 not applicable or that was not safe in this context: aliases, 307 ~user/.forward files, delivery to "|command" or to /file/name. 308 309 The <b>Delivered-To:</b> message header appears in the <b>qmail</b> system by Daniel 310 Bernstein. 311 312 The <b>maildir</b> structure appears in the <b>qmail</b> system by Daniel Bernstein. 313 314<b>AUTHOR(S)</b> 315 Wietse Venema 316 IBM T.J. Watson Research 317 P.O. Box 704 318 Yorktown Heights, NY 10598, USA 319 320 Wietse Venema 321 Google, Inc. 322 111 8th Avenue 323 New York, NY 10011, USA 324 325 Andrew McNamara 326 andrewm@connect.com.au 327 connect.com.au Pty. Ltd. 328 Level 3, 213 Miller St 329 North Sydney 2060, NSW, Australia 330 331 VIRTUAL(8) 332</pre> </body> </html> 333