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