150826Smdodd<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" 250826Smdodd "http://www.w3.org/TR/html4/loose.dtd"> 350826Smdodd 450826Smdodd<html> 550826Smdodd 650826Smdodd<head> 750826Smdodd 850826Smdodd<title>Postfix Address Classes </title> 950826Smdodd 1050826Smdodd<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 1150826Smdodd<link rel='stylesheet' type='text/css' href='postfix-doc.css'> 1250826Smdodd 1350826Smdodd</head> 1450826Smdodd 1550826Smdodd<body> 1650826Smdodd 1750826Smdodd<h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix Address Classes </h1> 1850826Smdodd 1950826Smdodd<hr> 2050826Smdodd 2150826Smdodd<h2>Introduction</h2> 2250826Smdodd 2350826Smdodd<p> Postfix version 2.0 introduces the concept of address classes. 2450826SmdoddThis is a way of grouping recipient addresses by their delivery 2550826Smdoddmethod. The idea comes from discussions with Victor Duchovni. 2650826SmdoddAlthough address classes introduced a few incompatibilities they 2750826Smdoddalso made it possible to improve the handling of hosted domains 28119418Sobrienand of unknown recipients. </p> 29119418Sobrien 30119418Sobrien<p> This document provides information on the following topics: </p> 3150826Smdodd 3250826Smdodd<ul> 3350826Smdodd 3450826Smdodd<li><a href="#wtf">What are address classes good for?</a> 3550826Smdodd 3650826Smdodd<li><a href="#classes">What address classes does Postfix implement?</a> 3750826Smdodd 3850826Smdodd<li><a href="#improvements">Improvements compared to Postfix 1.1</a> 3950826Smdodd 4050826Smdodd<li><a href="#incompatibility">Incompatibilities with Postfix 1.1</a> 4150826Smdodd 42117126Sscottl</ul> 43117126Sscottl 4450826Smdodd<h2><a name="wtf">What are address classes good for?</a></h2> 4550826Smdodd 4650826Smdodd<p> Why should you care about address classes? This is how Postfix 4750826Smdodddecides what mail to accept, and how to deliver it. In other words, 4850826Smdoddaddress classes are very important for the operation of Postfix. </p> 4950826Smdodd 5050826Smdodd<p> An address class is defined by three items. </p> 5150826Smdodd 5250826Smdodd<ul> 5350826Smdodd 5450826Smdodd<li> <p> The list of domains that are a member of that address 5550826Smdoddclass: for example, all local domains, or all relay domains. </p> 5650826Smdodd 5750826Smdodd<li> <p> The default delivery transport for that address class. For 58135260Sphkexample, the local, 5950826Smdoddvirtual or relay delivery transport (delivery transports are defined 6050826Smdoddin master.cf). This helps to keep Postfix configurations simple, 6150826Smdoddby avoiding the need for explicit routing information in transport 6250826Smdoddmaps. </p> 6350826Smdodd 6450826Smdodd<li> <p> The list of valid recipient addresses for that address 6550826Smdoddclass. The Postfix SMTP server rejects invalid recipients with 6650826Smdodd"User unknown in <name of address class here> table". This 6750826Smdoddhelps to keep the Postfix queue free of undeliverable MAILER-DAEMON 6850826Smdoddmessages. </p> 6950826Smdodd 7050826Smdodd</ul> 7150826Smdodd 7250826Smdodd<h2><a name="classes">What address classes does Postfix implement?</a></h2> 7350826Smdodd 7450826Smdodd<p> Initially the list of address classes is hard coded, but this 7550826Smdoddis meant to become extensible. The summary below describes the main 7650826Smdoddpurpose of each class, and what the relevant configuration parameters 7750826Smdoddare. </p> 7850826Smdodd 7950826Smdodd<p> The <a name="local_domain_class">local </a> domain class. </p> 8050826Smdodd 8150826Smdodd<ul> 8250826Smdodd 8350826Smdodd<li> <p> Purpose: final delivery for traditional UNIX system accounts 8450826Smdoddand traditional Sendmail-style aliases. This is typically used for 8550826Smdoddthe canonical domains of the machine (for example, $myhostname, 8650826Smdodd$mydomain). For a discussion of the 8750826Smdodddifference between canonical domains, hosted domains and other 8850826Smdodddomains, see the VIRTUAL_README file. </p> 8950826Smdodd 9050826Smdodd<li> <p> Domain names are listed with the mydestination parameter. 9150826SmdoddThis domain class also includes mail for <i>user@[ipaddress]</i> 9250826Smdoddwhen the IP address is listed with the inet_interfaces or 9350826Smdoddproxy_interfaces parameters. </p> 9450826Smdodd 9550826Smdodd<li> <p> Valid recipient addresses are listed with the local_recipient_maps 9650826Smdoddparameter, as described in LOCAL_RECIPIENT_README. The Postfix SMTP 9750826Smdoddserver rejects invalid recipients with "User unknown in local 9850826Smdoddrecipient table". If the local_recipient_maps parameter value is 9950826Smdoddempty, then the Postfix SMTP server accepts any address in the 10050826Smdoddlocal domain class. </p> 10150826Smdodd 10250826Smdodd<li> <p> The mail delivery transport is specified with the 10350826Smdoddlocal_transport parameter. The default value is <b>local:$myhostname</b> 10450826Smdoddfor delivery with the local(8) delivery agent. </p> 10550826Smdodd 10650826Smdodd</ul> 10750826Smdodd 10850826Smdodd<p> The <a name="virtual_alias_class">virtual alias </a> domain 10950826Smdoddclass. </p> 11050826Smdodd 11150826Smdodd<ul> 11250826Smdodd 11352050Smdodd<li> <p> Purpose: hosted domains where each recipient address is 11452050Smdoddaliased to an address in a different domain, for example, a local 11552050SmdoddUNIX system account or a remote address. A 11650826Smdoddvirtual alias example is given in the VIRTUAL_README file. </p> 11752050Smdodd 11850826Smdodd<li> <p> Domain names are listed in virtual_alias_domains. The 11950826Smdodddefault value is $virtual_alias_maps for Postfix 1.1 compatibility. 12050826Smdodd</p> 12150826Smdodd 12250826Smdodd<li> <p> Valid recipient addresses are listed with the virtual_alias_maps 12350826Smdoddparameter. The Postfix SMTP server rejects invalid recipients with 12450826Smdodd"User unknown in virtual alias table". The default value is 125127135Snjl$virtual_maps for Postfix 1.1 compatibility. </p> 12652050Smdodd 12752050Smdodd<li> <p> There is no mail delivery transport parameter. Every 12850826Smdoddaddress must be aliased to an address in some other domain. </p> 12952050Smdodd 13050826Smdodd</ul> 13152050Smdodd 13250826Smdodd<p> The <a name="virtual_mailbox_class">virtual mailbox </a> domain 13352050Smdoddclass. </p> 134127135Snjl 13552050Smdodd<ul> 13652050Smdodd 13752050Smdodd<li> <p> Purpose: final delivery for hosted domains where each 13852050Smdoddrecipient address can have its own mailbox, and where users do not 13952050Smdoddneed to have a UNIX system account. A virtual mailbox example is 14052050Smdoddgiven in the VIRTUAL_README file. </p> 141127135Snjl 14252050Smdodd<li> <p> Domain names are listed with the virtual_mailbox_domains 14352050Smdoddparameter. The default value is $virtual_mailbox_maps for Postfix 14452050Smdodd1.1 compatibility. </p> 14552050Smdodd 14652050Smdodd<li> <p> Valid recipient addresses are listed with the virtual_mailbox_maps 14752050Smdoddparameter. The Postfix SMTP server rejects invalid recipients with 14850826Smdodd"User unknown in virtual mailbox table". If this parameter value 14950826Smdoddis empty, the Postfix SMTP server accepts all recipients for domains 15050826Smdoddlisted in $virtual_mailbox_domains. </p> 15150826Smdodd 15250826Smdodd<li> <p> The mail delivery transport is specified with the 15350826Smdoddvirtual_transport parameter. The default value is <b>virtual</b> 15450826Smdoddfor delivery with the virtual(8) delivery agent. </p> 15550826Smdodd 15650826Smdodd</ul> 15750826Smdodd 15850826Smdodd<p> The <a name="relay_domain_class">relay </a> domain class. </p> 15950826Smdodd 16050826Smdodd<ul> 16150826Smdodd 16250826Smdodd<li> <p> Purpose: mail forwarding to remote destinations that list 16350826Smdoddyour system as primary or backup MX host. For a discussion of the 16450826Smdoddbasic configuration details, see the BASIC_CONFIGURATION_README 16550826Smdodddocument. For a discussion of the difference between canonical 16650826Smdodddomains, hosted domains and other domains, see the VIRTUAL_README 16750826Smdoddfile. </p> 16850826Smdodd 16950826Smdodd<li> <p> Domain names are listed with the relay_domains parameter. 17050826Smdodd</p> 17150826Smdodd 17250826Smdodd<li> <p> Valid recipient addresses are listed with the relay_recipient_maps 17350826Smdoddparameter. The Postfix SMTP server rejects invalid recipients with 17450826Smdodd"User unknown in relay recipient table". If this parameter value 17550826Smdoddis empty, the Postfix SMTP server accepts all recipients for domains 17650826Smdoddlisted with the relay_domains parameter. </p> 17750826Smdodd 17850826Smdodd<li> <p> The mail delivery transport is specified with the 17950826Smdoddrelay_transport parameter. The default value is <b>relay</b> which 18050826Smdoddis a clone of the smtp(8) delivery agent. </p> 18150826Smdodd 18250826Smdodd</ul> 18350826Smdodd 18450826Smdodd<p> The <a name="default_domain_class">default </a> domain class. 18550826Smdodd</p> 18650826Smdodd 18751675Smdodd<ul> 18850826Smdodd 18950826Smdodd<li> <p> Purpose: mail forwarding to the Internet on behalf of 19052050Smdoddauthorized clients. For a discussion of the basic configuration 19150826Smdodddetails, see the BASIC_CONFIGURATION_README file. For a discussion 19250826Smdoddof the difference between canonical domains, hosted domains and 19350826Smdoddother domains, see the VIRTUAL_README file. </p> 19450826Smdodd 19550826Smdodd<li> <p> This class has no destination domain table. </p> 19650826Smdodd 19750826Smdodd<li> <p> This class has no valid recipient address table. </p> 19850826Smdodd 19950826Smdodd<li> <p> The mail delivery transport is specified with the 20050826Smdodddefault_transport parameter. The default value is <b>smtp</b> for 20150826Smdodddelivery with the smtp(8) delivery agent. </p> 20250826Smdodd 20350826Smdodd</ul> 20450826Smdodd 20550826Smdodd<h2><a name="improvements">Improvements compared to Postfix 20650826Smdodd1.1</a></h2> 20750826Smdodd 20850826Smdodd<p> Postfix 2.0 address classes made the following improvements 20950826Smdoddpossible over earlier Postfix versions: </p> 21050826Smdodd 21150826Smdodd<ul> 21250826Smdodd 21352050Smdodd<li> <p> You no longer need to specify all the virtual(8) mailbox 21450826Smdodddomains in the Postfix transport map. The virtual(8) delivery agent 21550826Smdoddhas become a first-class citizen just like local(8) or smtp(8). 21650826Smdodd</p> 21750826Smdodd 21850826Smdodd<li> <p> On mail gateway systems, address classes provide separation 21950826Smdoddof inbound mail relay traffic ($relay_transport) from outbound 22050826Smdoddtraffic ($default_transport). This eliminates a problem where 221112782Smdoddinbound mail deliveries could become resource starved in the presence 222112782Smdoddof a high volume of outbound mail. </p> 223112782Smdodd 224112782Smdodd<li> <p> The SMTP server rejects unknown recipients in a more 225112782Smdoddconsistent manner than was possible with Postfix version 1. This 226112782Smdoddis needed to keep undeliverable mail (and bounced undeliverable 227112782Smdoddmail) out of the mail queue. This is controlled by the 228112782Smdoddsmtpd_reject_unlisted_recipient configuration parameter. </p> 229112782Smdodd 230112782Smdodd<li> <p> As of Postfix version 2.1, the SMTP server can also reject 231112782Smdoddunknown sender addresses (i.e. addresses that it would reject as 232117126Sscottlan unknown recipient addresses). Sender "egress filtering" can help 233117126Sscottlto slow down an email worm explosion. This is controlled by the 234112782Smdoddsmtpd_reject_unlisted_sender configuration parameter. </p> 23550826Smdodd 23650826Smdodd</ul> 23750826Smdodd 23850826Smdodd<h2><a name="incompatibility">Incompatibilities with Postfix 1.1</a></h2> 23950826Smdodd 24050826Smdodd<p> Postfix 2.0 address classes introduce a few incompatible changes 24150826Smdoddin documented behavior. In order to ease the transitions, new 24250826Smdoddparameters have default values that are backwards compatible. </p> 24350826Smdodd 24450826Smdodd<ul> 245112782Smdodd 246112782Smdodd<li> <p> The virtual_maps parameter is replaced by virtual_alias_maps 247112782Smdodd(for address lookups) and by virtual_alias_domains (for the names 248112782Smdoddof what were formerly called "Postfix-style virtual domains"). </p> 249112782Smdodd 250112782Smdodd<p> For backwards compatibility with Postfix version 1.1, the new 251112782Smdoddvirtual_alias_maps parameter defaults to $virtual_maps, and the 252112782Smdoddnew virtual_alias_domains parameter defaults to $virtual_alias_maps. 253112782Smdodd</p> 254112782Smdodd 255112782Smdodd<li> <p> The virtual_mailbox_maps parameter now has a companion 256112782Smdoddparameter called virtual_mailbox_domains (for the names of domains 257117126Sscottlserved by the virtual delivery agent). The virtual_mailbox_maps 258117126Sscottlparameter is now used for address lookups only. </p> 259112782Smdodd 26050826Smdodd<p> For backwards compatibility with Postfix version 1.1, the new 26150826Smdoddvirtual_mailbox_domains parameter defaults to $virtual_mailbox_maps. 26250826Smdodd</p> 26350826Smdodd 26450826Smdodd<li> <p> Introduction of the relay_recipient_maps parameter. The 26550826SmdoddPostfix SMTP server can use this to block mail for relay recipients 26650826Smdoddthat don't exist. This list is empty by default, which means accept 26750826Smdoddany recipient. </p> 26850826Smdodd 26950826Smdodd<li> <p> The local_recipient_maps feature is now turned on by 27050826Smdodddefault. The Postfix SMTP server uses this to reject mail for 27150826Smdoddunknown local recipients. See the LOCAL_RECIPIENT_README file hints 27250826Smdoddand tips. </p> 27350826Smdodd 27450826Smdodd<li> <p> Introduction of the relay delivery transport in master.cf. 27550826SmdoddThis helps to avoid mail delivery scheduling problems on inbound 27650826Smdoddmail relays when there is a lot of outbound mail, but may require 27750826Smdoddthat you update your "defer_transports" setting. </p> 27850826Smdodd 27950826Smdodd</ul> 28050826Smdodd 28150826Smdodd</body> 28250826Smdodd 28350826Smdodd</html> 28450826Smdodd