autoupdate
[postfix-master.git] / postfix-master / DSN_README.html
blob32ef928afffcba349f9c820e249e1fdb9515e4d6
1 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
4 <html>
6 <head>
8 <title>Postfix DSN Support </title>
10 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
12 </head>
14 <body>
16 <h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix
17 DSN Support </h1>
19 <hr>
21 <h2>Introduction</h2>
23 <p> Postfix version 2.3 introduces support for Delivery Status
24 Notifications as described in <a href="http://tools.ietf.org/html/rfc3464">RFC 3464</a>. This gives senders control
25 over successful and failed delivery notifications. </p>
27 <p> Specifically, DSN support gives an email sender the ability to
28 specify: </p>
30 <ul>
32 <li> <p> What notifications are sent: success, failure, delay, or
33 none. Normally, Postfix informs the sender only when mail delivery
34 is delayed or when delivery fails. </p>
36 <li> <p> What content is returned in case of failure: only the
37 message headers, or the full message. </p>
39 <li> <p> An envelope ID that is returned as part of delivery status
40 notifications. This identifies the message <i>submission</i>
41 transaction, and must not be confused with the message ID, which
42 identifies the message <i>content</i>. </p>
44 </ul>
46 <p> The implementation of DSN support involves extra parameters to
47 the SMTP MAIL FROM and RCPT TO commands, as well as two Postfix
48 sendmail command line options that provide a sub-set of the functions
49 of the extra SMTP command parameters. </p>
51 <p> This document has information on the following topics: </p>
53 <ul>
55 <li> <a href="#scope">Restricting the scope of "success" notifications</a>
57 <li> <a href="#cli">Postfix sendmail command-line interface</a>
59 <li> <a href="#compat">Postfix VERP support compatibility</a>
61 </ul>
63 <h2> <a name="scope">Restricting the scope of "success" notifications</a> </h2>
65 <p> Just like reports of undeliverable mail, DSN reports of
66 <i>successful</i> delivery can give away more information about the
67 internal infrastructure than desirable. Unfortunately, disallowing
68 "success" notification requests requires disallowing other DSN
69 requests as well. The RFCs do not offer the option to negotiate
70 feature subsets. </p>
72 <p> This is not as bad as it sounds. When you turn off DSN for
73 remote inbound mail, remote senders with DSN support will still be
74 informed that their mail reached your Postfix gateway successfully;
75 they just will not get successful delivery notices from your internal
76 systems. Remote senders lose very little: they can no longer specify
77 how Postfix should report delayed or failed delivery. </p>
79 <p> Use the <a href="postconf.5.html#smtpd_discard_ehlo_keyword_address_maps">smtpd_discard_ehlo_keyword_address_maps</a> feature if you
80 wish to allow DSN requests from trusted clients but not from random
81 strangers (see below for how to turn this off for all clients):
82 </p>
84 <blockquote>
85 <pre>
86 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
87 <a href="postconf.5.html#smtpd_discard_ehlo_keyword_address_maps">smtpd_discard_ehlo_keyword_address_maps</a> =
88 <a href="cidr_table.5.html">cidr</a>:/etc/postfix/esmtp_access
90 /etc/postfix/esmtp_access:
91 # Allow DSN requests from local subnet only
92 192.168.0.0/28 silent-discard
93 0.0.0.0/0 silent-discard, dsn
94 ::/0 silent-discard, dsn
95 </pre>
96 </blockquote>
98 <p> If you want to disallow all use of DSN requests from the network,
99 use the <a href="postconf.5.html#smtpd_discard_ehlo_keywords">smtpd_discard_ehlo_keywords</a> feature: </p>
101 <blockquote>
102 <pre>
103 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
104 <a href="postconf.5.html#smtpd_discard_ehlo_keywords">smtpd_discard_ehlo_keywords</a> = silent-discard, dsn
105 </pre>
106 </blockquote>
108 <h2> <a name="cli">Postfix sendmail command-line interface</a> </h2>
110 <p> Postfix has two Sendmail-compatible command-line options for
111 DSN support. </p>
113 <ul>
115 <li> <p> The first option specifies what notifications are sent
116 for mail that is submitted via the Postfix <a href="sendmail.1.html">sendmail(1)</a> command line:
117 </p>
119 <blockquote>
120 <pre>
121 $ <b>sendmail -N success,delay,failure ...</b> (one or more of these)
122 $ <b>sendmail -N never ...</b> (or just this by itself)
123 </pre>
124 </blockquote>
126 <p> The built-in default corresponds with "delay,failure". </p>
128 <li> <p> The second option specifies an envelope ID which is reported
129 in delivery status notifications for mail that is submitted via the
130 Postfix <a href="sendmail.1.html">sendmail(1)</a> command line: </p>
132 <blockquote>
133 <pre>
134 $ <b>sendmail -V <i>envelope-id</i> ...</b>
135 </pre>
136 </blockquote>
138 <p> Note: this conflicts with VERP support in older Postfix versions,
139 as discussed in the next section. </p>
141 </ul>
143 <h2> <a name="compat">Postfix VERP support compatibility</a> </h2>
145 <p> With Postfix versions before 2.3, the <a href="sendmail.1.html">sendmail(1)</a> command uses
146 the -V command-line option to request VERP-style delivery. In order
147 to request VERP style delivery with Postfix 2.3 and later, you must
148 specify -XV instead of -V. </p>
150 <p> The Postfix 2.3 <a href="sendmail.1.html">sendmail(1)</a> command will recognize if you try
151 to use -V for VERP-style delivery. It will do the right thing and
152 will remind you of the new syntax. </p>
154 </body>
156 </html>