]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.3-20050328
authorWietse Venema <wietse@porcupine.org>
Mon, 28 Mar 2005 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:30:57 +0000 (06:30 +0000)
60 files changed:
postfix/ENHANCED_STATUS_README
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/html/discard.8.html
postfix/html/error.8.html
postfix/html/lmtp.8.html
postfix/html/local.8.html
postfix/html/pipe.8.html
postfix/html/postconf.5.html
postfix/html/smtp.8.html
postfix/html/smtpd.8.html
postfix/man/man5/postconf.5
postfix/man/man8/discard.8
postfix/man/man8/error.8
postfix/man/man8/lmtp.8
postfix/man/man8/local.8
postfix/man/man8/pipe.8
postfix/man/man8/smtp.8
postfix/man/man8/smtpd.8
postfix/proto/postconf.proto
postfix/src/discard/discard.c
postfix/src/error/error.c
postfix/src/global/Makefile.in
postfix/src/global/bounce.c
postfix/src/global/cleanup_strerror.c
postfix/src/global/cleanup_user.h
postfix/src/global/defer.c
postfix/src/global/deliver_request.c
postfix/src/global/dsn_util.c
postfix/src/global/dsn_util.h
postfix/src/global/log_adhoc.c
postfix/src/global/mail_copy.c
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/global/mbox_open.c
postfix/src/global/mbox_open.h
postfix/src/global/pipe_command.c
postfix/src/global/sent.c
postfix/src/global/sys_exits.c
postfix/src/global/trace.c
postfix/src/global/verify.c
postfix/src/lmtp/lmtp.c
postfix/src/local/Makefile.in
postfix/src/local/file.c
postfix/src/local/local.c
postfix/src/local/mailbox.c
postfix/src/local/maildir.c
postfix/src/oqmgr/qmgr_bounce.c
postfix/src/oqmgr/qmgr_defer.c
postfix/src/pipe/pipe.c
postfix/src/postlock/postlock.c
postfix/src/qmgr/qmgr_bounce.c
postfix/src/qmgr/qmgr_defer.c
postfix/src/smtp/smtp.c
postfix/src/smtp/smtp_proto.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_check.c
postfix/src/virtual/Makefile.in
postfix/src/virtual/mailbox.c
postfix/src/virtual/maildir.c

index 73451f377f27a3114cd6ea99f399c58239cac689..684591e48ee88e6b1350d3dde99132fbacd34325 100644 (file)
@@ -1,46 +1,31 @@
 Postfix enhanced status code implementation notes
 =================================================
 
-Enhanced status code support is implemented in stages. In the first
-stage, the goal is to minimize code changes (it's several hundred
-pages of context diffs already). For this reason, the pre-existing
-status variables (success, defer, etc.) are not updated atomically
-with the enhanced status code; instead, enhanced status codes are
-updated separately. This means one has to be careful when making
-updates to the code, so that things won't go out of sync.
+RFC 3463 Enhanced status code support is implemented in stages. In
+the first stage, the goal is to minimize code changes (it's several
+hundred pages of context diffs already). For this reason, the
+pre-existing status variables (success, defer, etc.) are still
+updated separately from the diagnostic text and the RFC 3463 enhanced
+status code.  All this means that one has to be careful when updating
+the code, to keep things in sync.
 
 Specific issues that one should be aware of:
 
-- In the SMTP client, either update the enhanced status code and
-text whenever smtp_errno or resp->code are updated, or place an
-explicit comment that no update is needed.
+- In the SMTP client, update the enhanced status code and text
+whenever smtp_errno or resp->code are updated, or place an explicit
+comment that says no update is needed.
 
-- In the SMTP client, don't worry about the first enhanced status
+- In the SMTP client, don't worry about the initial enhanced status
 digit when reporting failure to look up or connect to a host. For
 convenience, the SMTP client top-level code automatically changes
-it into '4' or '5' as appropriate.
+the initial digit into '4' or '5' as appropriate.
 
-- The above two points also apply to the LMTP client; this delivery
-agent is on life support until its functionality is merged with the
-SMTP client.
+- The above two points also apply to the LMTP client.
 
-- In the SMTP server, don't worry about the first enhanced status
-digit when a restriction rejects access. For convenience, the
-smtpd_check_reject() routine automatically changes it into '4' or
-'5' as appropriate.
-
-- The pipe, local and virtual delivery agents never update the
-diagnostic text without also updating the enhanced status code. The
-main chore here is to choose appropriate enhanced status codes.
-
-- Don't rely on the system errno value after calling a routine that
-updates the enhanced status code upon failure. Use the enhanced
-status code (and diagnostic text) instead. Currently there are two
-exceptions to this rule: mail_copy() for historical reasons may or
-may not return explicit error reports (fixing this requires that
-pipe_command() be restructured); and the maildir delivery routines
-log a helpful warning when delivery fails with EACCES. This just
-happens to work because maildir needs no file locking.
+- In the SMTP server, don't worry about the initial enhanced status
+code digit when an smtpd_mumble_restriction rejects access. For
+convenience, the smtpd_check_reject() routine automatically changes
+the initial digit into '4' or '5' as appropriate.
 
 - Some low-level support routines update the diagnostic text but
 not the enhanced status code. To identify these, search for functions
@@ -48,14 +33,29 @@ that are called with why->vstring as output parameter, and make
 sure that the caller updates the enhanced status code in all
 appropriate cases.
 
+- By design, the pipe, local and virtual delivery agent code never
+update the diagnostic text separately from the enhanced status code.
+
+- Don't rely on the system errno value after calling a routine that
+performs or prepares for mail delivery. Instead, have that routine
+update the enhanced status code (and text) when the error happens.
+This was an issue with mailbox, maildir and file delivery.  Currently
+there remain two exceptions to this rule: mail_copy() for historical
+reasons may or may not return explicit error reports (fixing this
+requires that pipe_command() be restructured); and the maildir
+delivery routines log a helpful warning when delivery fails with
+EACCES.  The latter happens to work because mbox_open() does not
+need to unlock the output file, so it won't clobber the errno value.
+
 - Avoid passing around strings that combine enhanced status code
 and diagnostic text, because the compiler can't help to enforce
-consistency.  Currently there are two exceptions to this rule: the
-cleanup server status reply, and the delivery agent status reply.
-Once these protocols are updated we can remove the dns_prepend()
-routine.
-
-- The bounce/defer/sent modules will catch the cases where an
-enhanced status code does not match the reject/defer/success status.
-These discrepancies are logged as a warning, and the enhanced status
-code is replaced by a generic one.
+that everything has a status code.  Currently there are two exceptions
+to this rule: the cleanup server status reply, and the delivery
+agent status reply.  Once these protocols are updated we can remove
+the dns_prepend() routine. The third exception, enhanced status
+codes in external command output, is a feature.
+
+- The bounce/defer/sent library modules will catch the cases where
+an enhanced status code does not match the reject/defer/success
+status.  They log a warning message, and replace the incorrect
+enhanced status code by a generic one.
index 7cc78da8ec8684b75102e7fc197a3ca9272bd26e..22219e5984ab17d07c2e41bf4c26496caae9e53c 100644 (file)
@@ -10487,7 +10487,7 @@ Apologies for any names omitted.
 
 20050321-27
 
-       Support for RFC 1893 enhanced status codes.  See also the
+       Support for RFC 3463 enhanced status codes.  See also the
        ENHANCED_STATUS_README file for background.
 
        New module to pass around (status code + text) instead of
@@ -10497,13 +10497,14 @@ Apologies for any names omitted.
        enhanced status codes.  Files: global/sys_exits.c,
        global/cleanup_strerror.c.
 
-       Incompatible change: centralized mapping of errno values
-       to delivery status codes after failed delivery to mailbox,
-       maildir, or file. Error codes EACCES, EAGAIN, ESTALE are
-       4.2.0 temporary errors, ENOSPC is a 4.3.0 temporary error,
-       EDQUOT and EFBIG are 5.2.2 hard errors, and everything else
-       is a 5.2.0 hard error. This means that local(8) will bounce
-       less mail, while virtual(8) will defer less mail. File:
+       Cleanup: centralized mapping of errno values to delivery
+       status codes after failed delivery to mailbox, maildir, or
+       file. Error codes EAGAIN, and ESTALE are 4.2.0 temporary
+       errors; ENOSPC is a 4.3.0 temporary error; and EDQUOT and
+       EFBIG are 5.2.2 hard errors. For backwards compatibility,
+       the result of other errors depends on the delivery agent:
+       with local(8) everything else is a 5.2.0 hard error, and
+       with virtual(8) everything else is soft 4.2.0 error.  File:
        global/mbox_open.c.
 
 20050324
@@ -10534,13 +10535,19 @@ Apologies for any names omitted.
 
 20050327
 
-       Bugfix: the SMTP client did not ask the queue manager to
-       reduce destination concurrency after a "lost connection"
-       or "connection timed out" errror. File: smtp/smtp_trouble.c.
+       Bugfix: the SMTP and LMTP clients did not ask the queue
+       manager to reduce destination concurrency when "lost
+       connection" or "connection timed out" happened AFTER Postfix
+       received the server greeting. Files: smtp/smtp_trouble.c,
+       lmtp/lmtp-trouble.c.
 
        Workaround: FreeBSD has incompatibly changed the output
        format from "od", breaking regression test portability.
 
+       The TLS client session cache ID is now derived from the
+       server IP address, TCP Port, and server HELO hostname
+       if available. File: smtp/smtp_proto.c.
+
 Open problems:
 
        Med: disable header address rewriting after XCLIENT?
index 63b26e4a5890b4643250724df4c9eeec05a43789..5f1fcb08dfef468f85e2703a5c71aacfb518e908 100644 (file)
@@ -11,38 +11,48 @@ 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.
 
-See RELEASE_NOTES-2.2 for changes introduced during the development
-of Postfix version 2.2.
+Incompatibility with Postfix 2.1 and earlier
+============================================
 
-Incompatible changes with snapshot 20050327
-===========================================
+If you upgrade from Postfix 2.1 or earlier, read RELEASE_NOTES-2.2
+before proceeding.
 
-local(8) and virtual(8) now handle the same errors in the same way.
-This means that local(8) will defer some mail that it older versions
-would bounce, and that virtual(8) will bounce some mail that older
-versions would defer.
+Incompatibility with snapshot 20050328
+======================================
 
-Specifically, error codes EACCES, EAGAIN, ESTALE are soft (4.2.0)
-errors, ENOSPC is a soft (4.3.0) error, EDQUOT and EFBIG are hard
-(5.2.2) errors, and everything else is a hard (5.2.0) error.
+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 20050327
+Major changes with snapshot 20050328
 ====================================
 
-This release introduces support for RFC 1893 enhanced status codes.
-For example, status code "5.1.1" means "recipient unknown". Postfix
-recognizes enhanced status codes in remote server replies, and
-generates enhanced status codes when it responds to mail delivery
-requests. This improves the communication with mail clients that
-hide error messages from users.
+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 1893 enhanced status codes
-in Postfix access maps or header/body_checks. Example:
+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
 
-(5.7.1 means "no authorization, message refused").  Enhanced status
-code support is also available in RBL reply templates.
+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 do specify an enhanced status code, Postfix will automatically
-change the first digit into a '4' or '5' as appropriate.
+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.
index 29a31494397eac25905d2472123a96443a1f4f84..1106eba208004ee66ac205ab424876daa976d0e2 100644 (file)
@@ -18,7 +18,7 @@ DISCARD(8)                                                          DISCARD(8)
        queue  file,  a sender address, a domain or host name that
        is treated as the reason  for  discarding  the  mail,  and
        recipient information.  The reason may be prefixed with an
-       <a href="http://www.faqs.org/rfcs/rfc1893.html">RFC 1893</a>-compatible detail code.  This program expects  to
+       <a href="http://www.faqs.org/rfcs/rfc3463.html">RFC 3463</a>-compatible detail code.  This program expects  to
        be run from the <a href="master.8.html"><b>master</b>(8)</a> process manager.
 
        The  <a href="discard.8.html"><b>discard</b>(8)</a>  delivery  agent  pretends  to deliver all
index cc17b34883a2283dd22a9912b8db9787a50d3787..ab31a7d5a9bba6af9d3e6975a0d5d24d15485a2a 100644 (file)
@@ -18,7 +18,7 @@ ERROR(8)                                                              ERROR(8)
        queue  file,  a sender address, a domain or host name that
        is treated as the reason for non-delivery,  and  recipient
        information.   The  reason  may  be  prefixed  with an RFC
-       1893-compatible detail code.  This program expects  to  be
+       3463-compatible detail code.  This program expects  to  be
        run from the <a href="master.8.html"><b>master</b>(8)</a> process manager.
 
        The  <a href="error.8.html"><b>error</b>(8)</a> delivery agent bounces all recipients in the
