xref: /netbsd-src/external/ibm-public/postfix/dist/html/virtual.8.html (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
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 &gt; 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).  Corrupted  message
129       files are marked so that the queue manager can move them to the <b>corrupt</b>
130       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_destination_concurrency_limit">virtual_destination_concurrency_limit</a>     ($<a href="postconf.5.html#default_destination_concurrency_limit">default_destination_concur</a>-</b>
209       <b><a href="postconf.5.html#default_destination_concurrency_limit">rency_limit</a>)</b>
210              The maximal number of parallel deliveries to the  same  destina-
211              tion via the virtual message delivery transport.
212
213       <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>
214       <b><a href="postconf.5.html#default_destination_recipient_limit">ent_limit</a>)</b>
215              The  maximal  number  of  recipients per message for the virtual
216              message delivery transport.
217
218       <b><a href="postconf.5.html#virtual_mailbox_limit">virtual_mailbox_limit</a> (51200000)</b>
219              The maximal size in bytes of an individual <a href="virtual.8.html"><b>virtual</b>(8)</a> mailbox or
220              maildir file, or zero (no limit).
221
222<b>MISCELLANEOUS CONTROLS</b>
223       <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
224              The  default  location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
225              figuration files.
226
227       <b><a href="postconf.5.html#daemon_timeout">daemon_timeout</a> (18000s)</b>
228              How much time a Postfix daemon process  may  take  to  handle  a
229              request before it is terminated by a built-in watchdog timer.
230
231       <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
232              The  maximal  number of digits after the decimal point when log-
233              ging sub-second delay values.
234
235       <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
236              The time limit for sending  or  receiving  information  over  an
237              internal communication channel.
238
239       <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
240              The  maximum  amount of time that an idle Postfix daemon process
241              waits for an incoming connection before terminating voluntarily.
242
243       <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
244              The maximal number of incoming connections that a Postfix daemon
245              process will service before terminating voluntarily.
246
247       <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
248              The process ID of a Postfix command or daemon process.
249
250       <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
251              The process name of a Postfix command or daemon process.
252
253       <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
254              The location of the Postfix top-level queue directory.
255
256       <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
257              The syslog facility of Postfix logging.
258
259       <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
260              The mail system name that is prepended to the  process  name  in
261              syslog  records,  so  that  "smtpd" becomes, for example, "post-
262              fix/smtpd".
263
264<b>SEE ALSO</b>
265       <a href="qmgr.8.html">qmgr(8)</a>, queue manager
266       <a href="bounce.8.html">bounce(8)</a>, delivery status reports
267       <a href="postconf.5.html">postconf(5)</a>, configuration parameters
268       syslogd(8), system logging
269
270<b>README_FILES</b>
271       Use "<b>postconf <a href="postconf.5.html#readme_directory">readme_directory</a></b>" or
272       "<b>postconf <a href="postconf.5.html#html_directory">html_directory</a></b>" to locate this information.
273       <a href="VIRTUAL_README.html">VIRTUAL_README</a>, domain hosting howto
274
275<b>LICENSE</b>
276       The Secure Mailer license must be distributed with this software.
277
278<b>HISTORY</b>
279       This delivery agent was originally based on the Postfix local  delivery
280       agent.  Modifications mainly consisted of removing code that either was
281       not  applicable  or  that  was  not  safe  in  this  context:  aliases,
282       ~user/.forward files, delivery to "|command" or to /file/name.
283
284       The  <b>Delivered-To:</b> message header appears in the <b>qmail</b> system by Daniel
285       Bernstein.
286
287       The <b>maildir</b> structure appears in the <b>qmail</b> system by Daniel  Bernstein.
288
289<b>AUTHOR(S)</b>
290       Wietse Venema
291       IBM T.J. Watson Research
292       P.O. Box 704
293       Yorktown Heights, NY 10598, USA
294
295       Andrew McNamara
296       andrewm@connect.com.au
297       connect.com.au Pty. Ltd.
298       Level 3, 213 Miller St
299       North Sydney 2060, NSW, Australia
300
301                                                                    VIRTUAL(8)
302</pre> </body> </html>
303