From: Wietse Venema Date: Tue, 21 Jun 2005 05:00:00 +0000 (-0500) Subject: postfix-2.3-20050621 X-Git-Tag: v2.3-RC1~73 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a05aa367cfce2ba656f72eb7d9f5917e101726d6;p=thirdparty%2Fpostfix.git postfix-2.3-20050621 --- diff --git a/postfix/.indent.pro b/postfix/.indent.pro index 984448ac3..0cdf6722e 100644 --- a/postfix/.indent.pro +++ b/postfix/.indent.pro @@ -16,6 +16,8 @@ -TBIO -TBOUNCE_INFO -TBOUNCE_LOG +-TBOUNCE_LOG_DSN_BUF +-TBOUNCE_LOG_RCPT_BUF -TBOUNCE_STAT -TCFG_PARSER -TCIDR_MATCH @@ -77,9 +79,10 @@ -TDNS_REPLY -TDNS_RR -TDOMAIN_LIST +-TDSN -TDSN_BUF -TDSN_SPLIT --TDSN_VSTRING +-TDSN_VAR -TEXPAND_ATTR -TFILE -TFORWARD_INFO @@ -153,8 +156,10 @@ -TQMGR_SCAN -TQMGR_TRANSPORT -TQMQPD_STATE +-TRCPT_BUF -TRECIPIENT -TRECIPIENT_LIST +-TRECIPIENT_VAR -TREC_TYPE_NAME -TRESOLVE_REPLY -TRESPONSE diff --git a/postfix/DSN_NOTES b/postfix/DSN_NOTES new file mode 100644 index 000000000..8e85c4b3d --- /dev/null +++ b/postfix/DSN_NOTES @@ -0,0 +1,48 @@ +Postfix DSN support implementation notes +======================================== + +In delivery status reports, Postfix now properly reports remote +LMTP/SMTP server replies with Diagnostic-Type: SMTP, with the +Diagnostic-Code: equal to the server reply, and with Remote-MTA: +equal to the name of the remote MTA. + +Of course Postfix still produces the same "informal" error descriptions +that it produced before (for example, the error text that appears +in the first section of a bounce report). + +The Postfix LMTP/SMTP clients also report locally generated SMTP-style +Diagnostic-Code: text (such as "420 conversation timed out") while +taking care NOT to present these as if they are replies from the +remote MTA (Sendmail appears to violate RFC 3464 here). + +That was the easy part. The remainder of Postfix is still somewhat +inconsistent in the way that it creates the formal Diagnostic-Type: +and Diagnostic-Code: information. + +- The queue manager attempts to produce standard SMTP Diagnostic-Type: +and Diagnostic-Code: information for errors that it detects. It +also receives error information from delivery agents and reports +that information unmodified when it decides to "temporarily suspend" +a delivery channel. + +- The "pipe to command" code in local(8) and pipe(8) produces +Diagnostic-Type: X-UNIX, and Diagnostic-Code: text that is taken +from /usr/include/sysexits.h or from the command output. This could +be morphed into SMTP-style information, by mapping a sysexits error +code to an SMTP error code, and combining that SMTP code with the +sysexits.h text or command output. The advantage of this would be +more useful Diagnostic-Code: information. + +- The code that delivers to mailbox produces Diagnostic-Type: +X-Postfix and Diagnostic-Code: text that is the same good old Postfix +error message that we are already familiar with. Typically these +are errno-style reports about locking a file or appending a file. +This information could be morphed into SMTP-style information, by +mapping an errno error code into an SMTP error code, and combining +that SMTP code with the Postfix-style text that we already have +(such as text that says unable to lock mailbox, or mailbox file +size limit exceeded). + +I'm not (yet) religious about banning X-UNIX and X-Postfix from the +formal part of a delivery status report, but all these non-standard +diagnostic codes aren't really very useful. diff --git a/postfix/HISTORY b/postfix/HISTORY index 65058fc00..37c414d4a 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -10759,10 +10759,173 @@ Apologies for any names omitted. domain name when $myhostname is not in "host.domain" form. Files: global/mail_params.[hc]. +--------- + +20050415-20050615 + + As of 20050525, DSN support does not involve new queue file + record types, so you can switch back to older Postfix + versions. Older non-production releases did introduce queue + file incompatibilty. + + DSN support is selected via the SMTP port by extra parameters + to the MAIL FROM and RCPT TO commands, and with the Postfix + sendmail command with new command-line options: -N (specify + notification options such as "never", "success", "delay" + or "failure") and -V (specify an envelope ID that identifies + the mail submission transaction). VERP support now uses + -XV instead of -V. + + The implementation piggy-backs on the trace(8) service that + was already used for "sendmail -v" (verbose delivery) and + for "sendmail -bv" (what-if) reports. You can no longer + requests these functions together with DSN support. + + All this means revision of bounce/defer/trace client + interfaces, of the bounce service, the record reading loops + in postdrop, cleanup(8) and qmgr(8), the queue manager to + delivery agent protocol, and some extra SMTP protocol + parameters in smtpd(8), lmtp(8) and smtp(8). + + New code module: global/dsn_smtp.[hc] for RFC 3461 related + information (but this may still change). + + Feature: "sendmail -G" is no longer a no-op. Message headers + are treated as if the message has a remote origin. Files: + sendmail/sendmail.c, postdrop/postdrop.c. + + Feature: automatic BCC senders are now created as if they + were received with NOTIFY=NEVER, in case it helps. File: + cleanup/cleanup_addr.c + + Compatibility: with large bounces, send message headers + only, instead of truncating MIME messages in the middle. + +20050517 + + Bugfix: in a DSN report, the original recipient should not + be xtext encoded. File: bounce/bounce_notify_util.c. + +20050523 + + Bugfix: mymalloc() panic with mistyped server host list. + File: global/dict_pgsql.c. + +20050525 + + Feature: specify delay_warning_time=1 to get immediate + notification of delay. File: qmgr/qmgr_active.c. + +20050526 + + Reset the Postfix original recipient when delivering to + mailing list. + +20050601 + + Modified the master backgrounding procedure to not abort + when the master is already a process group leader. This + happens when people bypass or modify the official Postfix + start-up procedure. Jacek Konieczny. File: master/master.c. + +20050602 + + Sanity check: don't report "address in use" when some Postfix + socket is a directory. File: util/unix_listen.c. + +20050613 + + Now that the over-all structure of the code is proving + itself, interfaces can be cleaned up. This means nicer names + for variables, functions and data structures, and dedicated + read/write routines for recipient and DSN information. + These remove a lot of clutter from the bounce client and + server code. Files: dsn_print.c dsb_scan.c, rcpt_print.c, + rcpt_buf.c. + + For Sendmail compatibility, the Postfix sendmail -V option + no longer controls VERP usage, but is used to specify the + DSN envelope ID. In order to provide a smooth transition, + backwards compatibility code recognizes when -V is being + used for VERP control. It will do the right thing, and + warns the user to use -XV instead. File: sendmail/sendmail.c. + +20050614 + + The cleanup server writes bounce (delivery failure) and + trace (success) records, but it no longer requests sender + notification. That is now handled by the queue manager. + The reason is that the cleanup server must be able to abort + a request including its bounce and trace logfiles, so it + must not take actions that can't be undone. + +20050615 + + Cleanup: the SMTP client now sends QUIT when the initial + HELO handshake fails. it still doesn't send QUIT when the + server greets with a [45]XX code, as that is handled in the + connection management code before a session context exists. + File: smtp/smtp_connect.c. + + Cleanup: made the quote_821_local() routine "const" clean. + File: global/quote_821_local.[hc]. + +20050616 + + Bugfix: missing or mis-placed va_end() macros, found in + Postfix 2.3 code review. Files: util/netstring.c, + util/myaddrinfo.c, util/attr_clnt.c, util/vstream.c. + + + Bugfix: the SMTP server now separates the message size check + from the queue space check, so that the size check can be + done before an SMTPD proxy filter. Files: smtpd/smtpd.c, + smtpd/smtpd_check.c. + +20050617 + + Postdrop didn't recognize the new recipient attributes. + File: postdrop/postdrop.c. + + Feature: configurable MAILER-DAEMON replacement for the + null sender address that is used by the pipe(8) delivery + agent on the command line and in message headers. Command-line + address quoting is disabled when the replacement is empty. + File: pipe/pipe.c. + +20050618 + + With virtual aliasing enabled, Postfix would always report + successful alias expansion, even when no alias was expanded. + File: cleanup/cleanup_out_recipient.c. + +20050621 + + Portability: file descriptor passing is available for Tru64 + UNIX, but not for AIX4 and IRIX6. Albert Chin. File: + util/sys_defs.h. + Open problems: - Feature: need "soft-bounce before fall-back relay" for - SOHO type operations. + Laptop friendliness: make the qmgr remember when the next + deferred queue scan needs to be done, and have the pickup + server stat() the maildrop directory before searching it. + + Mapping from errno to diagnostic text. Or do we just slap + an SMTP code in front of what is now reported as X-Postfix. + Or do we punt the issue and issue X-Postfix for all errors + except SMTP? + + Implement smtp_greet() routine to distinguish between reject + before versus after sending HELO/EHLO; this is needed to + eliminate the hack that uses one character lookahead to + find out if the server wants to talk to us. + + Low: replace_sender/replace_recipient actions in access maps? + + Feature: need "soft-bounce before fall-back relay" for SOHO + type operations, so they can send direct mail without having + to route everything through a provider. Med: disable header address rewriting after XCLIENT? Introduce a better concept of original submission? diff --git a/postfix/README_FILES/AAAREADME b/postfix/README_FILES/AAAREADME index b3e9c9d4c..7ae0c4f8b 100644 --- a/postfix/README_FILES/AAAREADME +++ b/postfix/README_FILES/AAAREADME @@ -70,6 +70,7 @@ OOtthheerr ttooppiiccss * LOCAL_RECIPIENT_README: Rejecting Unknown Local Recipients * ADDRESS_CLASS_README: Address Classes * CONNECTION_CACHE_README: Connection cache howto + * DSN_README: Postfix DSN support * PACKAGE_README: Guidelines for Package Builders * SCHEDULER_README: Queue Scheduler * XCLIENT_README: XCLIENT Command diff --git a/postfix/README_FILES/CDB_README b/postfix/README_FILES/CDB_README index 7d0e36b12..8c32ee4dd 100644 --- a/postfix/README_FILES/CDB_README +++ b/postfix/README_FILES/CDB_README @@ -53,6 +53,6 @@ After postfix has been built with cdb support, you can use "cdb" tables wherever you can use read-only "hash", "btree" or "dbm" tables. However, the "ppoossttmmaapp --ii" (incremental record insertion) and "ppoossttmmaapp --dd" (incremental record deletion) command-line options are not available. For the same reason -the "cdb" map type cannot be used to store the volatile address verification +the "cdb" map type cannot be used to store the persistent address verification cache for the verify(8) service. diff --git a/postfix/README_FILES/DSN_README b/postfix/README_FILES/DSN_README new file mode 100644 index 000000000..e7414a088 --- /dev/null +++ b/postfix/README_FILES/DSN_README @@ -0,0 +1,94 @@ +PPoossttffiixx DDSSNN SSuuppppoorrtt + +------------------------------------------------------------------------------- + +IInnttrroodduuccttiioonn + +Postfix version 2.3 introduces support for Delivery Status Notifications as +described in RFC 3464. This gives senders control over successful and failed +delivery notifications. + +Specifically, DSN support gives an email sender the ability to specify: + + * What notifications are sent: success, failure, delay, or none. + + * What content is returned in case of failure: only the message headers, or + the full message. + + * An envelope ID that is returned as part of delivery status notifications. + This identifies the message submission transaction, and must not be + confused with the message ID, which identifies the message content. + +The implementation of DSN support involves extra parameters to the SMTP MAIL +FROM and RCPT TO commands, as well as new Postfix sendmail command line options +that provide a sub-set of the functions of the extra SMTP command parameters. + +This document has information on the following topics: + + * Restricting the scope of "success" notifications + * Postfix sendmail command-line interface + * Postfix VERP support compatibility + +RReessttrriiccttiinngg tthhee ssccooppee ooff ""ssuucccceessss"" nnoottiiffiiccaattiioonnss + +Just like reports of undeliverable mail, DSN reports of successful delivery can +give away more information about the internal infrastructure than desirable. +Unfortunately, disallowing "success" notification requests requires disallowing +other DSN requests as well. The RFCs do not offer the option to negotiate +feature subsets. + +This is not as bad as it sounds. Remote senders with DSN support will still be +informed that their mail reached your Postfix gateway successfully; they just +will not get successful delivery notices from your internal systems. + +Use the smtpd_discard_ehlo_keyword_address_maps feature if you wish to allow +DSN requests from trusted clients but not from random strangers (see below for +how to turn this off for all clients): + + /etc/postfix/main.cf: + smtpd_discard_ehlo_keyword_address_maps = + cidr:/etc/postfix/esmtp_access + + /etc/postfix/esmtp_access: + # Allow DSN requests from local subnet only + 192.168.0.0/28 silent-discard + 0.0.0.0/0 silent-discard, dsn + ::/0 silent-discard, dsn + +If you want to disallow all use of DSN requests from the network, use the +smtpd_discard_ehlo_keywords feature: + + /etc/postfix/main.cf: + smtpd_discard_ehlo_keywords = silent-discard, dsn + +PPoossttffiixx sseennddmmaaiill ccoommmmaanndd--lliinnee iinntteerrffaaccee + +Postfix has two Sendmail-compatible command-line options for DSN support. + + * The first option specifies what notifications are sent for mail that is + submitted via the Postfix sendmail(1) command line: + + $ sseennddmmaaiill --NN ssuucccceessss,,ddeellaayy,,ffaaiilluurree ...... (one or more of these) + $ sseennddmmaaiill --NN nneevveerr ...... (or just this by itself) + + The built-in default corresponds with "delay,failure". + + * The second option specifies an envelope ID which is reported in delivery + status notifications for mail that is submitted via the Postfix sendmail(1) + command line: + + $ sseennddmmaaiill --VV eennvveellooppee--iidd ...... + + Note: this conflicts with VERP support in older Postfix versions, as + discussed in the next section. + +PPoossttffiixx VVEERRPP ssuuppppoorrtt ccoommppaattiibbiilliittyy + +With Postfix versions before 2.3, the sendmail(1) commands uses the -V command- +line option to request VERP-style delivery. In order to request VERP style +delivery with Postfix 2.3 and later, you must specify -XV instead of -V. + +The Postfix 2.3 sendmail(1) command will recognize if you try to use -V for +VERP-style delivery. It will do the right thing and will remind you of the new +syntax. + diff --git a/postfix/README_FILES/FILTER_README b/postfix/README_FILES/FILTER_README index ed4a84dc0..7b0245bb5 100644 --- a/postfix/README_FILES/FILTER_README +++ b/postfix/README_FILES/FILTER_README @@ -98,9 +98,9 @@ The content filter can be a simple shell script like this: 3 # Simple shell-based filter. It is meant to be invoked as follows: 4 # /path/to/script -f sender recipients... 5 - 6 # Localize these. + 6 # Localize these. The -G option does nothing before Postfix 2.3. 7 INSPECT_DIR=/var/spool/filter - 8 SENDMAIL="/usr/sbin/sendmail -i" + 8 SENDMAIL="/usr/sbin/sendmail -G -i" 9 10 # Exit codes from 11 EX_TEMPFAIL=75 @@ -126,6 +126,12 @@ The content filter can be a simple shell script like this: Notes: + * Line 8: The -G option does nothing before Postfix 2.3, otherwise it + disables address rewriting of message headers. + + * Line 8: The -i option says don't stop reading input when a line contains + "." only. + * Line 21: The idea is to first capture the message to file and then run the content through a third-party content filter program. diff --git a/postfix/README_FILES/RELEASE_NOTES b/postfix/README_FILES/RELEASE_NOTES deleted file mode 120000 index 577eefe81..000000000 --- a/postfix/README_FILES/RELEASE_NOTES +++ /dev/null @@ -1 +0,0 @@ -../RELEASE_NOTES \ No newline at end of file diff --git a/postfix/README_FILES/RELEASE_NOTES b/postfix/README_FILES/RELEASE_NOTES new file mode 100644 index 000000000..ef08d6de5 --- /dev/null +++ b/postfix/README_FILES/RELEASE_NOTES @@ -0,0 +1,113 @@ +The stable Postfix release is called postfix-2.2.x where 2=major +release number, 2=minor release number, x=patchlevel. The stable +release never changes except for patches that address bugs or +emergencies. Patches change the patchlevel and the release date. + +New features are developed in snapshot releases. These are called +postfix-2.3-yyyymmdd where yyyymmdd is the release date (yyyy=year, +mm=month, dd=day). Patches are never issued for snapshot releases; +instead, a new snapshot is released. + +The mail_release_date configuration parameter (format: yyyymmdd) +specifies the release date of a stable release or snapshot release. + +Incompatibility with Postfix 2.1 and earlier +============================================ + +If you upgrade from Postfix 2.1 or earlier, read RELEASE_NOTES-2.2 +before proceeding. + +Major changes with snapshot 20050510 +==================================== + +This release improves usability of DSN (enhanced status codes) in +Postfix access tables, RBL reply templates and in transport maps +that use the error(8) delivery agent. + +- When the SMTP server rejects a sender address, it transforms a + recipient DSN status (e.g., 4.1.1-4.1.6) into the corresponding + sender DSN status, and vice versa. + +- When the SMTP server rejects non-address information (such as the + HELO command parameter or the client hostname/address), it + transforms a sender or recipient DSN status into a generic + non-address DSN status (e.g., 4.0.0). + +These transformations are needed when the same access table or RBL +reply template are used for client, helo, sender, or recipient +restrictions; or when the same error(8) mailer information is used +for both senders and recipients. + +Incompatibility with snapshot 20050503 +====================================== + +The format of some "warning:" messages in the maillog has changed +so that they are easier to sort: + +- The logging now talks about "access table", instead of using three +different expressions "access table", "access map" and "SMTPD access +map" for the same thing. + +- "non-SMTP command" is now logged BEFORE the client name/address +and the offending client input, instead of at the end. + +Major change with snapshot 20050427+DSN +======================================= + +This is experimental DSN support added to snapshot 20050427. The +code is not for production purposes; it is not fully tested, some +names and interfaces are still rough around the edges, and it does +not update the oqmgr so you have to use qmgr instead. Some +implementation notes and open issues are described in the +DSN_SUPPORT_README file (top-level directory). + +Incompatibility with snapshot 20050329 +====================================== + +If you use TLS, you need to execute "postfix reload" because the +TLS manager protocol has changed. + +Incompatibility with snapshot 20050328 +====================================== + +The logging format has changed. Postfix delivery agents now log the +RFC 3463 enhanced status code as "dsn=x.y.z" where y and z can be +up to three digits each. See the file pfloggsum-dsn-patch for an +update to the pfloggsum script. + +After you upgrade from Postfix 2.2 or 2.3 you need to execute +"postfix reload", otherwise you will keep running the old Postfix +queue manager, which gives no special treatment to the enhanced +status codes that it receives from Postfix delivery agents. + +Major changes with snapshot 20050328 +==================================== + +This release introduces support for RFC 3463 enhanced status codes. +For example, status code 5.1.1 means "recipient unknown". Postfix +recognizes enhanced status codes in remote server replies, generates +enhanced status codes while handling email, and reports enhanced +status codes in non-delivery notifications. This improves the user +interaction with mail clients that hide the text of error messages +from users. + +You can, but don't have to, specify RFC 3463 enhanced status codes +in the output from commands that receive mail from a pipe. If a +command terminates with non-zero exit status, and an enhanced status +code is present at the beginning of the command output, then that +status code takes precedence over the non-zero exit status. + +You can, but don't have to, specify RFC 3463 enhanced status codes +in Postfix access maps, header/body_checks REJECT actions, or in +RBL replies. For example: + + REJECT 5.7.1 You can't go here from there + +The status 5.7.1 means "no authorization, message refused", and is +the default for access maps, header/body_checks REJECT actions, and +for RBL replies. + +If you specify your own enhanced status code, the Postfix SMTP +server will automatically change a leading '5' digit (hard error) +into '4' where appropriate. This is needed, for example, with +soft_bounce=yes. diff --git a/postfix/README_FILES/VERP_README b/postfix/README_FILES/VERP_README index 4d57419f2..94ce80b18 100644 --- a/postfix/README_FILES/VERP_README +++ b/postfix/README_FILES/VERP_README @@ -67,6 +67,15 @@ In order to make VERP useful with majordomo etc. mailing lists, you would configure the list manager to submit mail according to one of the following two forms: +Postfix 2.3 and later: + + % sendmail -XV -f owner-listname other-arguments... + + % sendmail -XV+= -f owner-listname other-arguments... + +Postfix 2.2 and earlier (Postfix 2.3 understands the old syntax for backwards +compatibility, but will log a warning that reminds you of the new syntax): + % sendmail -V -f owner-listname other-arguments... % sendmail -V+= -f owner-listname other-arguments... @@ -134,6 +143,15 @@ VVEERRPP ssuuppppoorrtt iinn tthhee PPoossttffiixx ssee The Postfix sendmail command has a -V flag to request VERP style delivery. Specify one of the following two forms: +Postfix 2.3 and later: + + % sendmail -XV -f owner-listname .... + + % sendmail -XV+= -f owner-listname .... + +Postfix 2.2 and earlier (Postfix 2.3 understands the old syntax for backwards +compatibility, but will log a warning that reminds you of the new syntax): + % sendmail -V -f owner-listname .... % sendmail -V+= -f owner-listname .... diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index bf1897a2f..90dfe6ff3 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -17,12 +17,41 @@ Incompatibility with Postfix 2.1 and earlier If you upgrade from Postfix 2.1 or earlier, read RELEASE_NOTES-2.2 before proceeding. +Incompatibility with snapshot 20050615 +====================================== + +Many internal protocols have changed. You must reload Postfix or +else the queue manager and delivery agents will complain about +unexpected request and reply attributes. + +The new DSN support conflicts with VERP support. For Sendmail +compatibility, Postfix now uses the sendmail -V command line option +for DSN. In order to request VERP style delivery, you must now +specify -XV instead of -V. The Postfix sendmail command will +recognize if you try to use -V for VERP-style delivery. It will +do the right thing and will remind you of the new syntax. + +The queue file format is backwards compatible (again) with Postfix +2.2. Postfix 2.3 stores attributes that older versions will ignore. + +Major changes with snapshot 20050615 +==================================== + +DSN support as described in RFC 3461 .. RFC 3464. This gives senders +control over successful and failed delivery notifications. DSN +involves extra parameters to the SMTP MAIL FROM and RCPT TO commands, +as well as extra Postfix sendmail command line options that provide +a sub-set of the functions of those extra SMTP command parameters. + +See DSN_README for details. Some implementation notes are in +DSN_NOTES, in the top-level source code directory. + Major changes with snapshot 20050510 ==================================== -This release improves usability of DSN (enhanced status codes) in -Postfix access tables, RBL reply templates and in transport maps -that use the error(8) delivery agent. +This release improves usability of enhanced status codes in Postfix +access tables, RBL reply templates and in transport maps that use +the error(8) delivery agent. - When the SMTP server rejects a sender address, it transforms a recipient DSN status (e.g., 4.1.1-4.1.6) into the corresponding @@ -51,6 +80,16 @@ map" for the same thing. - "non-SMTP command" is now logged BEFORE the client name/address and the offending client input, instead of at the end. +Major change with snapshot 20050427+DSN +======================================= + +This is experimental DSN support added to snapshot 20050427. The +code is not for production purposes; it is not fully tested, some +names and interfaces are still rough around the edges, and it does +not update the oqmgr so you have to use qmgr instead. Some +implementation notes and open issues are described in the +DSN_SUPPORT_README file (top-level directory). + Incompatibility with snapshot 20050329 ====================================== diff --git a/postfix/conf/access b/postfix/conf/access index 2aa2d4b3a..835fb448e 100644 --- a/postfix/conf/access +++ b/postfix/conf/access @@ -164,7 +164,7 @@ # all-numerical # An all-numerical result is treated as OK. This for- # mat is generated by address-based relay authoriza- -# tion schemes. +# tion schemes such as pop-before-smtp. # # REJECT ACTIONS # Postfix version 2.3 and later support enhanced status @@ -294,18 +294,20 @@ # ble, it is subject to modification. The following trans- # formations are needed when the same access table is used # for client, helo, sender, or recipient access restric- -# tions: -# -# o When rejecting a sender address, the Postfix SMTP -# server will transform a recipient DSN status (e.g., -# 4.1.1-4.1.6) into the corresponding sender DSN sta- -# tus, and vice versa. -# -# o When rejecting non-address information (such as the -# HELO command argument or the client host- -# name/address), the Postfix SMTP server will trans- -# form a sender or recipient DSN status into a -# generic non-address DSN status (e.g., 4.0.0). +# tions; they happen regardless of whether Postfix replies +# to a MAIL FROM, RCPT TO or other SMTP command. +# +# o When a sender address matches a REJECT action, the +# Postfix SMTP server will transform a recipient DSN +# status (e.g., 4.1.1-4.1.6) into the corresponding +# sender DSN status, and vice versa. +# +# o When non-address information matches a REJECT +# action (such as the HELO command argument or the +# client hostname/address), the Postfix SMTP server +# will transform a sender or recipient DSN status +# into a generic non-address DSN status (e.g., +# 4.0.0). # # REGULAR EXPRESSION TABLES # This section describes how the table lookups change when diff --git a/postfix/conf/postfix-files b/postfix/conf/postfix-files index 4db90eded..73492dd8d 100644 --- a/postfix/conf/postfix-files +++ b/postfix/conf/postfix-files @@ -231,6 +231,7 @@ $readme_directory/CONTENT_INSPECTION_README:f:root:-:644 $readme_directory/DATABASE_README:f:root:-:644 $readme_directory/DB_README:f:root:-:644 $readme_directory/DEBUG_README:f:root:-:644 +$readme_directory/DSN_README:f:root:-:644 $readme_directory/ETRN_README:f:root:-:644 $readme_directory/FILTER_README:f:root:-:644 $readme_directory/HOSTING_README:f:root:-:644:o @@ -279,6 +280,7 @@ $html_directory/CYRUS_README.html:f:root:-:644 $html_directory/DATABASE_README.html:f:root:-:644 $html_directory/DB_README.html:f:root:-:644 $html_directory/DEBUG_README.html:f:root:-:644 +$html_directory/DSN_README.html:f:root:-:644 $html_directory/ETRN_README.html:f:root:-:644 $html_directory/FILTER_README.html:f:root:-:644 $html_directory/INSTALL.html:f:root:-:644 diff --git a/postfix/examples/chroot-setup/Solaris8 b/postfix/examples/chroot-setup/Solaris8 index f9767fe61..dd749466d 100644 --- a/postfix/examples/chroot-setup/Solaris8 +++ b/postfix/examples/chroot-setup/Solaris8 @@ -79,6 +79,7 @@ more=" /etc/netconfig /etc/default/init /etc/inet/services +/etc/resolv.conf /etc/services /usr/lib/ld.so /usr/lib/ld.so.1 diff --git a/postfix/html/CDB_README.html b/postfix/html/CDB_README.html index 4506251d9..4307cc6f7 100644 --- a/postfix/html/CDB_README.html +++ b/postfix/html/CDB_README.html @@ -80,5 +80,5 @@ for tinycdb, or alternatively, for the D.J.B. version:
"dbm" tables. However, the "postmap -i" (incremental record insertion) and "postmap -d" (incremental record deletion) command-line options are not available. For the same reason the -"cdb" map type cannot be used to store the volatile address +"cdb" map type cannot be used to store the persistent address verification cache for the verify(8) service.