index 2a36548b9589bec506a9d187606a001152a85aa6..df7235987deeff1cf442e69f3b4ab249d2bcc5f7 100644 (file)
@@ -63,10 +63,11 @@ LMTP(8)                                                                LMTP(8)
        <a href="http://www.faqs.org/rfcs/rfc1652.html">RFC 1652</a> (8bit-MIME transport)
        <a href="http://www.faqs.org/rfcs/rfc1870.html">RFC 1870</a> (Message Size Declaration)
        <a href="http://www.faqs.org/rfcs/rfc2033.html">RFC 2033</a> (LMTP protocol)
-       <a href="http://www.faqs.org/rfcs/rfc2034.html">RFC 2034</a> (Enhanced Error Codes)
+       <a href="http://www.faqs.org/rfcs/rfc2034.html">RFC 2034</a> (Enhanced Status codes)
        <a href="http://www.faqs.org/rfcs/rfc2554.html">RFC 2554</a> (AUTH command)
        <a href="http://www.faqs.org/rfcs/rfc2821.html">RFC 2821</a> (SMTP protocol)
        <a href="http://www.faqs.org/rfcs/rfc2920.html">RFC 2920</a> (SMTP Pipelining)
+       <a href="http://www.faqs.org/rfcs/rfc3463.html">RFC 3463</a> (Enhanced Status codes)
 
 <b>DIAGNOSTICS</b>
        Problems  and transactions are logged to <b>syslogd</b>(8).  Cor-
index c7c0f03c7c05ed9b774b4a113ab393e7c6fa8951..35990ec069b749b0a4cdba6c8e3490744687a48e 100644 (file)
@@ -172,10 +172,17 @@ LOCAL(8)                                                              LOCAL(8)
        ery  status  reports.  A command is forcibly terminated if
        it does not complete  within  <b><a href="postconf.5.html#command_time_limit">command_time_limit</a></b>  seconds.
        Command  exit status codes are expected to follow the con-
-       ventions defined in &lt;<b>sysexits.h</b>&gt;.
+       ventions defined in &lt;<b>sysexits.h</b>&gt;.   Exit  status  0  means
+       normal successful completion.
 
-       A limited amount of message context is exported via  envi-
-       ronment  variables. Characters that may have special mean-
+       Postfix  version  2.3  and  later  support  <a href="http://www.faqs.org/rfcs/rfc3463.html">RFC 3463</a>-style
+       enhanced status codes.  If a  command  terminates  with  a
+       non-zero  exit  status, and the command output begins with
+       an enhanced status code, this status code takes precedence
+       over the non-zero exit status.
+
+       A  limited amount of message context is exported via envi-
+       ronment variables. Characters that may have special  mean-
        ing to the shell are replaced by underscores.  The list of
        acceptable characters is specified with the <b><a href="postconf.5.html#command_expansion_filter">command_expan</a>-</b>
        <b><a href="postconf.5.html#command_expansion_filter">sion_filter</a></b> configuration parameter.
@@ -206,97 +213,97 @@ LOCAL(8)                                                              LOCAL(8)
        the following environment variables:
 
        <b>CLIENT_ADDRESS</b>
-              Remote client  network  address.  Available  as  of
+              Remote  client  network  address.  Available  as of
               Postfix 2.2.
 
        <b>CLIENT_HELO</b>
-              Remote  client EHLO command parameter. Available as
+              Remote client EHLO command parameter. Available  as
               of Postfix 2.2.
 
        <b>CLIENT_HOSTNAME</b>
-              Remote client hostname.  Available  as  of  Postfix
+              Remote  client  hostname.  Available  as of Postfix
               2.2.
 
        <b>CLIENT_PROTOCOL</b>
-              Remote  client  protocol.  Available  as of Postfix
+              Remote client protocol.  Available  as  of  Postfix
               2.2.
 
        <b>SASL_METHOD</b>
-              SASL authentication method specified in the  remote
+              SASL  authentication method specified in the remote
               client AUTH command. Available as of Postfix 2.2.
 
        <b>SASL_SENDER</b>
-              SASL  sender address specified in the remote client
+              SASL sender address specified in the remote  client
               MAIL FROM command. Available as of Postfix 2.2.
 
        <b>SASL_USERNAME</b>
-              SASL username specified in the remote  client  AUTH
+              SASL  username  specified in the remote client AUTH
               command.  Available as of Postfix 2.2.
 
        The <b>PATH</b> environment variable is always reset to a system-
-       dependent default path, and  environment  variables  whose
-       names  are blessed by the <b><a href="postconf.5.html#export_environment">export_environment</a></b> configuration
+       dependent  default  path,  and environment variables whose
+       names are blessed by the <b><a href="postconf.5.html#export_environment">export_environment</a></b>  configuration
        parameter are exported unchanged.
 
        The current working directory is the mail queue directory.
 
-       The  <a href="local.8.html"><b>local</b>(8)</a>  daemon  prepends a "<b>From</b> <i>sender time</i><b>_</b><i>stamp</i>"
-       envelope header to each message, prepends  an  <b>X-Original-</b>
+       The <a href="local.8.html"><b>local</b>(8)</a> daemon prepends a  "<b>From</b>  <i>sender  time</i><b>_</b><i>stamp</i>"
+       envelope  header  to each message, prepends an <b>X-Original-</b>
        <b>To:</b> header with the recipient address as given to Postfix,
-       prepends an optional <b>Delivered-To:</b> header with  the  final
+       prepends  an  optional <b>Delivered-To:</b> header with the final
        recipient envelope address, prepends a <b>Return-Path:</b> header
-       with the sender envelope address,  and  appends  no  empty
+       with  the  sender  envelope  address, and appends no empty
        line.
 
 <b>EXTERNAL FILE DELIVERY</b>
-       The  delivery  format  depends on the destination filename
-       syntax.  The default is to use UNIX-style mailbox  format.
-       Specify  a  name  ending in <b>/</b> for <b>qmail</b>-compatible <b>maildir</b>
+       The delivery format depends on  the  destination  filename
+       syntax.   The default is to use UNIX-style mailbox format.
+       Specify a name ending in <b>/</b>  for  <b>qmail</b>-compatible  <b>maildir</b>
        delivery.
 
-       The <b><a href="postconf.5.html#allow_mail_to_files">allow_mail_to_files</a></b> configuration parameter  restricts
-       delivery  to  external  files. The default setting (<b>alias,</b>
+       The  <b><a href="postconf.5.html#allow_mail_to_files">allow_mail_to_files</a></b> configuration parameter restricts
+       delivery to external files. The  default  setting  (<b>alias,</b>
        <b>forward</b>) forbids file destinations in <b>:include:</b> files.
 
-       In the case of UNIX-style mailbox delivery,  the  <a href="local.8.html"><b>local</b>(8)</a>
+       In  the  case of UNIX-style mailbox delivery, the <a href="local.8.html"><b>local</b>(8)</a>
        daemon prepends a "<b>From</b> <i>sender time</i><b>_</b><i>stamp</i>" envelope header
-       to each message, prepends an  <b>X-Original-To:</b>  header  with
-       the  recipient  address  as  given to Postfix, prepends an
-       optional <b>Delivered-To:</b> header  with  the  final  recipient
-       envelope  address,  prepends a &gt; character to lines begin-
-       ning with "<b>From</b> ", and appends an empty line.   The  enve-
-       lope  sender  address  is  available  in  the <b>Return-Path:</b>
-       header.  When the destination is a  regular  file,  it  is
+       to  each  message,  prepends an <b>X-Original-To:</b> header with
+       the recipient address as given  to  Postfix,  prepends  an
+       optional  <b>Delivered-To:</b>  header  with  the final recipient
+       envelope address, prepends a &gt; character to  lines  begin-
+       ning  with  "<b>From</b> ", and appends an empty line.  The enve-
+       lope sender  address  is  available  in  the  <b>Return-Path:</b>
+       header.   When  the  destination  is a regular file, it is
        locked for exclusive access while delivery is in progress.
        In case of problems, an attempt is made to truncate a reg-
        ular file to its original length.
 
        In the case of <b>maildir</b> delivery, the local daemon prepends
-       an optional <b>Delivered-To:</b> header with the  final  envelope
-       recipient  address,  and prepends an <b>X-Original-To:</b> header
+       an  optional  <b>Delivered-To:</b> header with the final envelope
+       recipient address, and prepends an  <b>X-Original-To:</b>  header
        with the recipient address as given to Postfix.  The enve-
-       lope  sender  address  is  available  in  the <b>Return-Path:</b>
+       lope sender  address  is  available  in  the  <b>Return-Path:</b>
        header.
 
 <b>ADDRESS EXTENSION</b>
-       The optional <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a></b>  configuration  parameter
-       specifies  how  to  separate address extensions from local
+       The  optional  <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a></b> configuration parameter
+       specifies how to separate address  extensions  from  local
        recipient names.
 
-       For example, with  "<b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a>  =  +</b>",  mail  for
-       <i>name</i>+<i>foo</i>  is  delivered  to  the  alias <i>name</i>+<i>foo</i> or to the
-       alias <i>name</i>, to  the  destinations  listed  in  ~<i>name</i>/.<b>for-</b>
+       For  example,  with  "<b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a>  =  +</b>", mail for
+       <i>name</i>+<i>foo</i> is delivered to the  alias  <i>name</i>+<i>foo</i>  or  to  the
+       alias  <i>name</i>,  to  the  destinations  listed in ~<i>name</i>/.<b>for-</b>
        <b>ward</b>+<i>foo</i> or in ~<i>name</i>/.<b>forward</b>, to the mailbox owned by the
        user <i>name</i>, or it is sent back as undeliverable.
 
-       In all cases the  <a href="local.8.html"><b>local</b>(8)</a>  daemon  prepends  an  optional
-       `<b>Delivered-To:</b>   header  line  with  the  final  recipient
+       In  all  cases  the  <a href="local.8.html"><b>local</b>(8)</a>  daemon prepends an optional
+       `<b>Delivered-To:</b>  header  line  with  the  final   recipient
        address.
 
 <b>DELIVERY RIGHTS</b>
-       Deliveries to external files  and  external  commands  are
+       Deliveries  to  external  files  and external commands are
        made with the rights of the receiving user on whose behalf
-       the delivery is made.  In the absence of a  user  context,
+       the  delivery  is made.  In the absence of a user context,
        the <a href="local.8.html"><b>local</b>(8)</a> daemon uses the owner rights of the <b>:include:</b>
        file or alias database.  When those files are owned by the
        superuser, delivery is made with the rights specified with
@@ -304,50 +311,51 @@ LOCAL(8)                                                              LOCAL(8)
 
 <b>STANDARDS</b>
        <a href="http://www.faqs.org/rfcs/rfc822.html">RFC 822</a> (ARPA Internet Text Messages)
+       <a href="http://www.faqs.org/rfcs/rfc3463.html">RFC 3463</a> (Enhanced status codes)
 
 <b>DIAGNOSTICS</b>
-       Problems and transactions are logged to <b>syslogd</b>(8).   Cor-
-       rupted  message files are marked so that the queue manager
+       Problems  and transactions are logged to <b>syslogd</b>(8).  Cor-
+       rupted message files are marked so that the queue  manager
        can move them to the <b>corrupt</b> queue afterwards.
 
-       Depending on the setting of the <b><a href="postconf.5.html#notify_classes">notify_classes</a></b>  parameter,
-       the  postmaster  is notified of bounces and of other trou-
+       Depending  on the setting of the <b><a href="postconf.5.html#notify_classes">notify_classes</a></b> parameter,
+       the postmaster is notified of bounces and of  other  trou-
        ble.
 
 <b>SECURITY</b>
        The <a href="local.8.html"><b>local</b>(8)</a> delivery agent needs a dual personality 1) to
        access the private Postfix queue and IPC mechanisms, 2) to
-       impersonate the recipient and deliver to  recipient-speci-
-       fied  files  or  commands. It is therefore security sensi-
+       impersonate  the recipient and deliver to recipient-speci-
+       fied files or commands. It is  therefore  security  sensi-
        tive.
 
-       The <a href="local.8.html"><b>local</b>(8)</a> delivery agent disallows  regular  expression
-       substitution  of $1 etc. in <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>, because that would
+       The  <a href="local.8.html"><b>local</b>(8)</a>  delivery agent disallows regular expression
+       substitution of $1 etc. in <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>, because that  would
        open a security hole.
 
-       The <a href="local.8.html"><b>local</b>(8)</a> delivery agent will silently ignore  requests
-       to  use  the <a href="proxymap.8.html"><b>proxymap</b>(8)</a> server within <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>. Instead
-       it will open the table directly.  Before  Postfix  version
-       2.2,  the  <a href="local.8.html"><b>local</b>(8)</a>  delivery  agent will terminate with a
+       The  <a href="local.8.html"><b>local</b>(8)</a> delivery agent will silently ignore requests
+       to use the <a href="proxymap.8.html"><b>proxymap</b>(8)</a> server within  <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>.  Instead
+       it  will  open the table directly.  Before Postfix version
+       2.2, the <a href="local.8.html"><b>local</b>(8)</a> delivery agent  will  terminate  with  a
        fatal error.
 
 <b>BUGS</b>
