xref: /netbsd-src/external/ibm-public/postfix/dist/proto/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 hosted domains
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 local domains, or all relay domains. </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 master.cf). 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 canonical domains of the machine (for example, $myhostname,
86$mydomain).  For a discussion of the
87difference between canonical domains, hosted domains and other
88domains, see the VIRTUAL_README file. </p>
89
90<li> <p> Domain names are listed with the mydestination parameter.
91This domain class also includes mail for <i>user@[ipaddress]</i>
92when the IP address is listed with the inet_interfaces or
93proxy_interfaces parameters. </p>
94
95<li> <p> Valid recipient addresses are listed with the local_recipient_maps
96parameter, as described in LOCAL_RECIPIENT_README. The Postfix SMTP
97server rejects invalid recipients with "User unknown in local
98recipient table". If the local_recipient_maps parameter value is
99empty, then the Postfix SMTP server accepts any address in the
100local domain class. </p>
101
102<li> <p> The mail delivery transport is specified with the
103local_transport parameter. The default value is <b>local:$myhostname</b>
104for delivery with the local(8) 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: hosted domains 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
116virtual alias example is given in the VIRTUAL_README file. </p>
117
118<li> <p> Domain names are listed in virtual_alias_domains. The
119default value is $virtual_alias_maps for Postfix 1.1 compatibility.
120</p>
121
122<li> <p> Valid recipient addresses are listed with the virtual_alias_maps
123parameter. The Postfix SMTP server rejects invalid recipients with
124"User unknown in virtual alias table".  The default value is
125$virtual_maps 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 hosted domains where each
138recipient address can have its own mailbox, and where users do not
139need to have a UNIX system account.  A virtual mailbox example is
140given in the VIRTUAL_README file. </p>
141
142<li> <p> Domain names are listed with the virtual_mailbox_domains
143parameter. The default value is $virtual_mailbox_maps for Postfix
1441.1 compatibility. </p>
145
146<li> <p> Valid recipient addresses are listed with the virtual_mailbox_maps
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 $virtual_mailbox_domains.  </p>
151
152<li> <p> The mail delivery transport is specified with the
153virtual_transport parameter. The default value is <b>virtual</b>
154for delivery with the virtual(8) 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 BASIC_CONFIGURATION_README
165document.  For a discussion of the difference between canonical
166domains, hosted domains and other domains, see the VIRTUAL_README
167file. </p>
168
169<li> <p> Domain names are listed with the relay_domains parameter.
170</p>
171
172<li> <p> Valid recipient addresses are listed with the relay_recipient_maps
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 relay_domains parameter. </p>
177
178<li> <p> The mail delivery transport is specified with the
179relay_transport parameter. The default value is <b>relay</b> which
180is a clone of the smtp(8) 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 BASIC_CONFIGURATION_README file. For a discussion
192of the difference between canonical domains, hosted domains and
193other domains, see the VIRTUAL_README 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
200default_transport parameter. The default value is <b>smtp</b> for
201delivery with the smtp(8) 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 virtual(8) mailbox
214domains in the Postfix transport map. The virtual(8) delivery agent
215has become a first-class citizen just like local(8) or smtp(8).
216</p>
217
218<li> <p> On mail gateway systems, address classes provide separation
219of inbound mail relay traffic ($relay_transport) from outbound
220traffic ($default_transport). 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
228smtpd_reject_unlisted_recipient 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
234smtpd_reject_unlisted_sender 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 virtual_maps parameter is replaced by virtual_alias_maps
247(for address lookups) and by virtual_alias_domains (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
251virtual_alias_maps parameter defaults to $virtual_maps, and the
252new virtual_alias_domains parameter defaults to $virtual_alias_maps.
253</p>
254
255<li> <p> The virtual_mailbox_maps parameter now has a companion
256parameter called virtual_mailbox_domains (for the names of domains
257served by the virtual delivery agent). The virtual_mailbox_maps
258parameter is now used for address lookups only. </p>
259
260<p> For backwards compatibility with Postfix version 1.1, the new
261virtual_mailbox_domains parameter defaults to $virtual_mailbox_maps.
262</p>
263
264<li> <p> Introduction of the relay_recipient_maps 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 local_recipient_maps feature is now turned on by
270default.  The Postfix SMTP server uses this to reject mail for
271unknown local recipients. See the LOCAL_RECIPIENT_README file hints
272and tips. </p>
273
274<li> <p> Introduction of the relay delivery transport in master.cf.
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 "defer_transports" setting. </p>
278
279</ul>
280
281</body>
282
283</html>
284