diff --git a/postfix/html/DSN_README.html b/postfix/html/DSN_README.html new file mode 100644 index 000000000..12a904202 --- /dev/null +++ b/postfix/html/DSN_README.html @@ -0,0 +1,153 @@ + + + + + + +Postfix DSN Support + + + + + + + +

Postfix +DSN Support

+ +
+ +

Introduction

+ +

Postfix version 2.3 introduces support for Delivery Status +Notifications as described in RFC 3464. This gives senders control +over successful and failed delivery notifications.

+ +

Specifically, DSN support gives an email sender the ability to +specify:

+ + + +

The implementation of DSN support involves extra parameters to +the SMTP MAIL FROM and RCPT TO commands, as well as new Postfix +sendmail command line options that provide a sub-set of the functions +of the extra SMTP command parameters.

+ +

This document has information on the following topics:

+ + + +

Restricting the scope of "success" notifications

+ +

Just like reports of undeliverable mail, DSN reports of +successful delivery can give away more information about the +internal infrastructure than desirable. Unfortunately, disallowing +"success" notification requests requires disallowing other DSN +requests as well. The RFCs do not offer the option to negotiate +feature subsets.

+ +

This is not as bad as it sounds. Remote senders with DSN support +will still be informed that their mail reached your Postfix gateway +successfully; they just will not get successful delivery notices +from your internal systems.