-       For security  reasons,  the  message  delivery  status  of
-       external  commands  or  of  external files is never check-
+       For  security  reasons,  the  message  delivery  status of
+       external commands or of external  files  is  never  check-
        pointed to file. As a result, the program may occasionally
        deliver more than once to a command or external file. Bet-
        ter safe than sorry.
 
-       Mutually-recursive aliases or  ~/.<b>forward</b>  files  are  not
-       detected  early.   The  resulting  mail forwarding loop is
+       Mutually-recursive  aliases  or  ~/.<b>forward</b>  files are not
+       detected early.  The resulting  mail  forwarding  loop  is
        broken by the use of the <b>Delivered-To:</b> message header.
 
 <b>CONFIGURATION PARAMETERS</b>
-       Changes  to  <b>main.cf</b>  are  picked  up  automatically,   as
-       <a href="local.8.html"><b>local</b>(8)</a>  processes run for only a limited amount of time.
+       Changes   to  <b>main.cf</b>  are  picked  up  automatically,  as
+       <a href="local.8.html"><b>local</b>(8)</a> processes run for only a limited amount of  time.
        Use the command "<b>postfix reload</b>" to speed up a change.
 
-       The text below provides  only  a  parameter  summary.  See
+       The  text  below  provides  only  a parameter summary. See
        <a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including examples.
 
 <b>COMPATIBILITY CONTROLS</b>
@@ -357,59 +365,59 @@ LOCAL(8)                                                              LOCAL(8)
        <b><a href="postconf.5.html#expand_owner_alias">expand_owner_alias</a> (no)</b>
               When delivering to an alias "aliasname" that has an
               "owner-aliasname" companion alias, set the envelope
-              sender  address  to  the  expansion  of the "owner-
+              sender address to  the  expansion  of  the  "owner-
               aliasname" alias.
 
        <b><a href="postconf.5.html#owner_request_special">owner_request_special</a> (yes)</b>
-              Give special treatment to owner-listname and  list-
-              name-request  address  localparts: don't split such
-              addresses when the <a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a>  is  set  to
+              Give  special treatment to owner-listname and list-
+              name-request address localparts: don't  split  such
+              addresses  when  the  <a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> is set to
               "-".
 
        <b><a href="postconf.5.html#sun_mailtool_compatibility">sun_mailtool_compatibility</a> (no)</b>
               Obsolete SUN mailtool compatibility feature.
 
 <b>DELIVERY METHOD CONTROLS</b>
-       The  precedence  of <a href="local.8.html"><b>local</b>(8)</a> delivery methods from high to
-       low is: aliases, .forward files, <a href="postconf.5.html#mailbox_transport">mailbox_transport</a>,  <a href="postconf.5.html#mailbox_command_maps">mail</a>-
+       The precedence of <a href="local.8.html"><b>local</b>(8)</a> delivery methods from  high  to
+       low  is: aliases, .forward files, <a href="postconf.5.html#mailbox_transport">mailbox_transport</a>, <a href="postconf.5.html#mailbox_command_maps">mail</a>-
        <a href="postconf.5.html#mailbox_command_maps">box_command_maps</a>,      <a href="postconf.5.html#mailbox_command">mailbox_command</a>,      <a href="postconf.5.html#home_mailbox">home_mailbox</a>,
-       <a href="postconf.5.html#mail_spool_directory">mail_spool_directory</a>, <a href="postconf.5.html#fallback_transport">fallback_transport</a> and  <a href="postconf.5.html#luser_relay">luser_relay</a>.
+       <a href="postconf.5.html#mail_spool_directory">mail_spool_directory</a>,  <a href="postconf.5.html#fallback_transport">fallback_transport</a> and <a href="postconf.5.html#luser_relay">luser_relay</a>.
 
        <b><a href="postconf.5.html#alias_maps">alias_maps</a> (see 'postconf -d' output)</b>
-              The  alias  databases  that  are  used for <a href="local.8.html"><b>local</b>(8)</a>
+              The alias databases  that  are  used  for  <a href="local.8.html"><b>local</b>(8)</a>
               delivery.
 
        <b><a href="postconf.5.html#forward_path">forward_path</a> (see 'postconf -d' output)</b>
               The <a href="local.8.html"><b>local</b>(8)</a> delivery agent search list for finding
-              a  .forward file with user-specified delivery meth-
+              a .forward file with user-specified delivery  meth-
               ods.
 
        <b><a href="postconf.5.html#mailbox_transport">mailbox_transport</a> (empty)</b>
-              Optional  message  delivery  transport   that   the
-              <a href="local.8.html"><b>local</b>(8)</a>  delivery  agent  should  use  for mailbox
-              delivery to all local recipients,  whether  or  not
+              Optional   message   delivery  transport  that  the
+              <a href="local.8.html"><b>local</b>(8)</a> delivery  agent  should  use  for  mailbox
+              delivery  to  all  local recipients, whether or not
               they are found in the UNIX passwd database.
 
        <b><a href="postconf.5.html#mailbox_command_maps">mailbox_command_maps</a> (empty)</b>
-              Optional  lookup tables with per-recipient external
+              Optional lookup tables with per-recipient  external
               commands to use for <a href="local.8.html"><b>local</b>(8)</a> mailbox delivery.
 
        <b><a href="postconf.5.html#mailbox_command">mailbox_command</a> (empty)</b>
-              Optional external command that the <a href="local.8.html"><b>local</b>(8)</a>  deliv-
+              Optional  external command that the <a href="local.8.html"><b>local</b>(8)</a> deliv-
               ery agent should use for mailbox delivery.
 
        <b><a href="postconf.5.html#home_mailbox">home_mailbox</a> (empty)</b>
-              Optional  pathname  of a mailbox file relative to a
+              Optional pathname of a mailbox file relative  to  a
               <a href="local.8.html"><b>local</b>(8)</a> user's home directory.
 
        <b><a href="postconf.5.html#mail_spool_directory">mail_spool_directory</a> (see 'postconf -d' output)</b>
-              The directory where <a href="local.8.html"><b>local</b>(8)</a>  UNIX-style  mailboxes
+              The  directory  where <a href="local.8.html"><b>local</b>(8)</a> UNIX-style mailboxes
               are kept.
 
        <b><a href="postconf.5.html#fallback_transport">fallback_transport</a> (empty)</b>
-              Optional   message   delivery  transport  that  the
-              <a href="local.8.html"><b>local</b>(8)</a> delivery agent should use for  names  that
-              are  not found in the <a href="aliases.5.html"><b>aliases</b>(5)</a> database or in the
+              Optional  message  delivery  transport   that   the
+              <a href="local.8.html"><b>local</b>(8)</a>  delivery  agent should use for names that
+              are not found in the <a href="aliases.5.html"><b>aliases</b>(5)</a> database or in  the
               UNIX passwd database.
 
        <b><a href="postconf.5.html#luser_relay">luser_relay</a> (empty)</b>
@@ -419,7 +427,7 @@ LOCAL(8)                                                              LOCAL(8)
        Available in Postfix version 2.2 and later:
 
        <b><a href="postconf.5.html#command_execution_directory">command_execution_directory</a> (empty)</b>
-              The  <a href="local.8.html"><b>local</b>(8)</a>  delivery agent working directory for
+              The <a href="local.8.html"><b>local</b>(8)</a> delivery agent working  directory  for
               delivery to external command.
 
 <b>MAILBOX LOCKING CONTROLS</b>
@@ -428,15 +436,15 @@ LOCAL(8)                                                              LOCAL(8)
               sive lock on a mailbox file or <a href="bounce.8.html"><b>bounce</b>(8)</a> logfile.
 
        <b><a href="postconf.5.html#deliver_lock_delay">deliver_lock_delay</a> (1s)</b>
-              The  time  between attempts to acquire an exclusive
+              The time between attempts to acquire  an  exclusive
               lock on a mailbox file or <a href="bounce.8.html"><b>bounce</b>(8)</a> logfile.
 
        <b><a href="postconf.5.html#stale_lock_time">stale_lock_time</a> (500s)</b>
-              The time after  which  a  stale  exclusive  mailbox
+              The  time  after  which  a  stale exclusive mailbox
               lockfile is removed.
 
        <b><a href="postconf.5.html#mailbox_delivery_lock">mailbox_delivery_lock</a> (see 'postconf -d' output)</b>
-              How  to  lock  a UNIX-style <a href="local.8.html"><b>local</b>(8)</a> mailbox before
+              How to lock a UNIX-style  <a href="local.8.html"><b>local</b>(8)</a>  mailbox  before
               attempting delivery.
 
 <b>RESOURCE AND RATE CONTROLS</b>
@@ -444,17 +452,17 @@ LOCAL(8)                                                              LOCAL(8)
               Time limit for delivery to external commands.
 
        <b><a href="postconf.5.html#duplicate_filter_limit">duplicate_filter_limit</a> (1000)</b>
-              The maximal number of addresses remembered  by  the
-              address  duplicate  filter  for  <a href="aliases.5.html"><b>aliases</b>(5)</a> or <a href="virtual.5.html"><b>vir-</b></a>
+              The  maximal  number of addresses remembered by the
+              address duplicate filter  for  <a href="aliases.5.html"><b>aliases</b>(5)</a>  or  <a href="virtual.5.html"><b>vir-</b></a>
               <a href="virtual.5.html"><b>tual</b>(5)</a> alias expansion, or for <a href="showq.8.html"><b>showq</b>(8)</a> queue dis-
               plays.
 
        <b><a href="postconf.5.html#local_destination_concurrency_limit">local_destination_concurrency_limit</a> (2)</b>
-              The  maximal  number of parallel deliveries via the
+              The maximal number of parallel deliveries  via  the
               local mail delivery transport to the same recipient
