ADDRESS_CLASS_README.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <title>Postfix Address Classes </title>
  6. <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
  7. </head>
  8. <body>
  9. <h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix Address Classes </h1>
  10. <hr>
  11. <h2>Introduction</h2>
  12. <p> Postfix version 2.0 introduces the concept of address classes.
  13. This is a way of grouping recipient addresses by their delivery
  14. method. The idea comes from discussions with Victor Duchovni.
  15. Although address classes introduced a few incompatibilities they
  16. also made it possible to improve the handling of <a href="VIRTUAL_README.html#canonical">hosted domains</a>
  17. and of unknown recipients. </p>
  18. <p> This document provides information on the following topics: </p>
  19. <ul>
  20. <li><a href="#wtf">What are address classes good for?</a>
  21. <li><a href="#classes">What address classes does Postfix implement?</a>
  22. <li><a href="#improvements">Improvements compared to Postfix 1.1</a>
  23. <li><a href="#incompatibility">Incompatibilities with Postfix 1.1</a>
  24. </ul>
  25. <h2><a name="wtf">What are address classes good for?</a></h2>
  26. <p> Why should you care about address classes? This is how Postfix
  27. decides what mail to accept, and how to deliver it. In other words,
  28. address classes are very important for the operation of Postfix. </p>
  29. <p> An address class is defined by three items. </p>
  30. <ul>
  31. <li> <p> The list of domains that are a member of the class: for
  32. example, all <a href="ADDRESS_CLASS_README.html#local_domain_class">local domains</a>, or all <a href="ADDRESS_CLASS_README.html#relay_domain_class">relay domains</a>. </p>
  33. <li> <p> The default delivery transport. For example, the local,
  34. virtual or relay delivery transport (delivery transports are defined
  35. in <a href="master.5.html">master.cf</a>). This helps to keep Postfix configurations simple,
  36. by avoiding the need for explicit routing information in transport
  37. maps. </p>
  38. <li> <p> The list of valid recipient addresses for that address
  39. class. The Postfix SMTP server rejects invalid recipients with
  40. "User unknown in &lt;name of address class here&gt; table". This
  41. helps to keep the Postfix queue free of undeliverable MAILER-DAEMON
  42. messages. </p>
  43. </ul>
  44. <h2><a name="classes">What address classes does Postfix implement?</a></h2>
  45. <p> Initially the list of address classes is hard coded, but this
  46. is meant to become extensible. The summary below describes the main
  47. purpose of each class, and what the relevant configuration parameters
  48. are. </p>
  49. <p> The <a name="local_domain_class">local </a> domain class. </p>
  50. <ul>
  51. <li> <p> Purpose: final delivery for traditional UNIX system accounts
  52. and traditional Sendmail-style aliases. This is typically used for
  53. the <a href="VIRTUAL_README.html#canonical">canonical domains</a> of the machine. For a discussion of the
  54. difference between <a href="VIRTUAL_README.html#canonical">canonical domains</a>, <a href="VIRTUAL_README.html#canonical">hosted domains</a> and other
  55. domains, see the <a href="VIRTUAL_README.html">VIRTUAL_README</a> file. </p>
  56. <li> <p> Domain names are listed with the <a href="postconf.5.html#mydestination">mydestination</a> parameter.
  57. This domain class also includes mail for <i>user@[ipaddress]</i>
  58. when the IP address is listed with the <a href="postconf.5.html#inet_interfaces">inet_interfaces</a> or
  59. <a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a> parameters. </p>
  60. <li> <p> Valid recipient addresses are listed with the <a href="postconf.5.html#local_recipient_maps">local_recipient_maps</a>
  61. parameter, as described in <a href="LOCAL_RECIPIENT_README.html">LOCAL_RECIPIENT_README</a>. The Postfix SMTP
  62. server rejects invalid recipients with "User unknown in local
  63. recipient table". If the <a href="postconf.5.html#local_recipient_maps">local_recipient_maps</a> parameter value is
  64. empty, then the Postfix SMTP server accepts any address in the
  65. <a href="ADDRESS_CLASS_README.html#local_domain_class">local domain</a> class. </p>
  66. <li> <p> The mail delivery transport is specified with the
  67. <a href="postconf.5.html#local_transport">local_transport</a> parameter. The default value is <b><a href="local.8.html">local</a>:$<a href="postconf.5.html#myhostname">myhostname</a></b>
  68. for delivery with the <a href="local.8.html">local(8)</a> delivery agent. </p>
  69. </ul>
  70. <p> The <a name="virtual_alias_class">virtual alias </a> domain
  71. class. </p>
  72. <ul>
  73. <li> <p> Purpose: <a href="VIRTUAL_README.html#canonical">hosted domains</a> where each recipient address is
  74. aliased to a local UNIX system account or to a remote address. A
  75. <a href="VIRTUAL_README.html#virtual_alias">virtual alias example</a> is given in the <a href="VIRTUAL_README.html">VIRTUAL_README</a> file. </p>
  76. <li> <p> Domain names are listed in <a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a>. The
  77. default value is $<a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a> for Postfix 1.1 compatibility.
  78. </p>
  79. <li> <p> Valid recipient addresses are listed with the <a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a>
  80. parameter. The Postfix SMTP server rejects invalid recipients with
  81. "User unknown in virtual alias table". The default value is
  82. $<a href="postconf.5.html#virtual_maps">virtual_maps</a> for Postfix 1.1 compatibility. </p>
  83. <li> <p> There is no mail delivery transport parameter. Every
  84. address must be aliased to some other address. </p>
  85. </ul>
  86. <p> The <a name="virtual_mailbox_class">virtual mailbox </a> domain
  87. class. </p>
  88. <ul>
  89. <li> <p> Purpose: final delivery for <a href="VIRTUAL_README.html#canonical">hosted domains</a> where each
  90. recipient address can have its own mailbox, and where users do not
  91. need to have a UNIX system account. A <a href="VIRTUAL_README.html#virtual_mailbox">virtual mailbox example</a> is
  92. given in the <a href="VIRTUAL_README.html">VIRTUAL_README</a> file. </p>
  93. <li> <p> Domain names are listed with the <a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>
  94. parameter. The default value is $<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a> for Postfix
  95. 1.1 compatibility. </p>
  96. <li> <p> Valid recipient addresses are listed with the <a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>
  97. parameter. The Postfix SMTP server rejects invalid recipients with
  98. "User unknown in virtual mailbox table". If this parameter value
  99. is empty, the Postfix SMTP server accepts all recipients for domains
  100. listed in $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>. </p>
  101. <li> <p> The mail delivery transport is specified with the
  102. <a href="postconf.5.html#virtual_transport">virtual_transport</a> parameter. The default value is <b>virtual</b>
  103. for delivery with the <a href="virtual.8.html">virtual(8)</a> delivery agent. </p>
  104. </ul>
  105. <p> The <a name="relay_domain_class">relay </a> domain class. </p>
  106. <ul>
  107. <li> <p> Purpose: mail forwarding to remote destinations that list
  108. your system as primary or backup MX host. For a discussion of the
  109. basic configuration details, see the <a href="BASIC_CONFIGURATION_README.html">BASIC_CONFIGURATION_README</a>
  110. document. For a discussion of the difference between canonical
  111. domains, <a href="VIRTUAL_README.html#canonical">hosted domains</a> and other domains, see the <a href="VIRTUAL_README.html">VIRTUAL_README</a>
  112. file. </p>
  113. <li> <p> Domain names are listed with the <a href="postconf.5.html#relay_domains">relay_domains</a> parameter.
  114. </p>
  115. <li> <p> Valid recipient addresses are listed with the <a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a>
  116. parameter. The Postfix SMTP server rejects invalid recipients with
  117. "User unknown in relay recipient table". If this parameter value
  118. is empty, the Postfix SMTP server accepts all recipients for domains
  119. listed with the <a href="postconf.5.html#relay_domains">relay_domains</a> parameter. </p>
  120. <li> <p> The mail delivery transport is specified with the
  121. <a href="postconf.5.html#relay_transport">relay_transport</a> parameter. The default value is <b>relay</b> which
  122. is a clone of the <a href="smtp.8.html">smtp(8)</a> delivery agent. </p>
  123. </ul>
  124. <p> The <a name="default_domain_class">default </a> domain class.
  125. </p>
  126. <ul>
  127. <li> <p> Purpose: mail forwarding to the Internet on behalf of
  128. authorized clients. For a discussion of the basic configuration
  129. details, see the <a href="BASIC_CONFIGURATION_README.html">BASIC_CONFIGURATION_README</a> file. For a discussion
  130. of the difference between <a href="VIRTUAL_README.html#canonical">canonical domains</a>, <a href="VIRTUAL_README.html#canonical">hosted domains</a> and
  131. other domains, see the <a href="VIRTUAL_README.html">VIRTUAL_README</a> file. </p>
  132. <li> <p> This class has no destination domain table. </p>
  133. <li> <p> This class has no valid recipient address table. </p>
  134. <li> <p> The mail delivery transport is specified with the
  135. <a href="postconf.5.html#default_transport">default_transport</a> parameter. The default value is <b>smtp</b> for
  136. delivery with the <a href="smtp.8.html">smtp(8)</a> delivery agent. </p>
  137. </ul>
  138. <h2><a name="improvements">Improvements compared to Postfix
  139. 1.1</a></h2>
  140. <p> Postfix 2.0 address classes made the following improvements
  141. possible over earlier Postfix versions: </p>
  142. <ul>
  143. <li> <p> You no longer need to specify all the <a href="virtual.8.html">virtual(8)</a> mailbox
  144. domains in the Postfix transport map. The <a href="virtual.8.html">virtual(8)</a> delivery agent
  145. has become a first-class citizen just like <a href="local.8.html">local(8)</a> or <a href="smtp.8.html">smtp(8)</a>.
  146. </p>
  147. <li> <p> On mail gateway systems, address classes provide separation
  148. of inbound mail relay traffic ($<a href="postconf.5.html#relay_transport">relay_transport</a>) from outbound
  149. traffic ($<a href="postconf.5.html#default_transport">default_transport</a>). This eliminates a problem where
  150. inbound mail deliveries could become resource starved in the presence
  151. of a high volume of outbound mail. </p>
  152. <li> <p> The SMTP server rejects unknown recipients in a more
  153. consistent manner than was possible with Postfix version 1. This
  154. is needed to keep undeliverable mail (and bounced undeliverable
  155. mail) out of the mail queue. This is controlled by the
  156. <a href="postconf.5.html#smtpd_reject_unlisted_recipient">smtpd_reject_unlisted_recipient</a> configuration parameter. </p>
  157. <li> <p> As of Postfix version 2.1, the SMTP server also rejects
  158. unknown sender addresses (i.e. addresses that it would reject as
  159. unknown recipient addresses). Sender "egress filtering" can help
  160. to slow down an email worm explosion. This is controlled by the
  161. <a href="postconf.5.html#smtpd_reject_unlisted_sender">smtpd_reject_unlisted_sender</a> configuration parameter. </p>
  162. </ul>
  163. <h2><a name="incompatibility">Incompatibilities with Postfix 1.1</a></h2>
  164. <p> Postfix 2.0 address classes introduce a few incompatible changes
  165. in documented behavior. In order to ease the transitions, new
  166. parameters have default values that are backwards compatible. </p>
  167. <ul>
  168. <li> <p> The <a href="postconf.5.html#virtual_maps">virtual_maps</a> parameter is replaced by <a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a>
  169. (for address lookups) and by <a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a> (for the names
  170. of what were formerly called "Postfix-style virtual domains"). </p>
  171. <p> For backwards compatibility with Postfix version 1.1, the new
  172. <a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a> parameter defaults to $<a href="postconf.5.html#virtual_maps">virtual_maps</a>, and the
  173. new <a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a> parameter defaults to $<a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a>.
  174. </p>
  175. <li> <p> The <a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a> parameter now has a companion
  176. parameter called <a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a> (for the names of domains
  177. served by the virtual delivery agent). The <a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>
  178. parameter is now used for address lookups only. </p>
  179. <p> For backwards compatibility with Postfix version 1.1, the new
  180. <a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a> parameter defaults to $<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>.
  181. </p>
  182. <li> <p> Introduction of the <a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a> parameter. The
  183. Postfix SMTP server can use this to block mail for relay recipients
  184. that don't exist. This list is empty by default, which means accept
  185. any recipient. </p>
  186. <li> <p> The <a href="postconf.5.html#local_recipient_maps">local_recipient_maps</a> feature is now turned on by
  187. default. The Postfix SMTP server uses this to reject mail for
  188. unknown local recipients. See the <a href="LOCAL_RECIPIENT_README.html">LOCAL_RECIPIENT_README</a> file hints
  189. and tips. </p>
  190. <li> <p> Introduction of the relay delivery transport in <a href="master.5.html">master.cf</a>.
  191. This helps to avoid mail delivery scheduling problems on inbound
  192. mail relays when there is a lot of outbound mail, but may require
  193. that you update your "<a href="postconf.5.html#defer_transports">defer_transports</a>" setting. </p>
  194. </ul>
  195. </body>
  196. </html>