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