-              (when  "<a href="postconf.5.html#local_destination_recipient_limit">local_destination_recipient_limit</a>  = 1") or
-              the maximal number of parallel  deliveries  to  the
-              same  <a href="ADDRESS_CLASS_README.html#local_domain_class">local domain</a> (when "local_destination_recipi-
+              (when "<a href="postconf.5.html#local_destination_recipient_limit">local_destination_recipient_limit</a> =  1")  or
+              the  maximal  number  of parallel deliveries to the
+              same <a href="ADDRESS_CLASS_README.html#local_domain_class">local domain</a> (when  "local_destination_recipi-
               ent_limit &gt; 1").
 
        <b><a href="postconf.5.html#local_destination_recipient_limit">local_destination_recipient_limit</a> (1)</b>
@@ -467,45 +475,45 @@ LOCAL(8)                                                              LOCAL(8)
 
 <b>SECURITY CONTROLS</b>
        <b><a href="postconf.5.html#allow_mail_to_commands">allow_mail_to_commands</a> (alias, forward)</b>
-              Restrict <a href="local.8.html"><b>local</b>(8)</a> mail delivery  to  external  com-
+              Restrict  <a href="local.8.html"><b>local</b>(8)</a>  mail  delivery to external com-
               mands.
 
        <b><a href="postconf.5.html#allow_mail_to_files">allow_mail_to_files</a> (alias, forward)</b>
-              Restrict  <a href="local.8.html"><b>local</b>(8)</a> mail delivery to external files.
+              Restrict <a href="local.8.html"><b>local</b>(8)</a> mail delivery to external  files.
 
        <b><a href="postconf.5.html#command_expansion_filter">command_expansion_filter</a> (see 'postconf -d' output)</b>
-              Restrict the characters that the <a href="local.8.html"><b>local</b>(8)</a>  delivery
-              agent  allows  in $name expansions of $mailbox_com-
+              Restrict  the characters that the <a href="local.8.html"><b>local</b>(8)</a> delivery
+              agent allows in $name expansions  of  $mailbox_com-
               mand.
 
        <b><a href="postconf.5.html#default_privs">default_privs</a> (nobody)</b>
-              The default rights used by  the  <a href="local.8.html"><b>local</b>(8)</a>  delivery
+              The  default  rights  used by the <a href="local.8.html"><b>local</b>(8)</a> delivery
               agent for delivery to external file or command.
 
        <b><a href="postconf.5.html#forward_expansion_filter">forward_expansion_filter</a> (see 'postconf -d' output)</b>
-              Restrict  the characters that the <a href="local.8.html"><b>local</b>(8)</a> delivery
-              agent allows in $name expansions of  $<a href="postconf.5.html#forward_path">forward_path</a>.
+              Restrict the characters that the <a href="local.8.html"><b>local</b>(8)</a>  delivery
+              agent  allows in $name expansions of $<a href="postconf.5.html#forward_path">forward_path</a>.
 
        Available in Postfix version 2.2 and later:
 
        <b><a href="postconf.5.html#execution_directory_expansion_filter">execution_directory_expansion_filter</a>  (see  'postconf  -d'</b>
        <b>output)</b>
-              Restrict  the characters that the <a href="local.8.html"><b>local</b>(8)</a> delivery
+              Restrict the characters that the <a href="local.8.html"><b>local</b>(8)</a>  delivery
               agent allows in $name expansions of $<a href="postconf.5.html#command_execution_directory">command_execu</a>-
               <a href="postconf.5.html#command_execution_directory">tion_directory</a>.
 
 <b>MISCELLANEOUS CONTROLS</b>
        <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
-              The  default  location  of  the Postfix main.cf and
+              The default location of  the  Postfix  main.cf  and
               master.cf configuration files.
 
        <b><a href="postconf.5.html#daemon_timeout">daemon_timeout</a> (18000s)</b>
-              How much time a Postfix daemon process may take  to
-              handle  a  request  before  it  is  terminated by a
+              How  much time a Postfix daemon process may take to
+              handle a request  before  it  is  terminated  by  a
               built-in watchdog timer.
 
        <b><a href="postconf.5.html#export_environment">export_environment</a> (see 'postconf -d' output)</b>
-              The list of environment variables  that  a  Postfix
+              The  list  of  environment variables that a Postfix
               process will export to non-Postfix processes.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
@@ -513,37 +521,37 @@ LOCAL(8)                                                              LOCAL(8)
               over an internal communication channel.
 
        <b><a href="postconf.5.html#local_command_shell">local_command_shell</a> (empty)</b>
-              Optional shell program  for  <a href="local.8.html"><b>local</b>(8)</a>  delivery  to
+              Optional  shell  program  for  <a href="local.8.html"><b>local</b>(8)</a> delivery to
               non-Postfix command.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The  maximum  amount  of  time that an idle Postfix
-              daemon process waits for the next  service  request
+              The maximum amount of time  that  an  idle  Postfix
+              daemon  process  waits for the next service request
               before exiting.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
-              The  maximal number of connection requests before a
+              The maximal number of connection requests before  a
               Postfix daemon process terminates.
 
        <b><a href="postconf.5.html#prepend_delivered_header">prepend_delivered_header</a> (command, file, forward)</b>
-              The message delivery  contexts  where  the  Postfix
-              <a href="local.8.html"><b>local</b>(8)</a>  delivery  agent  prepends a Delivered-To:
+              The  message  delivery  contexts  where the Postfix
+              <a href="local.8.html"><b>local</b>(8)</a> delivery agent  prepends  a  Delivered-To:
               message header.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The process ID  of  a  Postfix  command  or  daemon
+              The  process  ID  of  a  Postfix  command or daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The  process  name  of  a Postfix command or daemon
+              The process name of a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a> (canonical, virtual)</b>
-              What address lookup tables copy an  address  exten-
+              What  address  lookup tables copy an address exten-
               sion from the lookup key to the lookup result.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The  location of the Postfix top-level queue direc-
+              The location of the Postfix top-level queue  direc-
               tory.
 
        <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> (empty)</b>
@@ -551,15 +559,15 @@ LOCAL(8)                                                              LOCAL(8)
               sions (user+foo).
 
        <b><a href="postconf.5.html#require_home_directory">require_home_directory</a> (no)</b>
-              Whether  or  not a <a href="local.8.html"><b>local</b>(8)</a> recipient's home direc-
-              tory must exist before mail delivery is  attempted.
+              Whether or not a <a href="local.8.html"><b>local</b>(8)</a> recipient's  home  direc-
+              tory  must exist before mail delivery is attempted.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
-              The  mail  system  name  that  is  prepended to the
-              process name in syslog  records,  so  that  "smtpd"
+              The mail system  name  that  is  prepended  to  the
+              process  name  in  syslog  records, so that "smtpd"
               becomes, for example, "postfix/smtpd".
 
 <b>FILES</b>
@@ -579,14 +587,14 @@ LOCAL(8)                                                              LOCAL(8)
        syslogd(8), system logging
 
 <b>LICENSE</b>
-       The  Secure  Mailer  license must be distributed with this
+       The Secure Mailer license must be  distributed  with  this
        software.
 
 <b>HISTORY</b>
        The <b>Delivered-To:</b> message header appears in the <b>qmail</b> sys-
        tem by Daniel Bernstein.
 
-       The  <i>maildir</i>  structure  appears  in  the  <b>qmail</b> system by
+       The <i>maildir</i> structure  appears  in  the  <b>qmail</b>  system  by
        Daniel Bernstein.
 
 <b>AUTHOR(S)</b>
index ae506d962138fc32aaca842c8f83f89133ccabe6..80d3d65a8eadd9eadd6bb56eacbcb7dfc9a2b0df 100644 (file)
@@ -272,61 +272,71 @@ PIPE(8)                                                                PIPE(8)
                      This information is modified by the  <b>u</b>  flag
                      for case folding.
 
+<b>STANDARDS</b>
+       <a href="http://www.faqs.org/rfcs/rfc3463.html">RFC 3463</a> (Enhanced status codes)
+
 <b>DIAGNOSTICS</b>
        Command  exit status codes are expected to follow the con-
-       ventions defined in &lt;<b>sysexits.h</b>&gt;.
+       ventions defined in &lt;<b>sysexits.h</b>&gt;.   Exit  status  0  means
+       normal successful completion.
+
+       Postfix  version  2.3  and  later  support  <a href="http://www.faqs.org/rfcs/rfc3463.html">RFC 3463</a>-style
+       enhanced status codes.  If a  command  terminates  with  a
+       non-zero  exit  status, and the command output begins with
+       an enhanced status code, this status code takes precedence
+       over the non-zero exit status.
 
-       Problems and transactions are logged to <b>syslogd</b>(8).   Cor-
-       rupted  message files are marked so that the queue manager
+       Problems  and transactions are logged to <b>syslogd</b>(8).  Cor-
+       rupted message files are marked so that the queue  manager
        can move them to the <b>corrupt</b> queue for further inspection.
 
 <b>SECURITY</b>
-       This  program  needs  a  dual personality 1) to access the
-       private Postfix queue and IPC mechanisms, and 2)  to  exe-
+       This program needs a dual personality  1)  to  access  the
+       private  Postfix  queue and IPC mechanisms, and 2) to exe-
        cute external commands as the specified user. It is there-
        fore security sensitive.
 
 <b>CONFIGURATION PARAMETERS</b>
-       Changes to <b>main.cf</b> are picked up automatically as  <a href="pipe.8.html"><b>pipe</b>(8)</a>
-       processes  run  for only a limited amount of time. Use the
+       Changes  to <b>main.cf</b> are picked up automatically as <a href="pipe.8.html"><b>pipe</b>(8)</a>
+       processes run for only a limited amount of time.  Use  the
        command "<b>postfix reload</b>" to speed up a change.
 
-       The text below provides  only  a  parameter  summary.  See
+       The  text  below  provides  only  a parameter summary. See
        <a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including examples.
 
 <b>RESOURCE AND RATE CONTROLS</b>
-       In  the text below, <i>transport</i> is the first field in a <b>mas-</b>
+       In the text below, <i>transport</i> is the first field in a  <b>mas-</b>
        <b>ter.cf</b> entry.
 
        <i>transport</i><b>_destination_concurrency_limit ($<a href="postconf.5.html#default_destination_concurrency_limit">default_destina</a>-</b>
        <b><a href="postconf.5.html#default_destination_concurrency_limit">tion_concurrency_limit</a>)</b>
               Limit the number of parallel deliveries to the same
-              destination,  for delivery via the named <i>transport</i>.
+              destination, for delivery via the named  <i>transport</i>.
               The limit is enforced by the Postfix queue manager.
 
        <i>transport</i><b>_destination_recipient_limit   ($<a href="postconf.5.html#default_destination_recipient_limit">default_destina</a>-</b>
        <b><a href="postconf.5.html#default_destination_recipient_limit">tion_recipient_limit</a>)</b>
-              Limit  the  number of recipients per message deliv-
-              ery, for delivery via  the  named  <i>transport</i>.   The
+              Limit the number of recipients per  message  deliv-
+              ery,  for  delivery  via  the named <i>transport</i>.  The
               limit is enforced by the Postfix queue manager.
 
        <i>transport</i><b>_time_limit ($<a href="postconf.5.html#command_time_limit">command_time_limit</a>)</b>
-              Limit  the  time  for delivery to external command,
+              Limit the time for delivery  to  external  command,
               for delivery via the named <i>transport</i>.  The limit is
               enforced by the pipe delivery agent.
 
 <b>MISCELLANEOUS CONTROLS</b>
        <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
-              The  default  location  of  the Postfix main.cf and
+              The default location of  the  Postfix  main.cf  and
               master.cf configuration files.
 
        <b><a href="postconf.5.html#daemon_timeout">daemon_timeout</a> (18000s)</b>
-              How much time a Postfix daemon process may take  to
-              handle  a  request  before  it  is  terminated by a
+              How  much time a Postfix daemon process may take to
+              handle a request  before  it  is  terminated  by  a
               built-in watchdog timer.
 
        <b><a href="postconf.5.html#export_environment">export_environment</a> (see 'postconf -d' output)</b>
-              The list of environment variables  that  a  Postfix
+              The  list  of  environment variables that a Postfix
               process will export to non-Postfix processes.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
@@ -338,24 +348,24 @@ PIPE(8)                                                                PIPE(8)
               and most Postfix daemon processes.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The  maximum  amount  of  time that an idle Postfix
-              daemon process waits for the next  service  request
+              The maximum amount of time  that  an  idle  Postfix
+              daemon  process  waits for the next service request
               before exiting.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
-              The  maximal number of connection requests before a
+              The maximal number of connection requests before  a
               Postfix daemon process terminates.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The process ID  of  a  Postfix  command  or  daemon
+              The  process  ID  of  a  Postfix  command or daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The  process  name  of  a Postfix command or daemon
+              The process name of a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The location of the Postfix top-level queue  direc-
+              The  location of the Postfix top-level queue direc-
               tory.
 
        <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> (empty)</b>
@@ -366,8 +376,8 @@ PIPE(8)                                                                PIPE(8)
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
-              The mail system  name  that  is  prepended  to  the
-              process  name  in  syslog  records, so that "smtpd"
+              The  mail  system  name  that  is  prepended to the
+              process name in syslog  records,  so  that  "smtpd"
               becomes, for example, "postfix/smtpd".
 
 <b>SEE ALSO</b>
@@ -379,7 +389,7 @@ PIPE(8)                                                                PIPE(8)
        syslogd(8), system logging
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index 71800a22ced3007602110077d120534491a73926..e3803a1d9628a0f32c40bf147697449f2ba14ed1 100644 (file)
@@ -1710,7 +1710,10 @@ address, or Recipient address. </dd>
 <dt><b>$rbl_code</b></dt>
 
 <dd>The numerical SMTP response code, as specified with the
-<a href="postconf.5.html#maps_rbl_reject_code">maps_rbl_reject_code</a> configuration parameter. </dd>
+<a href="postconf.5.html#maps_rbl_reject_code">maps_rbl_reject_code</a> configuration parameter. Note: The numerical
+SMTP response code is required, and must appear at the start of the
+reply. With Postfix 2.3 and later this information may be followed
+by an <a href="http://www.faqs.org/rfcs/rfc3463.html">RFC 3463</a> enhanced status code. </dd>
 
 <dt><b>$rbl_domain</b></dt>
 
index 6d2f13dc8916cfcccc6a918a4099bfcd937e183a..3c3e391bc82084a133bc56d7919c84561a7c3143 100644 (file)
@@ -56,12 +56,13 @@ SMTP(8)                                                                SMTP(8)
        <a href="http://www.faqs.org/rfcs/rfc1652.html">RFC 1652</a> (8bit-MIME transport)
        <a href="http://www.faqs.org/rfcs/rfc1870.html">RFC 1870</a> (Message Size Declaration)
        <a href="http://www.faqs.org/rfcs/rfc2045.html">RFC 2045</a> (MIME: Format of Internet Message Bodies)
-       <a href="http://www.faqs.org/rfcs/rfc2034.html">RFC 2034</a> (Enhanced Error Codes)
+       <a href="http://www.faqs.org/rfcs/rfc2034.html">RFC 2034</a> (Enhanced Status Codes)
        <a href="http://www.faqs.org/rfcs/rfc2046.html">RFC 2046</a> (MIME: Media Types)
        <a href="http://www.faqs.org/rfcs/rfc2554.html">RFC 2554</a> (AUTH command)
        <a href="http://www.faqs.org/rfcs/rfc2821.html">RFC 2821</a> (SMTP protocol)
        <a href="http://www.faqs.org/rfcs/rfc2920.html">RFC 2920</a> (SMTP Pipelining)
        <a href="http://www.faqs.org/rfcs/rfc3207.html">RFC 3207</a> (STARTTLS command)
+       <a href="http://www.faqs.org/rfcs/rfc3463.html">RFC 3463</a> (Enhanced Status Codes)
 
 <b>DIAGNOSTICS</b>
        Problems  and transactions are logged to <b>syslogd</b>(8).  Cor-
