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