+ +

Use the smtpd_discard_ehlo_keyword_address_maps feature if you +wish to allow DSN requests from trusted clients but not from random +strangers (see below for how to turn this off for all clients): +

+ +
+
+/etc/postfix/main.cf:
+    smtpd_discard_ehlo_keyword_address_maps = 
+        cidr:/etc/postfix/esmtp_access
+
+/etc/postfix/esmtp_access:
+    # Allow DSN requests from local subnet only
+    192.168.0.0/28      silent-discard
+    0.0.0.0/0           silent-discard, dsn
+    ::/0                silent-discard, dsn
+
+
+ +

If you want to disallow all use of DSN requests from the network, +use the smtpd_discard_ehlo_keywords feature:

+ +
+
+/etc/postfix/main.cf:
+    smtpd_discard_ehlo_keywords = silent-discard, dsn
+
+
+ +

Postfix sendmail command-line interface

+ +

Postfix has two Sendmail-compatible command-line options for +DSN support.

+ + + +

Postfix VERP support compatibility

+ +

With Postfix versions before 2.3, the sendmail(1) commands uses +the -V command-line option to request VERP-style delivery. In order +to request VERP style delivery with Postfix 2.3 and later, you must +specify -XV instead of -V.

+ +

The Postfix 2.3 sendmail(1) command will recognize if you try +to use -V for VERP-style delivery. It will do the right thing and +will remind you of the new syntax.

+ + + + diff --git a/postfix/html/FILTER_README.html b/postfix/html/FILTER_README.html index 7d61f4a59..f864a1f07 100644 --- a/postfix/html/FILTER_README.html +++ b/postfix/html/FILTER_README.html @@ -250,9 +250,9 @@ document for an introduction to the Postfix architecture.

3 # Simple shell-based filter. It is meant to be invoked as follows: 4 # /path/to/script -f sender recipients... 5 - 6 # Localize these. + 6 # Localize these. The -G option does nothing before Postfix 2.3. 7 INSPECT_DIR=/var/spool/filter - 8 SENDMAIL="/usr/sbin/sendmail -i" + 8 SENDMAIL="/usr/sbin/sendmail -G -i" 9 10 # Exit codes from <sysexits.h> 11 EX_TEMPFAIL=75 @@ -282,6 +282,12 @@ document for an introduction to the Postfix architecture.