index 7eedc495c2ef27d3b022c64a4c7ada42561aa3ad..358c995624ac85ad7d35b551a8565f997cab910c 100644 (file)
@@ -43,11 +43,12 @@ SMTPD(8)                                                              SMTPD(8)
        <a href="http://www.faqs.org/rfcs/rfc1869.html">RFC 1869</a> (SMTP service extensions)
        <a href="http://www.faqs.org/rfcs/rfc1870.html">RFC 1870</a> (Message Size Declaration)
        <a href="http://www.faqs.org/rfcs/rfc1985.html">RFC 1985</a> (ETRN command)
-       <a href="http://www.faqs.org/rfcs/rfc2034.html">RFC 2034</a> (Enhanced Error Codes)
+       <a href="http://www.faqs.org/rfcs/rfc2034.html">RFC 2034</a> (Enhanced Status Codes)
        <a href="http://www.faqs.org/rfcs/rfc2554.html">RFC 2554</a> (AUTH command)
        <a href="http://www.faqs.org/rfcs/rfc2821.html">RFC 2821</a> (SMTP protocol)
        <a href="http://www.faqs.org/rfcs/rfc2920.html">RFC 2920</a> (SMTP Pipelining)
        <a href="http://www.faqs.org/rfcs/rfc3207.html">RFC 3207</a> (STARTTLS command)
+       <a href="http://www.faqs.org/rfcs/rfc3463.html">RFC 3463</a> (Enhanced Status Codes)
 
 <b>DIAGNOSTICS</b>
        Problems and transactions are logged to <b>syslogd</b>(8).
index 4e3570cd50711438377e1990a9a0940a92cad99e..73a89278e5c6115f5b2061e17926f5d5feeb2607 100644 (file)
@@ -929,7 +929,10 @@ The blacklisted entity type: Client host, Helo command, Sender
 address, or Recipient address.
 .IP "\fB$rbl_code\fR"
 The numerical SMTP response code, as specified with the
-maps_rbl_reject_code configuration parameter.
+maps_rbl_reject_code configuration parameter. Note: The numerical
+SMTP response code is required, and must appear at the start of the
+reply. With Postfix 2.3 and later this information may be followed
+by an RFC 3463 enhanced status code.
 .IP "\fB$rbl_domain\fR"
 The RBL domain where $rbl_what is blacklisted.
 .IP "\fB$rbl_reason\fR"
index 215ee975dbd44e9f919f6592a8f5220757ee3a44..1ede41979d1979c1f3912f7645af1e0241404e25 100644 (file)
@@ -17,7 +17,7 @@ delivery requests from
 the queue manager. Each request specifies a queue file, a sender
 address, a domain or host name that is treated as the reason for
 discarding the mail, and recipient information.
-The reason may be prefixed with an RFC 1893-compatible detail code.
+The reason may be prefixed with an RFC 3463-compatible detail code.
 This program expects to be run from the \fBmaster\fR(8) process
 manager.
 
index a0f0b996f2c97968cc565c932ed84813388e07d8..6f10a50079b5451fa033537e4f472f4849025829 100644 (file)
@@ -17,7 +17,7 @@ requests from
 the queue manager. Each request specifies a queue file, a sender
 address, a domain or host name that is treated as the reason for
 non-delivery, and recipient information.
-The reason may be prefixed with an RFC 1893-compatible detail code.
+The reason may be prefixed with an RFC 3463-compatible detail code.
 This program expects to be run from the \fBmaster\fR(8) process
 manager.
 
index 13077bd88e809658da14c6749642d8bad39ceb8c..3874e254c9ef0622517f08f20f97bc5b0524cac0 100644 (file)
@@ -60,10 +60,11 @@ RFC 1651 (SMTP service extensions)
 RFC 1652 (8bit-MIME transport)
 RFC 1870 (Message Size Declaration)
 RFC 2033 (LMTP protocol)
-RFC 2034 (Enhanced Error Codes)
+RFC 2034 (Enhanced Status codes)
 RFC 2554 (AUTH command)
 RFC 2821 (SMTP protocol)
 RFC 2920 (SMTP Pipelining)
+RFC 3463 (Enhanced Status codes)
 .SH DIAGNOSTICS
 .ad
 .fi
index 7165dddf3989d80b63e3294d4587957341ff7128..3ff4dfc948bc487f70d0d6641689940bbe8c5e84 100644 (file)
@@ -185,6 +185,13 @@ error) is captured for inclusion with non-delivery status reports.
 A command is forcibly terminated if it does not complete within
 \fBcommand_time_limit\fR seconds.  Command exit status codes are
 expected to follow the conventions defined in <\fBsysexits.h\fR>.
+Exit status 0 means normal successful completion.
+
+Postfix version 2.3 and later support RFC 3463-style enhanced
+status codes.  If a command terminates with a non-zero exit
+status, and the command output begins with an enhanced
+status code, this status code takes precedence over the
+non-zero exit status.
 
 A limited amount of message context is exported via environment
 variables. Characters that may have special meaning to the shell
@@ -317,6 +324,7 @@ parameter.
 .na
 .nf
 RFC 822 (ARPA Internet Text Messages)
+RFC 3463 (Enhanced status codes)
 .SH DIAGNOSTICS
 .ad
 .fi
index ae9043a256b938bd01272ab5894b1d723314be53..5aefe102fad57e2c8199c0055999b0ec26762bee 100644 (file)
@@ -221,11 +221,22 @@ into as many command-line arguments as there are recipients.
 .sp
 This information is modified by the \fBu\fR flag for case folding.
 .RE
+.SH "STANDARDS"
+.na
+.nf
+RFC 3463 (Enhanced status codes)
 .SH DIAGNOSTICS
 .ad
 .fi
 Command exit status codes are expected to
 follow the conventions defined in <\fBsysexits.h\fR>.
+Exit status 0 means normal successful completion.
+
+Postfix version 2.3 and later support RFC 3463-style enhanced
+status codes.  If a command terminates with a non-zero exit
+status, and the command output begins with an enhanced
+status code, this status code takes precedence over the
+non-zero exit status.
 
 Problems and transactions are logged to \fBsyslogd\fR(8).
 Corrupted message files are marked so that the queue manager
index 8cbc7ca51f0f26578e25a1cf87c831c222babec2..686b7cfa871a602e3d60efd48c9abb0410bef12e 100644 (file)
@@ -57,12 +57,13 @@ RFC 1651 (SMTP service extensions)
 RFC 1652 (8bit-MIME transport)
 RFC 1870 (Message Size Declaration)
 RFC 2045 (MIME: Format of Internet Message Bodies)
-RFC 2034 (Enhanced Error Codes)
+RFC 2034 (Enhanced Status Codes)
 RFC 2046 (MIME: Media Types)
 RFC 2554 (AUTH command)
 RFC 2821 (SMTP protocol)
 RFC 2920 (SMTP Pipelining)
 RFC 3207 (STARTTLS command)
+RFC 3463 (Enhanced Status Codes)
 .SH DIAGNOSTICS
 .ad
 .fi
index f6fb56d4e0be03d6449385321336a3adedf87667..335f81622846066ac51637d52f4f394f1c350aef 100644 (file)
@@ -46,11 +46,12 @@ RFC 1652 (8bit-MIME transport)
 RFC 1869 (SMTP service extensions)
 RFC 1870 (Message Size Declaration)
 RFC 1985 (ETRN command)
-RFC 2034 (Enhanced Error Codes)
+RFC 2034 (Enhanced Status Codes)
 RFC 2554 (AUTH command)
 RFC 2821 (SMTP protocol)
 RFC 2920 (SMTP Pipelining)
 RFC 3207 (STARTTLS command)
+RFC 3463 (Enhanced Status Codes)
 .SH DIAGNOSTICS
 .ad
 .fi
index 83eedcddafbeb0230d9862dd9206950f71b7c4a9..a715bea4b25274eac44c2dda4af23fabc546dfdb 100644 (file)
@@ -992,7 +992,10 @@ address, or Recipient address. </dd>
 <dt><b>$rbl_code</b></dt>
 
 <dd>The numerical SMTP response code, as specified with the
-maps_rbl_reject_code configuration parameter. </dd>
+maps_rbl_reject_code configuration parameter. Note: The numerical
+SMTP response code is required, and must appear at the start of the
+reply. With Postfix 2.3 and later this information may be followed
+by an RFC 3463 enhanced status code. </dd>
 
 <dt><b>$rbl_domain</b></dt>
 
index d4f166d61c166272449ad912e8962c3986e818c6..6f7fd18693bf88adcace3e9aaa53d07fe9e3e9fd 100644 (file)
@@ -11,7 +11,7 @@
 /*     the queue manager. Each request specifies a queue file, a sender
 /*     address, a domain or host name that is treated as the reason for
 /*     discarding the mail, and recipient information.
-/*     The reason may be prefixed with an RFC 1893-compatible detail code.
+/*     The reason may be prefixed with an RFC 3463-compatible detail code.
 /*     This program expects to be run from the \fBmaster\fR(8) process
 /*     manager.
 /*
index 6fedb17484edd13891c783f024452b02f23505ed..348772af00ecd047278ba3be47cfac6b5abe75ba 100644 (file)
@@ -11,7 +11,7 @@
 /*     the queue manager. Each request specifies a queue file, a sender
 /*     address, a domain or host name that is treated as the reason for
 /*     non-delivery, and recipient information.
-/*     The reason may be prefixed with an RFC 1893-compatible detail code.
+/*     The reason may be prefixed with an RFC 3463-compatible detail code.
 /*     This program expects to be run from the \fBmaster\fR(8) process
 /*     manager.
 /*
index e91b98f113361172ecfd784210f1c07c56826994..ec70f10a95a8328fa181c60476a12fabad348f84 100644 (file)
@@ -620,12 +620,61 @@ deliver_request.o: mail_open_ok.h
 deliver_request.o: mail_proto.h
 deliver_request.o: mail_queue.h
 deliver_request.o: recipient_list.h
+dict_ldap.o: ../../include/argv.h
+dict_ldap.o: ../../include/binhash.h
+dict_ldap.o: ../../include/dict.h
+dict_ldap.o: ../../include/match_list.h
+dict_ldap.o: ../../include/match_ops.h
+dict_ldap.o: ../../include/msg.h
+dict_ldap.o: ../../include/mymalloc.h
+dict_ldap.o: ../../include/stringops.h
 dict_ldap.o: ../../include/sys_defs.h
+dict_ldap.o: ../../include/vbuf.h
+dict_ldap.o: ../../include/vstream.h
+dict_ldap.o: ../../include/vstring.h
+dict_ldap.o: cfg_parser.h
+dict_ldap.o: db_common.h
 dict_ldap.o: dict_ldap.c
+dict_ldap.o: dict_ldap.h
+dict_ldap.o: string_list.h
+dict_mysql.o: ../../include/argv.h
+dict_mysql.o: ../../include/dict.h
+dict_mysql.o: ../../include/events.h
+dict_mysql.o: ../../include/find_inet.h
+dict_mysql.o: ../../include/match_list.h
+dict_mysql.o: ../../include/match_ops.h
+dict_mysql.o: ../../include/msg.h
+dict_mysql.o: ../../include/mymalloc.h
+dict_mysql.o: ../../include/myrand.h
+dict_mysql.o: ../../include/split_at.h
 dict_mysql.o: ../../include/sys_defs.h
+dict_mysql.o: ../../include/vbuf.h
+dict_mysql.o: ../../include/vstream.h
+dict_mysql.o: ../../include/vstring.h
+dict_mysql.o: cfg_parser.h
+dict_mysql.o: db_common.h
 dict_mysql.o: dict_mysql.c
+dict_mysql.o: dict_mysql.h
+dict_mysql.o: string_list.h
+dict_pgsql.o: ../../include/argv.h
+dict_pgsql.o: ../../include/dict.h
+dict_pgsql.o: ../../include/events.h
+dict_pgsql.o: ../../include/find_inet.h
+dict_pgsql.o: ../../include/match_list.h
+dict_pgsql.o: ../../include/match_ops.h
+dict_pgsql.o: ../../include/msg.h
+dict_pgsql.o: ../../include/mymalloc.h
+dict_pgsql.o: ../../include/myrand.h
+dict_pgsql.o: ../../include/split_at.h
 dict_pgsql.o: ../../include/sys_defs.h
+dict_pgsql.o: ../../include/vbuf.h
+dict_pgsql.o: ../../include/vstream.h
+dict_pgsql.o: ../../include/vstring.h
+dict_pgsql.o: cfg_parser.h
+dict_pgsql.o: db_common.h
 dict_pgsql.o: dict_pgsql.c
+dict_pgsql.o: dict_pgsql.h
+dict_pgsql.o: string_list.h
 dict_proxy.o: ../../include/argv.h
 dict_proxy.o: ../../include/attr.h
 dict_proxy.o: ../../include/dict.h
index e1a1c541186517fb12fe1f9b1deaf4152697accd..b7b50df7520225e719e3818c91877831e9904521 100644 (file)
 /*     Name of the host that the message could not be delivered to.
 /*     This information is used for syslogging only.
 /* .IP dsn
-/*     X.YY.ZZ Error detail as specified in RFC 1893.
+/*     X.YY.ZZ Error detail as specified in RFC 3463.
 /* .IP entry
 /*     Message arrival time.
 /* .IP orig_rcpt
index 0910102b046b84a4a5cfa717842a75c6c86dc889..11ba3606198d479a3157545570439c332a5a816b 100644 (file)
@@ -10,7 +10,7 @@
 /* .in +4
 /*         const unsigned status;      /* cleanup status */
 /*         const int smtp;     /* RFC 821 */
