virtual.8.html 17 KB

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