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