-/*         const char *dsn;    /* RFC 1893 */
+/*         const char *dsn;    /* RFC 3463 */
 /*         const char *text;   /* free text */
 /* .in -4
 /*     } CLEANUP_STAT_DETAIL;
index d45efcc09626c6bd8d9bda89244db13a9e518de6..238ae0c077d00b547a50e8cf8e767fb7495722c5 100644 (file)
@@ -71,7 +71,7 @@
 typedef struct {
     const unsigned status;             /* CLEANUP_STAT_MUMBLE */
     const int smtp;                    /* RFC 821 */
-    const char *dsn;                   /* RFC 1893 */
+    const char *dsn;                   /* RFC 3463 */
     const char *text;                  /* free text */
 } CLEANUP_STAT_DETAIL;
 
index d4f42cb7333d23ca271ad2f18b2a5bb25562e69e..17ba21167233140d5c28f1e0a0dbf3ffbad17788 100644 (file)
 /* .IP entry
 /*     Message arrival time.
 /* .IP dsn
-/*     X.YY.ZZ Error detail as specified in RFC 1893.
+/*     X.YY.ZZ Error detail as specified in RFC 3463.
 /* .IP format
 /*     The reason for non-delivery.
 /* .IP ap
index 26c18ecf2529eef530a53d984b0dadb0a369b48b..26580a5744756e66af52f37abf909c2f7d184132 100644 (file)
@@ -65,7 +65,7 @@
 /*     by the caller when all delivery to the destination in
 /*     \fInexthop\fR should be deferred. The value of the
 /*     \fIhop_status\fR member is the reason, with optional
-/*     RFC 1893-style detail at the beginning; it is passed
+/*     RFC 3463-style detail at the beginning; it is passed
 /*     to myfree().
 /*
 /*     deliver_request_done() reports the delivery status back to the
index 35bec1d614728c588e82024d1ee85ddbbce6797f..677dabdae52efb15f778aa5586ba4f02cf10bc0a 100644 (file)
@@ -8,7 +8,7 @@
 /*
 /*     typedef struct {
 /* .in +4
-/*             char dsn[...];          /* RFC 1893 */
+/*             char dsn[...];          /* RFC 3463 */
 /*             const char *text;       /* Free text */
 /* .in -4
 /*     } DSN_SPLIT;
@@ -24,7 +24,7 @@
 /*
 /*     typedef struct {
 /* .in +4
-/*             char dsn[...];          /* RFC 1893 */
+/*             char dsn[...];          /* RFC 3463 */
 /*             VSTRING *text;          /* Free text */
 /* .in -4
 /*     } DSN_VSTRING;
 /*     size_t  dsn_valid(text)
 /*     const char *text;
 /* DESCRIPTION
-/*     The functions in this module manipulate pairs of RFC 1893
+/*     The functions in this module manipulate pairs of RFC 3463
 /*     X.X.X detail codes and descriptive free text.
 /*
-/*     dsn_split() splits text into an RFC 1893 detail code and
+/*     dsn_split() splits text into an RFC 3463 detail code and
 /*     descriptive free text.  When the text does not start with
 /*     a detail code, the specified default detail code is used
 /*     instead.  Whitespace before the optional detail code or
 /*     text is skipped.  dsn_split() returns a copy of the RFC
-/*     1893 detail code, and returns a pointer to (not copy of)
+/*     3463 detail code, and returns a pointer to (not copy of)
 /*     the remainder of the text.  The result value is the first
 /*     argument.
 /*
-/*     dsn_prepend() prepends the specified default RFC 1893 detail
+/*     dsn_prepend() prepends the specified default RFC 3463 detail
 /*     code to the specified text if no detail code is present in
 /*     the text. This function produces the same result as calling
 /*     concatenate() with the results from dsn_split().  The result
@@ -63,7 +63,7 @@
 /*     detail code or text is skipped.
 /*
 /*     dsn_vstring_alloc() creates initialized storage for an RFC
-/*     1893 detail code and descriptive free text.
+/*     3463 detail code and descriptive free text.
 /*
 /*     dsn_vstring_update() updates the detail code, the descriptive
 /*     free text, or both. Specify a null pointer (or zero-length
 /*     dsn_vstring_free() recycles the storage that was allocated
 /*     by dsn_vstring_alloc() and dsn_vstring_update().
 /*
-/*     dsn_valid() returns the length of the RFC 1893 detail code
+/*     dsn_valid() returns the length of the RFC 3463 detail code
 /*     at the beginning of text, or zero. It does not skip initial
 /*     whitespace.
 /*
 /*     Arguments:
 /* .IP def_dsn
-/*     Null-terminated default RFC 1893 detail code that will be
+/*     Null-terminated default RFC 3463 detail code that will be
 /*     used when the free text does not start with one.
 /* .IP dp
 /*     Pointer to storage for copy of DSN detail code, and for
 /*     pointer to free text.
 /* .IP dsn
-/*     Null-terminated RFC 1893 detail code.
+/*     Null-terminated RFC 3463 detail code.
 /* .IP text
 /*     Null-terminated free text.
 /* .IP vp
 
 #include <dsn_util.h>
 
-/* dsn_valid - check RFC 1893 enhanced status code, return length or zero */
+/* dsn_valid - check RFC 3463 enhanced status code, return length or zero */
 
 size_t  dsn_valid(const char *text)
 {
@@ -157,7 +157,7 @@ DSN_SPLIT *dsn_split(DSN_SPLIT *dp, const char *def_dsn, const char *text)
     size_t  len;
 
     /*
-     * Look for an optional RFC 1893 enhanced status code.
+     * Look for an optional RFC 3463 enhanced status code.
      * 
      * XXX If we want to enforce that the first digit of the status code in the
      * text matches the default status code, then pipe_command() needs to be
index a9323533e45415458a62f46f2eb4ce8992fac851..fcd3622c40de14ae0cda5101e104189778eed59f 100644 (file)
@@ -29,7 +29,7 @@
   * Split flat text into detail code and free text.
   */
 typedef struct {
-    char    dsn[DSN_BUFSIZE];          /* RFC 1893 X.XXX.XXX detail */
+    char    dsn[DSN_BUFSIZE];          /* RFC 3463 X.XXX.XXX detail */
     const char *text;                  /* free text */
 } DSN_SPLIT;
 
@@ -50,7 +50,7 @@ extern char *dsn_prepend(const char *, const char *);
   * Easy to update pair of detail code and free text.
   */
 typedef struct {
-    char    dsn[DSN_LEN + 1];          /* RFC 1893 X.XXX.XXX detail */
+    char    dsn[DSN_LEN + 1];          /* RFC 3463 X.XXX.XXX detail */
     VSTRING *vstring;                  /* free text */
 } DSN_VSTRING;
 
index 3f05d474e002b1fbfa6d06cf50e4cc8e5426cb2a..f422b128a085b86ac5d6c71c1270cd6f2e4c8dc3 100644 (file)
@@ -53,7 +53,7 @@
 /* .IP status
 /*     bounced, deferred, sent, and so on.
 /* .IP detail
-/*     X.YY.ZZ Error detail as specified in RFC 1893.
+/*     X.YY.ZZ Error detail as specified in RFC 3463.
 /* .IP entry
 /*     Message arrival time.
 /* .IP format
index 90423eca394e993124ce069e524f9b2a117d3194..3aba2b140a4da59b4ef2292ac339a467e5195115 100644 (file)
@@ -269,7 +269,8 @@ int     mail_copy(const char *sender,
        dsn_vstring_update(why, TRY_AGAIN_ERROR(errno) ? "4.3.0" : "5.3.0",
                           "error reading message: %m");
     if (why && write_error)
-       dsn_vstring_update(why, mbox_dsn(errno), "error writing message: %m");
+       dsn_vstring_update(why, mbox_dsn(errno, "5.3.0"),
+                          "error writing message: %m");
 
     /*
      * Use flag+errno description when the optional verbose description is
index 6a5255cdb8c43f341f01e33e3b80c9dac48fd952..ebce57eaa3986b87fc82ff2dc1cd984741a748ce 100644 (file)
@@ -1689,7 +1689,7 @@ extern int var_access_map_code;
 extern char *var_rbl_reply_maps;
 
 #define VAR_DEF_RBL_REPLY      "default_rbl_reply"
-#define DEF_DEF_RBL_REPLY      "$rbl_code 5.7.1 Service unavailable; $rbl_class [$rbl_what] blocked using $rbl_domain${rbl_reason?; $rbl_reason}"
+#define DEF_DEF_RBL_REPLY      "$rbl_code Service unavailable; $rbl_class [$rbl_what] blocked using $rbl_domain${rbl_reason?; $rbl_reason}"
 extern char *var_def_rbl_reply;
 
 #define REJECT_MAPS_RBL                "reject_maps_rbl"       /* backwards compat */
index f7fd1ccf206c42d742042b3e99d687917d75c111..8a74d56bf53d2dc4cb9f00b58787eba436237638 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only.
   */
-#define MAIL_RELEASE_DATE      "20050327"
+#define MAIL_RELEASE_DATE      "20050328"
 #define MAIL_VERSION_NUMBER    "2.3"
 
 #define VAR_MAIL_VERSION       "mail_version"
index 991f49ce9ac39cd0b4a2b92b90cf6ef1fa52f194..181ac17c70fc6157cfdd12dce803f42dd3fbbb69 100644 (file)
@@ -13,7 +13,8 @@
 /* .in -4
 /*     } MBOX;
 /*
-/*     MBOX    *mbox_open(path, flags, mode, st, user, group, lock_style, why)
+/*     MBOX    *mbox_open(path, flags, mode, st, user, group, lock_style,
+/*                             def_dsn, why)
 /*     const char *path;
 /*     int     flags;
 /*     int     mode;
 /*     uid_t   user;
 /*     gid_t   group;
 /*     int     lock_style;
+/*     const char *def_dsn;
 /*     DSN_VSTRING *why;
 /*
 /*     void    mbox_release(mbox)
 /*     MBOX    *mbox;
 /*
-/*     const char *mbox_dsn(err)
+/*     const char *mbox_dsn(err, def_dsn)
 /*     int     err;
+/*     const char *def_dsn;
 /* DESCRIPTION
 /*     This module manages access to UNIX mailbox-style files.
 /*
 /*     The \fBlock_style\fR argument specifies a lock style from
 /*     mbox_lock_mask(). Locks are applied to regular files only.
 /*     The result is a handle that must be destroyed by mbox_release().
+/*     The \fBdef_dsn\fR argument is given to mbox_dsn().
 /*
 /*     mbox_release() releases the named mailbox. It is up to the
 /*     application to close the stream.
 /*
 /*     mbox_dsn() translates an errno value to a mailbox related
-/*     DSN detail code.
+/*     enhanced status code.
+/* .IP "EAGAIN, ESTALE"
+/*     These result in a 4.2.0 soft error (mailbox problem).
+/* .IP ENOSPC
+/*     This results in a 4.3.0 soft error (mail system full).
+/* .IP "EDQUOT, EFBIG"
+/*     These result in a 5.2.2 hard error (mailbox full).
+/* .PP
+/*     All other errors are assigned the specified default error
+/*     code. Typically, one would specify 4.2.0 or 5.2.0.
 /* DIAGNOSTICS
 /*     mbox_open() returns a null pointer in case of problems, and
 /*     sets errno to EAGAIN if someone else has exclusive access.
 
 MBOX   *mbox_open(const char *path, int flags, int mode, struct stat * st,
                          uid_t chown_uid, gid_t chown_gid,
-                         int lock_style, DSN_VSTRING *why)
+                         int lock_style, const char *def_dsn,
+                         DSN_VSTRING *why)
 {
     struct stat local_statbuf;
     MBOX   *mp;
@@ -113,7 +127,7 @@ MBOX   *mbox_open(const char *path, int flags, int mode, struct stat * st,
        st = &local_statbuf;
     if ((fp = safe_open(path, flags | O_NONBLOCK, mode, st,
                        chown_uid, chown_gid, why->vstring)) == 0) {
-       dsn_vstring_update(why, mbox_dsn(errno), "");
+       dsn_vstring_update(why, mbox_dsn(errno, def_dsn), "");
        return (0);
     }
     close_on_exec(vstream_fileno(fp), CLOSE_ON_EXEC);
@@ -137,13 +151,13 @@ MBOX   *mbox_open(const char *path, int flags, int mode, struct stat * st,
        if (dot_lockfile(path, why->vstring) == 0) {
            locked |= MBOX_DOT_LOCK;
        } else if (errno == EEXIST) {
-           dsn_vstring_update(why, mbox_dsn(EAGAIN), "");
+           dsn_vstring_update(why, mbox_dsn(EAGAIN, def_dsn), "");
            vstream_fclose(fp);
            return (0);
        } else if (lock_style & MBOX_DOT_LOCK_MAY_FAIL) {
            msg_warn("%s", vstring_str(why->vstring));
        } else {
-           dsn_vstring_update(why, mbox_dsn(errno), "");
+           dsn_vstring_update(why, mbox_dsn(errno, def_dsn), "");
            vstream_fclose(fp);
            return (0);
        }
@@ -163,7 +177,7 @@ MBOX   *mbox_open(const char *path, int flags, int mode, struct stat * st,
            && HUNKY_DORY(MBOX_FCNTL_LOCK, MYFLOCK_STYLE_FCNTL)) {
            locked |= lock_style;
        } else {
-           dsn_vstring_update(why, mbox_dsn(errno), "");
+           dsn_vstring_update(why, mbox_dsn(errno, def_dsn), "");
            if (locked & MBOX_DOT_LOCK)
                dot_unlockfile(path);
            vstream_fclose(fp);
@@ -187,8 +201,8 @@ void    mbox_release(MBOX *mp)
      * (AFS), the only way to find out if a file was written successfully is
      * to close it, and therefore the close() operation is in the mail_copy()
      * routine. If we really insist on owning the vstream member, then we
-     * should export appropriate methods that mail_copy() can use in order
-     * to manipulate a message stream.
+     * should export appropriate methods that mail_copy() can use in order to
+     * manipulate a message stream.
      */
     if (mp->locked & MBOX_DOT_LOCK)
        dot_unlockfile(mp->path);
@@ -198,10 +212,10 @@ void    mbox_release(MBOX *mp)
 
 /* mbox_dsn - map errno value to mailbox-related DSN detail */
 
-const char *mbox_dsn(int err)
+const char *mbox_dsn(int err, const char *def_dsn)
 {
 #define TRY_AGAIN_ERROR(e) \
-       (e == EACCES || e == EAGAIN || e == ESTALE)
+       (e == EAGAIN || e == ESTALE)
 #define SYSTEM_FULL_ERROR(e) \
        (e == ENOSPC)
 #define MBOX_FULL_ERROR(e) \
@@ -210,5 +224,5 @@ const char *mbox_dsn(int err)
     return (TRY_AGAIN_ERROR(err) ? "4.2.0" :
            SYSTEM_FULL_ERROR(err) ? "4.3.0" :
            MBOX_FULL_ERROR(err) ? "5.2.2" :
-           "5.2.0");
+           def_dsn);
 }
index e904cd8c60842b975e674b3903c42f9469847131..511fe4cdc4fcadd588806e2b42d9265944e7aae6 100644 (file)
   * External interface.
   */
 typedef struct {
-    char    *path;                     /* saved path, for dot_unlock */
+    char   *path;                      /* saved path, for dot_unlock */
     VSTREAM *fp;                       /* open stream or null */
     int     locked;                    /* what locks were set */
 } MBOX;
-extern MBOX *mbox_open(const char *, int, int, struct stat *, uid_t, gid_t, int, DSN_VSTRING *);
+extern MBOX *mbox_open(const char *, int, int, struct stat *, uid_t, gid_t,
+                              int, const char *, DSN_VSTRING *);
 extern void mbox_release(MBOX *);
-extern const char *mbox_dsn(int);
+extern const char *mbox_dsn(int, const char *);
 
 /* LICENSE
 /* .ad
index 1e2ee88c0f91ee55cd3208ae2789d5410975de40..fca7632fa31ff2ac5746fda73fe3ea45aae2e27b 100644 (file)
@@ -16,7 +16,7 @@
 /*     output is captured for diagnostics purposes.
 /*
 /*     If the command invokes exit() with a non-zero status,
-/*     the delivery status is taken from an RFC 1893-style code
+/*     the delivery status is taken from an RFC 3463-style code
 /*     at the beginning of command output. If that information is
 /*     unavailable, the delivery status is taken from the command
 /*     exit status as per <sysexits.h>.
index e3410dda9aad918b57a12296c90005fece1f9302..aa99eea9dca7fb53e270166ff0d56afc23c50d37 100644 (file)
@@ -66,7 +66,7 @@
 /* .IP relay
 /*     Name of the host we're talking to.
 /* .IP dsn
-/*     X.YY.ZZ Error detail as specified in RFC 1893.
+/*     X.YY.ZZ Error detail as specified in RFC 3463.
 /* .IP entry
 /*     Message arrival time.
 /* .IP format
index cbb989ea78dbf9afd93d3fa997a765654b18c3e0..5aefca796d947854210b974ecb736d79c5a3773c 100644 (file)
@@ -9,7 +9,7 @@
 /*     typedef struct {
 /* .in +4
 /*         int   status;       /* exit status */
-/*         const char *dsn;    /* RFC 1893 */
+/*         const char *dsn;    /* RFC 3463 */
 /*         const char *text;   /* free text */
 /* .in -4
 /*     } SYS_EXITS_DETAIL;
index 9f2e0df18911748b0ac691deba1c3aad8cc2edf1..558f8ae6c2b6f5e15fd8c65a2b2c3c46e659f7ce 100644 (file)
@@ -70,7 +70,7 @@
 /* .IP entry
 /*     Message arrival time.
 /* .IP dsn
-/*     X.YY.ZZ Error detail as specified in RFC 1893.
+/*     X.YY.ZZ Error detail as specified in RFC 3463.
 /* .IP action
 /*     "deliverable", "undeliverable", and so on.
 /* .IP format
index a6ceed1bfb021bd0956387fc77febc01d11c41a0..c495bae959652adfa667d8cde2f02e32b2876466 100644 (file)
@@ -54,7 +54,7 @@
 /* .IP relay
 /*     Name of the host we're talking to.
 /* .IP dsn
-/*     X.YY.ZZ Error detail as specified in RFC 1893.
+/*     X.YY.ZZ Error detail as specified in RFC 3463.
 /* .IP entry
 /*     Message arrival time.
 /* .IP status
index 6b9206de687fe3ff4c1a71f7f2b840d7d66c644b..79b7ee3c579cef337734e00048fbf6e1875468bf 100644 (file)
 /*     RFC 1652 (8bit-MIME transport)
 /*     RFC 1870 (Message Size Declaration)
 /*     RFC 2033 (LMTP protocol)
-/*     RFC 2034 (Enhanced Error Codes)
+/*     RFC 2034 (Enhanced Status codes)
 /*     RFC 2554 (AUTH command)
 /*     RFC 2821 (SMTP protocol)
 /*     RFC 2920 (SMTP Pipelining)
+/*     RFC 3463 (Enhanced Status codes)
 /* DIAGNOSTICS
 /*     Problems and transactions are logged to \fBsyslogd\fR(8).
 /*     Corrupted message files are marked so that the queue manager can
index b5a0c702aab099d7167d5007c2a17c960cccbea4..ad00531bc2ebd751ee390164719607b0e820e374 100644 (file)
@@ -387,10 +387,12 @@ maildir.o: ../../include/mail_params.h
 maildir.o: ../../include/make_dirs.h
 maildir.o: ../../include/maps.h
 maildir.o: ../../include/mbox_conf.h
+maildir.o: ../../include/mbox_open.h
 maildir.o: ../../include/msg.h
 maildir.o: ../../include/mymalloc.h
 maildir.o: ../../include/recipient_list.h
 maildir.o: ../../include/resolve_clnt.h
+maildir.o: ../../include/safe_open.h
 maildir.o: ../../include/sane_fsops.h
 maildir.o: ../../include/sent.h
 maildir.o: ../../include/set_eugid.h
index 09c675aba85e4dcd430807ec474bb16353ea2b5a..55e72e94e622826dc75901975d48979135d0345a 100644 (file)
@@ -161,7 +161,8 @@ int     deliver_file(LOCAL_STATE state, USER_ATTR usr_attr, char *path)
     set_eugid(usr_attr.uid, usr_attr.gid);
     mp = mbox_open(path, O_APPEND | O_CREAT | O_WRONLY,
                   S_IRUSR | S_IWUSR, &st, -1, -1,
-                  local_mbox_lock_mask | MBOX_DOT_LOCK_MAY_FAIL, why);
+                  local_mbox_lock_mask | MBOX_DOT_LOCK_MAY_FAIL,
+                  "5.2.0", why);
     if (mp != 0) {
        if (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) {
            vstream_fclose(mp->fp);
index 7dfc6770ec0b059921cbf62cf0ffb96a5ae0c99c..83b11abd2b775c4fa8a3810a1d46fd3e5e6cae32 100644 (file)
 /*     A command is forcibly terminated if it does not complete within
 /*     \fBcommand_time_limit\fR seconds.  Command exit status codes are
 /*     expected to follow the conventions defined in <\fBsysexits.h\fR>.
+/*     Exit status 0 means normal successful completion.
+/*
+/*     Postfix version 2.3 and later support RFC 3463-style enhanced
+/*     status codes.  If a command terminates with a non-zero exit
+/*     status, and the command output begins with an enhanced
+/*     status code, this status code takes precedence over the
+/*     non-zero exit status.
 /*
 /*     A limited amount of message context is exported via environment
 /*     variables. Characters that may have special meaning to the shell
 /*     parameter.
 /* STANDARDS
 /*     RFC 822 (ARPA Internet Text Messages)
+/*     RFC 3463 (Enhanced status codes)
 /* DIAGNOSTICS
 /*     Problems and transactions are logged to \fBsyslogd\fR(8).
 /*     Corrupted message files are marked so that the queue
index 98fc13c4390c6b14cc7ae0776beadb5781fe6e17..a3f2723e2f67d7a8de760bacd2e492e698a64aeb 100644 (file)
@@ -186,7 +186,7 @@ static int deliver_mailbox_file(LOCAL_STATE state, USER_ATTR usr_attr)
     set_eugid(spool_uid, spool_gid);
     mp = mbox_open(mailbox, O_APPEND | O_WRONLY | O_CREAT,
                   S_IRUSR | S_IWUSR, &st, chown_uid, chown_gid,
-                  local_mbox_lock_mask, why);
+                  local_mbox_lock_mask, "5.2.0", why);
     if (mp != 0) {
        if (spool_uid != usr_attr.uid || spool_gid != usr_attr.gid)
            set_eugid(usr_attr.uid, usr_attr.gid);
index 9540a2c06556ba1bd35c99f68208b125adc30642..6d6611e92edcded41a1b3461dc582505c90f899f 100644 (file)
@@ -66,6 +66,7 @@
 #include <sent.h>
 #include <mail_params.h>
 #include <dsn_util.h>
+#include <mbox_open.h>
 
 /* Application-specific. */
 
@@ -189,9 +190,11 @@ int     deliver_maildir(LOCAL_STATE state, USER_ATTR usr_attr, char *path)
        && (errno != ENOENT
            || make_dirs(tmpdir, 0700) < 0
            || (dst = vstream_fopen(tmpfile, O_WRONLY | O_CREAT | O_EXCL, 0600)) == 0)) {
-       dsn_vstring_update(why, "5.2.0", "create maildir file %s: %m", tmpfile);
+       dsn_vstring_update(why, mbox_dsn(errno, "5.2.0"),
+                          "create maildir file %s: %m", tmpfile);
     } else if (fstat(vstream_fileno(dst), &st) < 0) {
-       dsn_vstring_update(why, "5.2.0", "create maildir file %s: %m", tmpfile);
+       dsn_vstring_update(why, mbox_dsn(errno, "5.2.0"),
+                          "create maildir file %s: %m", tmpfile);
     } else {
        vstring_sprintf(buf, "%lu.V%lxI%lxM%lu.%s",
                        (unsigned long) starttime.tv_sec,
@@ -206,7 +209,7 @@ int     deliver_maildir(LOCAL_STATE state, USER_ATTR usr_attr, char *path)
                && (errno != ENOENT
                    || (make_dirs(curdir, 0700), make_dirs(newdir, 0700)) < 0
                    || sane_link(tmpfile, newfile) < 0)) {
-               dsn_vstring_update(why, "5.2.0",
+               dsn_vstring_update(why, mbox_dsn(errno, "5.2.0"),
                                   "create maildir file %s: %m", newfile);
                mail_copy_status = MAIL_COPY_STAT_WRITE;
            }
index ef870c610660bdafa97cce6befe09d9a0dae55a2..dc0cd669bcea61fc704dbf3dce579f11605c20a4 100644 (file)
@@ -25,7 +25,7 @@
 /* .IP recipient
 /*     The recipient that will not be delivered.
 /* .IP dsn
-/*     RFC 1893 detail code.
+/*     RFC 3463 detail code.
 /* .IP format
 /*     Free-format text that describes why delivery will not happen.
 /* DIAGNOSTICS
index 8e1675b7e6c32ab51c5f611eb95185111a4390f3..573192b9d04126ae1ed2f0c6d9df3996f6b627c4 100644 (file)
@@ -47,7 +47,7 @@
 /* .IP transport
 /*     Specifies a message delivery transport.
 /* .IP dsn
-/*     X.YY.ZZ Error detail as specified in RFC 1893.
+/*     X.YY.ZZ Error detail as specified in RFC 3463.
 /* .IP reason
 /*     Free-format text that describes why delivery is deferred; this
 /*     used for logging purposes, and for updating the message-specific
index 38064111973b3508dbe5865b1070def033fa22e2..d4f6107d4edd408fa4b05d6e2366a26e659e0239 100644 (file)
 /* .sp
 /*     This information is modified by the \fBu\fR flag for case folding.
 /* .RE
+/* STANDARDS
+/*     RFC 3463 (Enhanced status codes)
 /* DIAGNOSTICS
 /*     Command exit status codes are expected to
 /*     follow the conventions defined in <\fBsysexits.h\fR>.
+/*     Exit status 0 means normal successful completion.
+/*
+/*     Postfix version 2.3 and later support RFC 3463-style enhanced
+/*     status codes.  If a command terminates with a non-zero exit
+/*     status, and the command output begins with an enhanced
+/*     status code, this status code takes precedence over the
+/*     non-zero exit status.
 /*
 /*     Problems and transactions are logged to \fBsyslogd\fR(8).
 /*     Corrupted message files are marked so that the queue manager
index b49596008e2b3e8f4fada20d5b278c7b93e3499e..60220c5b860ab2da5370af7e009a27f63f23dbbd 100644 (file)
@@ -222,7 +222,7 @@ int     main(int argc, char **argv)
     why = dsn_vstring_alloc(1);
     if ((mp = mbox_open(folder, O_APPEND | O_WRONLY | O_CREAT,
                        S_IRUSR | S_IWUSR, (struct stat *) 0,
-                       -1, -1, lock_mask, why)) == 0)
+                       -1, -1, lock_mask, "5.2.0", why)) == 0)
        msg_fatal("open file %s: %s", folder, vstring_str(why->vstring));
 
     /*
index 8daffb2d2aae09cb1ecb71aaf950ea8e3e7f997e..4526649854bb6a6c942742932ca10ff3c5e22917 100644 (file)
@@ -25,7 +25,7 @@
 /* .IP recipient
 /*     The recipient that will not be delivered.
 /* .IP dsn
-/*     RFC 1893 detail code.
+/*     RFC 3463 detail code.
 /* .IP format
 /*     Free-format text that describes why delivery will not happen.
 /* DIAGNOSTICS
index 59f1892e01faf90d795ee2aa025ef987b2ada5f9..08eede93aacfbe882b05de662a08d74d7bfa1c4d 100644 (file)
@@ -47,7 +47,7 @@
 /* .IP transport
 /*     Specifies a message delivery transport.
 /* .IP dsn
-/*     X.YY.ZZ Error detail as specified in RFC 1893.
+/*     X.YY.ZZ Error detail as specified in RFC 3463.
 /* .IP reason
 /*     Free-format text that describes why delivery is deferred; this
 /*     used for logging purposes, and for updating the message-specific
index 5455059fdd690afdef5febf44c6f052e097c0af2..a35f264a5ac6eeea40f362b87891c8538daf8bdd 100644 (file)
 /*     RFC 1652 (8bit-MIME transport)
 /*     RFC 1870 (Message Size Declaration)
 /*     RFC 2045 (MIME: Format of Internet Message Bodies)
-/*     RFC 2034 (Enhanced Error Codes)
+/*     RFC 2034 (Enhanced Status Codes)
 /*     RFC 2046 (MIME: Media Types)
 /*     RFC 2554 (AUTH command)
 /*     RFC 2821 (SMTP protocol)
 /*     RFC 2920 (SMTP Pipelining)
 /*     RFC 3207 (STARTTLS command)
+/*     RFC 3463 (Enhanced Status Codes)
 /* DIAGNOSTICS
 /*     Problems and transactions are logged to \fBsyslogd\fR(8).
 /*     Corrupted message files are marked so that the queue manager can
index f360af9db19077783bb7022a2e71b6403d46bcd1..e98ebed78ffde9fd0aacb2935cc1d4be5b1aa741 100644 (file)
@@ -601,7 +601,7 @@ static int smtp_start_tls(SMTP_STATE *state, int misc_flags)
      */
     serverid = vstring_alloc(10);
     vstring_sprintf(serverid, "%s:%u", session->addr, ntohs(session->port));
-    if (session->helo && strcasecmp(session->host, session->helo) != 0)
+    if (session->helo != 0)
        vstring_sprintf_append(serverid, ":%s", session->helo);
     session->tls_context =
        tls_client_start(smtp_tls_ctx, session->stream,
index f5a5eef9545ac270f51c2c60e7a5f109c4691ced..fb021129edabf828a5da563f201df12122e76cb7 100644 (file)
 /*     RFC 1869 (SMTP service extensions)
 /*     RFC 1870 (Message Size Declaration)
 /*     RFC 1985 (ETRN command)
-/*     RFC 2034 (Enhanced Error Codes)
+/*     RFC 2034 (Enhanced Status Codes)
 /*     RFC 2554 (AUTH command)
 /*     RFC 2821 (SMTP protocol)
 /*     RFC 2920 (SMTP Pipelining)
 /*     RFC 3207 (STARTTLS command)
+/*     RFC 3463 (Enhanced Status Codes)
 /* DIAGNOSTICS
 /*     Problems and transactions are logged to \fBsyslogd\fR(8).
 /*
@@ -71,7 +72,7 @@
 /*     Disable the SMTP VRFY command.
 /* .IP "\fBsmtpd_noop_commands (empty)\fR"
 /*     List of commands that the Postfix SMTP server replies to with "250
-/*     2.0.0 Ok", without doing any syntax checks and without changing state.
+/*     Ok", without doing any syntax checks and without changing state.
 /* .IP "\fBstrict_rfc821_envelopes (no)\fR"
 /*     Require that addresses received in SMTP MAIL FROM and RCPT TO
 /*     commands are enclosed with <>, and that those addresses do
@@ -1045,7 +1046,7 @@ static int helo_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
     /*
      * RFC 2034: the text part of all 2xx, 4xx, and 5xx SMTP responses other
      * than the initial greeting and any response to HELO or EHLO are
-     * prefaced with a status code as defined in RFC 1893.
+     * prefaced with a status code as defined in RFC 3463.
      */
     if (argc < 2) {
        state->error_mask |= MAIL_ERROR_PROTOCOL;
@@ -1093,7 +1094,7 @@ static int ehlo_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
      * 
      * RFC 2034: the text part of all 2xx, 4xx, and 5xx SMTP responses other
      * than the initial greeting and any response to HELO or EHLO are
-     * prefaced with a status code as defined in RFC 1893.
+     * prefaced with a status code as defined in RFC 3463.
      */
     if (argc < 2) {
        state->error_mask |= MAIL_ERROR_PROTOCOL;
@@ -3034,7 +3035,7 @@ static void smtpd_proto(SMTPD_STATE *state, const char *service)
        /*
         * RFC 2034: the text part of all 2xx, 4xx, and 5xx SMTP responses
         * other than the initial greeting and any response to HELO or EHLO
-        * are prefaced with a status code as defined in RFC 1893.
+        * are prefaced with a status code as defined in RFC 3463.
         */
        else {
            smtpd_chat_reply(state, "220 %s", var_smtpd_banner);
index 14689ec5fff142e63cb799eb9f54c2c0e763fc71..ee3c6d7b1e0ba818e850fbe9a1afe6d2d554ce6c 100644 (file)
@@ -1844,7 +1844,7 @@ static int check_table_result(SMTPD_STATE *state, const char *table,
     int     status;
     const char *cmd_text;
     int     cmd_len;
-    static char def_dsn[] = "0.0.0";
+    static char def_dsn[] = "5.7.1";
     DSN_SPLIT dp;
 
     /*
@@ -2035,7 +2035,7 @@ static int check_table_result(SMTPD_STATE *state, const char *table,
      * 4xx or 5xx means NO as well. smtpd_check_reject() will validate the
      * response status code.
      * 
-     * If the caller specifies an RFC 1893 enhanced status code, put it
+     * If the caller specifies an RFC 3463 enhanced status code, put it
      * immediately after the SMTP status code as described in RFC 2034.
      */
     if (cmd_len == 3 && *cmd_text
index 883e827dc0884e0db4d8657d1e1ce512457fe43e..41a6c38dcd955faea5a6729678a5ee20e5ed1602 100644 (file)
@@ -104,9 +104,11 @@ maildir.o: ../../include/mail_params.h
 maildir.o: ../../include/make_dirs.h
 maildir.o: ../../include/maps.h
 maildir.o: ../../include/mbox_conf.h
+maildir.o: ../../include/mbox_open.h
 maildir.o: ../../include/msg.h
 maildir.o: ../../include/mymalloc.h
 maildir.o: ../../include/recipient_list.h
+maildir.o: ../../include/safe_open.h
 maildir.o: ../../include/sane_fsops.h
 maildir.o: ../../include/sent.h
 maildir.o: ../../include/set_eugid.h
index 664b59466f90e1d98ee17462e5d74010ffd83e32..7f5b38a54f48856fbd685714deeff8709ba00d34 100644 (file)
@@ -117,7 +117,7 @@ static int deliver_mailbox_file(LOCAL_STATE state, USER_ATTR usr_attr)
     set_eugid(usr_attr.uid, usr_attr.gid);
     mp = mbox_open(usr_attr.mailbox, O_APPEND | O_WRONLY | O_CREAT,
                   S_IRUSR | S_IWUSR, &st, -1, -1,
-                  virtual_mbox_lock_mask, why);
+                  virtual_mbox_lock_mask, "4.2.0", why);
     if (mp != 0) {
        if (S_ISREG(st.st_mode) == 0) {
            vstream_fclose(mp->fp);
index 00d2e0a463958f00f0be8b83ce8d71e3bc2b5430..497c8b15e90213d2f132fc6bc843145d8f5b8cfc 100644 (file)
@@ -60,6 +60,7 @@
 #include <defer.h>
 #include <sent.h>
 #include <mail_params.h>
+#include <mbox_open.h>
 
 /* Application-specific. */
 
@@ -182,9 +183,11 @@ int     deliver_maildir(LOCAL_STATE state, USER_ATTR usr_attr)
        && (errno != ENOENT
            || make_dirs(tmpdir, 0700) < 0
            || (dst = vstream_fopen(tmpfile, O_WRONLY | O_CREAT | O_EXCL, 0600)) == 0)) {
-       dsn_vstring_update(why, "5.2.0", "create maildir file %s: %m", tmpfile);
+       dsn_vstring_update(why, mbox_dsn(errno, "4.2.0"),
+                          "create maildir file %s: %m", tmpfile);
     } else if (fstat(vstream_fileno(dst), &st) < 0) {
-       dsn_vstring_update(why, "5.2.0", "create maildir file %s: %m", tmpfile);
+       dsn_vstring_update(why, mbox_dsn(errno, "4.2.0"),
+                          "create maildir file %s: %m", tmpfile);
     } else {
        vstring_sprintf(buf, "%lu.V%lxI%lxM%lu.%s",
                        (unsigned long) starttime.tv_sec,
@@ -199,8 +202,8 @@ int     deliver_maildir(LOCAL_STATE state, USER_ATTR usr_attr)
                && (errno != ENOENT
                    || (make_dirs(curdir, 0700), make_dirs(newdir, 0700)) < 0
                    || sane_link(tmpfile, newfile) < 0)) {
-               dsn_vstring_update(why, "5.2.0",
-                                   "create maildir file %s: %m", newfile);
+               dsn_vstring_update(why, mbox_dsn(errno, "4.2.0"),
+                                  "create maildir file %s: %m", newfile);
                mail_copy_status = MAIL_COPY_STAT_WRITE;
            }
        }
@@ -223,8 +226,8 @@ int     deliver_maildir(LOCAL_STATE state, USER_ATTR usr_attr)
             "maildir delivery failed: %s", vstring_str(why->vstring));
        if (errno == EACCES) {
            msg_warn("maildir access problem for UID/GID=%lu/%lu: %s",
-               (long) usr_attr.uid, (long) usr_attr.gid,
-               vstring_str(why->vstring));
+                    (long) usr_attr.uid, (long) usr_attr.gid,
+                    vstring_str(why->vstring));
            msg_warn("perhaps you need to create the maildirs in advance");
        }
     } else {