]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-1.1.11-20020822
authorWietse Venema <wietse@porcupine.org>
Thu, 22 Aug 2002 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:28:10 +0000 (06:28 +0000)
39 files changed:
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/conf/access
postfix/html/access.5.html
postfix/html/sendmail.1.html
postfix/html/smtpd.8.html
postfix/man/man1/sendmail.1
postfix/man/man5/access.5
postfix/man/man8/smtpd.8
postfix/src/bounce/bounce.c
postfix/src/cleanup/cleanup.c
postfix/src/cleanup/cleanup_api.c
postfix/src/cleanup/cleanup_envelope.c
postfix/src/cleanup/cleanup_message.c
postfix/src/global/abounce.c
postfix/src/global/bounce.c
postfix/src/global/cleanup_user.h
postfix/src/global/defer.c
postfix/src/global/deliver_pass.c
postfix/src/global/deliver_request.c
postfix/src/global/mail_proto.h
postfix/src/global/mail_version.h
postfix/src/global/post_mail.c
postfix/src/global/rec_type.h
postfix/src/global/resolve_clnt.c
postfix/src/local/forward.c
postfix/src/master/master.c
postfix/src/nqmgr/qmgr_deliver.c
postfix/src/nqmgr/qmgr_entry.c
postfix/src/pickup/pickup.c
postfix/src/postdrop/postdrop.c
postfix/src/qmgr/qmgr_deliver.c
postfix/src/qmgr/qmgr_entry.c
postfix/src/qmqpd/qmqpd.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_check.c
postfix/src/smtpd/smtpd_peer.c
postfix/src/trivial-rewrite/resolve.c
postfix/src/util/dict_ldap.c

index 1ec7f261d4ba88a7951cc3ca23ef63b739634ef6..f901f057fec93992fb9509d114f8a1f12194b7fb 100644 (file)
@@ -6811,7 +6811,7 @@ Apologies for any names omitted.
 
 20020816
 
-       Cleanup: "postqueue -f" now also trigger delivery of mail
+       Cleanup: "postqueue -f" now also triggers delivery of mail
        in the maildrop directory. This is needed when the master
        does not frequently wake up the pickup service.  Files:
        global/mail_flush.c, postqueue/postqueue.c.
@@ -6838,28 +6838,45 @@ Apologies for any names omitted.
        queue, and so that the bouncer would not find the queue
        file.
 
+       Bugfix: the #ifdef that detects too old LDAP libraries was
+       in the wrong place.  Victor Duchovni.  File: util/dict_ldap.c.
+
        Feature: new header/body_checks DISCARD pattern that causes
        mail to be silently discarded. Files: global/cleanup_user.h,
-       cleanup/cleanup_message.c.
+       cleanup/cleanup_message.c, cleanup/cleanup_api.c.
 
        Bugfix: the local delivery agent's mailbox duplicate delivery
-       eliminator was not updated when address extensions were
-       added to Postfix. The other local duplicate eliminators
-       may need revision as well. File: local/mailbox.c.
+       eliminator was not updated in the days that address extensions
+       were added to Postfix. The other local duplicate eliminators
+       probably need revision as well. File: local/mailbox.c.
 
 20020821
 
        Feature: HOLD and DISCARD actions in SMTPD access tables.
-       These requests are propagated to the cleanup daemon,
-       which required a bit of redesign of internal protocols.
-       Files: cleanup/cleanup.c pickup/pickup.c smtpd/smtpd.c
-       global/post_mail.c qmqpd/qmqpd.c local/forward.c.
+       These requests are propagated to the cleanup daemon.
+       Files: cleanup/cleanup_envelope.c smtpd/smtpd_check.c.
+
+       Cleanup: eliminate unnecessary references to the obsolete
+       program_directory configuration parameter (but keep the
+       parameter so as to not break existing installations).
+       Matthias Andree, many little changes in documentation.
+
+20020822
+
+       Bit Rot: OpenLDAP incompatible change with URL parsing.
+       Patches by Will Day, Georgia Tech, and Carsten Hoeger,
+       SUSE.  File: util/dict_ldap.c.
 
 Open problems:
 
+       Low: smtpd should log queue ID with reject/warn/hold/discard
+       actions.
+
        Medium: should permit_mx_backup defer delivery if DNS has
        some error of some kind?
 
+       Low: revise other local delivery agent duplicate filters.
+
        Low: all table lookups should consistently use internalized
        (unquoted) or externalized (quoted) forms as lookup keys.
        smtpd, qmgr, local, etc. use unquoted address forms as
index e8339cf50bdd082c89516ccbbbb85b8a7d632b0a..2a2f1907e369c06a908ba2273f021fe0db4e9ff6 100644 (file)
@@ -12,13 +12,7 @@ snapshot release).  Patches change the patchlevel and the release
 date. Snapshots change only the release date, unless they include
 the same bugfixes as a patch release.
 
-Incompatible changes with Postfix snapshot 1.1.11-20020821
-==========================================================
-
-After switching Postfix versions you need to "postfix reload"
-because internal protocols have changed.
-
-Incompatible changes with Postfix snapshot 1.1.11-20020818
+Incompatible changes with Postfix snapshot 1.1.11-20020819
 ==========================================================
 
 The qmgr_site_hog_factor feature is gone (this would defer mail
index 20a13c44bb913c908ec69f7fe45b24a81456212b..45cd464aa9dacbb64dca36e952f4bbf69629dec0 100644 (file)
 # 
 #        OK     Accept the address etc. that matches the pattern.
 # 
+#        all-numerical
+#               An all-numerical result is treated as OK. This for-
+#               mat is generated by address-based relay  authoriza-
+#               tion schemes.
+# 
 #        HOLD   Place  the message on the hold queue, where it will
 #               sit until someone either deletes it or releases  it
 #               for  delivery.   Mail that is placed on hold can be
 #               Claim successful delivery and silently discard  the
 #               message.
 # 
-#        all-numerical
-#               An all-numerical result is treated as OK. This for-
-#               mat is generated by address-based relay  authoriza-
-#               tion schemes.
-# 
 #        restriction...
 #               Apply the named UCE restriction(s) (permit, reject,
 #               reject_unauth_destination, and so on).
index 4879134024acac232726bf737e4e687170eeede9..ff70e7979e26efbb96471226eeb69bf369fc0800 100644 (file)
@@ -116,6 +116,11 @@ ACCESS(5)                                               ACCESS(5)
 
        <b>OK</b>     Accept the address etc. that matches the pattern.
 
+       <i>all-numerical</i>
+              An all-numerical result is treated as OK. This for-
+              mat is generated by address-based relay  authoriza-
+              tion schemes.
+
        <b>HOLD</b>   Place  the message on the <b>hold</b> queue, where it will
               sit until someone either deletes it or releases  it
               for  delivery.   Mail that is placed on hold can be
@@ -127,11 +132,6 @@ ACCESS(5)                                               ACCESS(5)
               Claim successful delivery and silently discard  the
               message.
 
-       <i>all-numerical</i>
-              An all-numerical result is treated as OK. This for-
-              mat is generated by address-based relay  authoriza-
-              tion schemes.
-
        <i>restriction...</i>
               Apply the named UCE restriction(s) (<b>permit</b>, <b>reject</b>,
               <b>reject</b><i>_</i><b>unauth</b><i>_</i><b>destination</b>, and so on).
index fafcf5513de629204691729a714ee7d09c0a45a2..0644b175b8a8a88132a68757e4988f9924cf35bf 100644 (file)
@@ -291,12 +291,10 @@ SENDMAIL(1)                                           SENDMAIL(1)
               processes.
 
        <b>command</b><i>_</i><b>directory</b>
-              Directory  with  Postfix support commands (default:
-              <b>$program</b><i>_</i><b>directory</b>).
+              Directory with Postfix support commands.
 
        <b>daemon</b><i>_</i><b>directory</b>
-              Directory with Postfix  daemon  programs  (default:
-              <b>$program</b><i>_</i><b>directory</b>).
+              Directory with Postfix daemon programs.
 
        <b>queue</b><i>_</i><b>directory</b>
               Top-level  directory  of the Postfix queue. This is
index c7f2a0e69923a1ee3eed298452d88c25755ff7d4..96dbad7a1cebbfc52aabf161a2986c1ba5bcd10b 100644 (file)
@@ -120,75 +120,74 @@ SMTPD(8)                                                 SMTPD(8)
               the system.
 
        <b>command</b><i>_</i><b>directory</b>
-              Location  of  Postfix  support  commands  (default:
-              <b>$program</b><i>_</i><b>directory</b>).
+              Location of Postfix support commands.
 
        <b>debug</b><i>_</i><b>peer</b><i>_</i><b>level</b>
-              Increment  in  verbose  logging level when a remote
+              Increment in verbose logging level  when  a  remote
               host  matches  a  pattern  in  the  <b>debug</b><i>_</i><b>peer</b><i>_</i><b>list</b>
               parameter.
 
        <b>debug</b><i>_</i><b>peer</b><i>_</i><b>list</b>
-              List  of  domain or network patterns. When a remote
-              host matches a pattern, increase the  verbose  log-
-              ging   level   by   the  amount  specified  in  the
+              List of domain or network patterns. When  a  remote
+              host  matches  a pattern, increase the verbose log-
+              ging  level  by  the  amount   specified   in   the
               <b>debug</b><i>_</i><b>peer</b><i>_</i><b>level</b> parameter.
 
        <b>default</b><i>_</i><b>verp</b><i>_</i><b>delimiters</b>
               The default VERP delimiter characters that are used
-              when   the   XVERP  command  is  specified  without
+              when  the  XVERP  command  is   specified   without
               explicit delimiters.
 
        <b>error</b><i>_</i><b>notice</b><i>_</i><b>recipient</b>
-              Recipient   of    protocol/policy/resource/software
+              Recipient    of   protocol/policy/resource/software
               error notices.
 
        <b>hopcount</b><i>_</i><b>limit</b>
               Limit the number of <b>Received:</b> message headers.
 
        <b>local</b><i>_</i><b>recipient</b><i>_</i><b>maps</b>
-              List  of  maps  with  user  names that are local to
+              List of maps with user  names  that  are  local  to
               <b>$myorigin</b> or <b>$inet</b><i>_</i><b>interfaces</b>. If this parameter is
-              defined,  then  the  SMTP  server  rejects mail for
+              defined, then the  SMTP  server  rejects  mail  for
               unknown local users.
 
        <b>notify</b><i>_</i><b>classes</b>
               List of error classes. Of special interest are:
 
-              <b>policy</b> When a client violates any  policy,  mail  a
+              <b>policy</b> When  a  client  violates any policy, mail a
                      transcript of the entire SMTP session to the
                      postmaster.
 
               <b>protocol</b>
-                     When a client violates the SMTP protocol  or
+                     When  a client violates the SMTP protocol or
                      issues  an  unimplemented  command,  mail  a
                      transcript of the entire SMTP session to the
                      postmaster.
 
        <b>smtpd</b><i>_</i><b>banner</b>
-              Text  that  follows the <b>220</b> status code in the SMTP
+              Text that follows the <b>220</b> status code in  the  SMTP
               greeting banner.
 
        <b>smtpd</b><i>_</i><b>recipient</b><i>_</i><b>limit</b>
-              Restrict the number of  recipients  that  the  SMTP
+              Restrict  the  number  of  recipients that the SMTP
               server accepts per message delivery.
 
        <b>smtpd</b><i>_</i><b>timeout</b>
-              Limit  the  time  to  send a server response and to
+              Limit the time to send a  server  response  and  to
               receive a client request.
 
        <b>soft</b><i>_</i><b>bounce</b>
-              Change hard (5xx) reject responses into soft  (4xx)
-              reject  responses.   This can be useful for testing
+              Change  hard (5xx) reject responses into soft (4xx)
+              reject responses.  This can be useful  for  testing
               purposes.
 
        <b>verp</b><i>_</i><b>delimiter</b><i>_</i><b>filter</b>
-              The characters that Postfix accepts as VERP  delim-
+              The  characters that Postfix accepts as VERP delim-
               iter characters.
 
 <b>Resource</b> <b>controls</b>
        <b>line</b><i>_</i><b>length</b><i>_</i><b>limit</b>
-              Limit  the  amount  of memory in bytes used for the
+              Limit the amount of memory in bytes  used  for  the
               handling of partial input lines.
 
        <b>message</b><i>_</i><b>size</b><i>_</i><b>limit</b>
@@ -196,8 +195,8 @@ SMTPD(8)                                                 SMTPD(8)
               ing on-disk storage for envelope information.
 
        <b>queue</b><i>_</i><b>minfree</b>
-              Minimal  amount of free space in bytes in the queue
-              file system for the SMTP server to accept any  mail
+              Minimal amount of free space in bytes in the  queue
+              file  system for the SMTP server to accept any mail
               at all.
 
        <b>smtpd</b><i>_</i><b>history</b><i>_</i><b>flush</b><i>_</i><b>threshold</b>
@@ -212,23 +211,23 @@ SMTPD(8)                                                 SMTPD(8)
 
        <b>smtpd</b><i>_</i><b>soft</b><i>_</i><b>error</b><i>_</i><b>limit</b>
               When an SMTP client has made this number of errors,
-              wait  <i>error_count</i>  seconds before responding to any
+              wait <i>error_count</i> seconds before responding  to  any
               client request.
 
        <b>smtpd</b><i>_</i><b>hard</b><i>_</i><b>error</b><i>_</i><b>limit</b>
-              Disconnect after a client has made this  number  of
+              Disconnect  after  a client has made this number of
               errors.
 
        <b>smtpd</b><i>_</i><b>junk</b><i>_</i><b>command</b><i>_</i><b>limit</b>
               Limit the number of times a client can issue a junk
-              command such as NOOP, VRFY, ETRN  or  RSET  in  one
-              SMTP  session  before  it  is penalized with tarpit
+              command  such  as  NOOP,  VRFY, ETRN or RSET in one
+              SMTP session before it  is  penalized  with  tarpit
               delays.
 
 <b>UCE</b> <b>control</b> <b>restrictions</b>
        <b>parent</b><i>_</i><b>domain</b><i>_</i><b>matches</b><i>_</i><b>subdomains</b>
-              List of Postfix features that use  <i>domain.tld</i>  pat-
-              terns   to  match  <i>sub.domain.tld</i>  (as  opposed  to
+              List  of  Postfix features that use <i>domain.tld</i> pat-
+              terns  to  match  <i>sub.domain.tld</i>  (as  opposed   to
               requiring <i>.domain.tld</i> patterns).
 
        <b>smtpd</b><i>_</i><b>client</b><i>_</i><b>restrictions</b>
@@ -236,19 +235,19 @@ SMTPD(8)                                                 SMTPD(8)
               tem.
 
        <b>smtpd</b><i>_</i><b>helo</b><i>_</i><b>required</b>
-              Require  that  clients  introduce themselves at the
+              Require that clients introduce  themselves  at  the
               beginning of an SMTP session.
 
        <b>smtpd</b><i>_</i><b>helo</b><i>_</i><b>restrictions</b>
-              Restrict what client hostnames are allowed in  <b>HELO</b>
+              Restrict  what client hostnames are allowed in <b>HELO</b>
               and <b>EHLO</b> commands.
 
        <b>smtpd</b><i>_</i><b>sender</b><i>_</i><b>restrictions</b>
-              Restrict  what sender addresses are allowed in <b>MAIL</b>
+              Restrict what sender addresses are allowed in  <b>MAIL</b>
               <b>FROM</b> commands.
 
        <b>smtpd</b><i>_</i><b>recipient</b><i>_</i><b>restrictions</b>
-              Restrict what recipient addresses  are  allowed  in
+              Restrict  what  recipient  addresses are allowed in
               <b>RCPT</b> <b>TO</b> commands.
 
        <b>smtpd</b><i>_</i><b>etrn</b><i>_</i><b>restrictions</b>
@@ -256,71 +255,71 @@ SMTPD(8)                                                 SMTPD(8)
               mands, and what clients may issue <b>ETRN</b> commands.
 
        <b>allow</b><i>_</i><b>untrusted</b><i>_</i><b>routing</b>
-              Allow untrusted clients to specify  addresses  with
-              sender-specified  routing.   Enabling this opens up
-              nasty relay loopholes involving trusted  backup  MX
+              Allow  untrusted  clients to specify addresses with
+              sender-specified routing.  Enabling this  opens  up
+              nasty  relay  loopholes involving trusted backup MX
               hosts.
 
        <b>smtpd</b><i>_</i><b>restriction</b><i>_</i><b>classes</b>
-              Declares  the  name of zero or more parameters that
-              contain a list of UCE restrictions.  The  names  of
-              these  parameters  can  then be used instead of the
+              Declares the name of zero or more  parameters  that
+              contain  a  list  of UCE restrictions. The names of
+              these parameters can then be used  instead  of  the
               restriction lists that they represent.
 
        <b>smtpd</b><i>_</i><b>null</b><i>_</i><b>access</b><i>_</i><b>lookup</b><i>_</i><b>key</b>
-              The lookup key to be used in  SMTPD  access  tables
-              instead  of  the null sender address. A null sender
+              The  lookup  key  to be used in SMTPD access tables
+              instead of the null sender address. A  null  sender
               address cannot be looked up.
 
        <b>maps</b><i>_</i><b>rbl</b><i>_</i><b>domains</b>
-              List of DNS domains that publish the  addresses  of
+              List  of  DNS domains that publish the addresses of
               blacklisted hosts.
 
        <b>permit</b><i>_</i><b>mx</b><i>_</i><b>backup</b><i>_</i><b>networks</b>
-              Only  domains  whose  primary  MX  hosts  match the
-              listed  networks  are   eligible   for   the   <b>per-</b>
+              Only domains  whose  primary  MX  hosts  match  the
+              listed   networks   are   eligible   for  the  <b>per-</b>
               <b>mit</b><i>_</i><b>mx</b><i>_</i><b>backup</b> feature.
 
        <b>relay</b><i>_</i><b>domains</b>
-              Restrict  what domains or networks this mail system
+              Restrict what domains or networks this mail  system
               will relay mail from or to.
 
 <b>UCE</b> <b>control</b> <b>responses</b>
        <b>access</b><i>_</i><b>map</b><i>_</i><b>reject</b><i>_</i><b>code</b>
-              Server response when a client  violates  an  access
+              Server  response  when  a client violates an access
               database restriction.
 
        <b>defer</b><i>_</i><b>code</b>
-              Server  response  when a client request is rejected
+              Server response when a client request  is  rejected
               by the <b>defer</b> restriction.
 
        <b>invalid</b><i>_</i><b>hostname</b><i>_</i><b>reject</b><i>_</i><b>code</b>
-              Server  response  when  a   client   violates   the
+              Server   response   when   a  client  violates  the
               <b>reject</b><i>_</i><b>invalid</b><i>_</i><b>hostname</b> restriction.
 
        <b>maps</b><i>_</i><b>rbl</b><i>_</i><b>reject</b><i>_</i><b>code</b>
-              Server   response   when   a  client  violates  the
+              Server  response  when  a   client   violates   the
               <b>maps</b><i>_</i><b>rbl</b><i>_</i><b>domains</b> restriction.
 
        <b>reject</b><i>_</i><b>code</b>
-              Response code when  the  client  matches  a  <b>reject</b>
+              Response  code  when  the  client  matches a <b>reject</b>
               restriction.
 
        <b>relay</b><i>_</i><b>domains</b><i>_</i><b>reject</b><i>_</i><b>code</b>
-              Server  response  when a client attempts to violate
+              Server response when a client attempts  to  violate
               the mail relay policy.
 
        <b>unknown</b><i>_</i><b>address</b><i>_</i><b>reject</b><i>_</i><b>code</b>
-              Server  response  when  a   client   violates   the
+              Server   response   when   a  client  violates  the
               <b>reject</b><i>_</i><b>unknown</b><i>_</i><b>address</b> restriction.
 
        <b>unknown</b><i>_</i><b>client</b><i>_</i><b>reject</b><i>_</i><b>code</b>
-              Server  response  when  a client without address to
-              name mapping  violates  the  <b>reject</b><i>_</i><b>unknown</b><i>_</i><b>clients</b>
+              Server response when a client  without  address  to
+              name  mapping  violates  the <b>reject</b><i>_</i><b>unknown</b><i>_</i><b>clients</b>
               restriction.
 
        <b>unknown</b><i>_</i><b>hostname</b><i>_</i><b>reject</b><i>_</i><b>code</b>
-              Server   response   when   a  client  violates  the
+              Server  response  when  a   client   violates   the
               <b>reject</b><i>_</i><b>unknown</b><i>_</i><b>hostname</b> restriction.
 
 <b>SEE</b> <b>ALSO</b>
@@ -329,7 +328,7 @@ SMTPD(8)                                                 SMTPD(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 bcf13ba80fd8f8de2369d1dcb9aceb1cb108f4f0..6294b3f0b0e81f954cf896af6079ecb57f05af0a 100644 (file)
@@ -246,11 +246,9 @@ Limit the number of \fBReceived:\fR message headers.
 .IP \fBmail_owner\fR
 The owner of the mail queue and of most Postfix processes.
 .IP \fBcommand_directory\fR
-Directory with Postfix support commands (default:
-\fB$program_directory\fR).
+Directory with Postfix support commands.
 .IP \fBdaemon_directory\fR
-Directory with Postfix daemon programs (default:
-\fB$program_directory\fR).
+Directory with Postfix daemon programs.
 .IP \fBqueue_directory\fR
 Top-level directory of the Postfix queue. This is also the root
 directory of Postfix daemons that run chrooted.
index 72b7d1e1e01e97e77152d3162ad286b41e8317be..c1f3161c4e4e948801b0dbfadc35f15a2ada90a4 100644 (file)
@@ -115,6 +115,9 @@ Reject the address etc. that matches the pattern. A generic
 error response message is generated.
 .IP \fBOK\fR
 Accept the address etc. that matches the pattern.
+.IP \fIall-numerical\fR
+An all-numerical result is treated as OK. This format is
+generated by address-based relay authorization schemes.
 .IP \fBHOLD\fR
 Place the message on the \fBhold\fR queue, where it will sit
 until someone either deletes it or releases it for delivery.
@@ -123,9 +126,6 @@ Mail that is placed on hold can be examined with the
 the \fBpostsuper\fR(1) command.
 .IP \fBDISCARD\fR
 Claim successful delivery and silently discard the message.
-.IP \fIall-numerical\fR
-An all-numerical result is treated as OK. This format is
-generated by address-based relay authorization schemes.
 .IP \fIrestriction...\fR
 Apply the named UCE restriction(s) (\fBpermit\fR, \fBreject\fR,
 \fBreject_unauth_destination\fR, and so on).
index be3c719c32df9daa7018f37e00a15957f28f9465..6b02a0e3b79b968d6b115763d8c85d1baafee0f8 100644 (file)
@@ -117,8 +117,7 @@ anti-spoofing restriction.
 .IP \fBalways_bcc\fR
 Address to send a copy of each message that enters the system.
 .IP \fBcommand_directory\fR
-Location of Postfix support commands (default:
-\fB$program_directory\fR).
+Location of Postfix support commands.
 .IP \fBdebug_peer_level\fR
 Increment in verbose logging level when a remote host matches a
 pattern in the \fBdebug_peer_list\fR parameter.
index d607e46d687c5a5debca4c2e1c9bff4fae462782..f176e222fb922c841ba09535626e60533903caa7 100644 (file)
@@ -145,7 +145,7 @@ static int bounce_append_proto(char *service_name, VSTREAM *client)
      * Read the and validate the client request.
      */
     if (mail_command_server(client,
-                           ATTR_TYPE_NUM, MAIL_ATTR_BFLAGS, &flags,
+                           ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, &flags,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
                            ATTR_TYPE_STR, MAIL_ATTR_RECIP, recipient,
                            ATTR_TYPE_STR, MAIL_ATTR_WHY, why,
@@ -185,7 +185,7 @@ static int bounce_notify_proto(char *service_name, VSTREAM *client, int flush)
      * Read and validate the client request.
      */
     if (mail_command_server(client,
-                           ATTR_TYPE_NUM, MAIL_ATTR_BFLAGS, &flags,
+                           ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, &flags,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue_name,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
                            ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
@@ -233,7 +233,7 @@ static int bounce_verp_proto(char *service_name, VSTREAM *client, int flush)
      * Read and validate the client request.
      */
     if (mail_command_server(client,
-                           ATTR_TYPE_NUM, MAIL_ATTR_BFLAGS, &flags,
+                           ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, &flags,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue_name,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
                            ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
@@ -293,7 +293,7 @@ static int bounce_one_proto(char *service_name, VSTREAM *client)
      * Read and validate the client request.
      */
     if (mail_command_server(client,
-                           ATTR_TYPE_NUM, MAIL_ATTR_BFLAGS, &unused_flags,
+                           ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, &unused_flags,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue_name,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
                            ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
index b07b3319a9ee86e198d35d93cc3d6700dbdfdb0e..bde24874998f745a3a39841554b57e9d662ca86a 100644 (file)
@@ -226,11 +226,20 @@ static void cleanup_service(VSTREAM *src, char *unused_service, char **argv)
     state = cleanup_open();
 
     /*
-     * Send the queue id to the client.
+     * Send the queue id to the client. Read client processing options. If we
+     * can't read the client processing options we can pretty much forget
+     * about the whole operation.
      */
     attr_print(src, ATTR_FLAG_NONE,
               ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, state->queue_id,
               ATTR_TYPE_END);
+    if (attr_scan(src, ATTR_FLAG_STRICT,
+                 ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, &flags,
+                 ATTR_TYPE_END) != 1) {
+       state->errs |= CLEANUP_STAT_BAD;
+       flags = 0;
+    }
+    cleanup_control(state, flags);
 
     /*
      * XXX Rely on the front-end programs to enforce record size limits.
index 2644aa8ddd74ee530c5d845157d3e58fa4e0f797..a4261c0fa359b664156600ea96de6e4db3b8fdc4 100644 (file)
@@ -35,9 +35,8 @@
 /*     queue_id result structure member.
 /*
 /*     cleanup_control() processes per-message flags specified by the caller.
-/*     These flags control the storage of mail and the handling of errors.
-/*     It is an error to any change error handling flags in the middle of
-/*     a message.
+/*     These flags control the handling of data errors, and must be set
+/*     before processing the first message record.
 /* .IP CLEANUP_FLAG_BOUNCE
 /*     The cleanup server is responsible for returning undeliverable
 /*     mail (too many hops, message too large) to the sender.
@@ -170,8 +169,6 @@ void    cleanup_control(CLEANUP_STATE *state, int flags)
      * definition.
      */
     if ((state->flags = flags) & CLEANUP_FLAG_BOUNCE) {
-       if (state->err_mask && state->err_mask != CLEANUP_STAT_MASK_INCOMPLETE)
-           msg_fatal("can't set CLEANUP_FLAG_BOUNCE after initializations");
        state->err_mask = CLEANUP_STAT_MASK_INCOMPLETE;
     } else {
        state->err_mask = ~CLEANUP_STAT_MASK_EXTRACT_RCPT;
@@ -279,6 +276,7 @@ int     cleanup_flush(CLEANUP_STATE *state)
        if (REMOVE(cleanup_path))
            msg_warn("remove %s: %m", cleanup_path);
     }
+
     /*
      * Make sure that our queue file will not be deleted by the error handler
      * AFTER we have taken responsibility for delivery. Better to deliver
index 96dedfe4fa14a3a77e2cec4bcf2335825c74c04d..3d0c2019e9abf272e71cb98b396b016ed6476c57 100644 (file)
@@ -109,6 +109,7 @@ static void cleanup_envelope_process(CLEANUP_STATE *state, int type, char *buf,
     char   *attr_name;
     char   *attr_value;
     const char *error_text;
+    int     extra_flags;
 
     if (type == REC_TYPE_MESG) {
        if (state->sender == 0 || state->time == 0) {
@@ -125,6 +126,14 @@ static void cleanup_envelope_process(CLEANUP_STATE *state, int type, char *buf,
        }
        return;
     }
+    if (type == REC_TYPE_FLGS) {
+       extra_flags = atol(buf);
+       if (extra_flags & ~CLEANUP_FLAG_MASK_EXTRA)
+           msg_warn("%s: bad extra flags: 0x%x", state->queue_id, extra_flags);
+       else
+           state->flags |= extra_flags;
+       return;
+    }
     if (strchr(REC_TYPE_ENVELOPE, type) == 0) {
        msg_warn("%s: unexpected record type %d in envelope",
                 state->queue_id, type);
@@ -217,13 +226,6 @@ static void cleanup_envelope_process(CLEANUP_STATE *state, int type, char *buf,
            return;
        }
        nvtable_update(state->attr, attr_name, attr_value);
-    } else if (type == REC_TYPE_FLGS) {
-
-       /*
-        * For safety's sake, allow setting flags only. Even this sucks when
-        * people set the CLEANUP_FLAG_BOUNCE flag too late in the game.
-        */
-       cleanup_control(state, state->flags | atol(buf));
     } else {
        cleanup_out(state, type, buf, len);
     }
index ad68ee05fc70146fe20f9e8f71c3e55d882cc3ca..e1c9e51060feb3e6bc3b284f26859839f6a51465 100644 (file)
@@ -281,6 +281,7 @@ static int cleanup_act(CLEANUP_STATE *state, char *context, const char *buf,
            state->reason = mystrdup(*optional_text ? optional_text :
                                     cleanup_strerror(CLEANUP_STAT_CONT));
        state->errs |= CLEANUP_STAT_CONT;
+       state->flags &= ~CLEANUP_FLAG_FILTER;
        if ((origin = nvtable_find(state->attr, MAIL_ATTR_ORIGIN)) == 0)
            origin = MAIL_ATTR_ORG_NONE;
        msg_info("%s: reject: %s %.200s from %s; from=<%s> to=<%s>: %s",
@@ -314,6 +315,7 @@ static int cleanup_act(CLEANUP_STATE *state, char *context, const char *buf,
                 *optional_text ? ": " : "",
                 *optional_text ? optional_text : "");
        state->flags |= CLEANUP_FLAG_DISCARD;
+       state->flags &= ~CLEANUP_FLAG_FILTER;
        return (CLEANUP_ACT_KEEP);
     }
     if (STREQUAL(value, "HOLD", command_len)) {
index 44ff81d65915749a843459164bc55d0875a02984..3bb158889ce8edb1b36475e7f204f09aba156471 100644 (file)
@@ -211,7 +211,7 @@ static void abounce_request_verp(const char *class, const char *service,
 
     if (attr_print(ap->fp, ATTR_FLAG_NONE,
                   ATTR_TYPE_NUM, MAIL_ATTR_NREQ, command,
-                  ATTR_TYPE_NUM, MAIL_ATTR_BFLAGS, flags,
+                  ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, flags,
                   ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
                   ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                   ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
@@ -273,7 +273,7 @@ static void abounce_request(const char *class, const char *service,
 
     if (attr_print(ap->fp, ATTR_FLAG_NONE,
                   ATTR_TYPE_NUM, MAIL_ATTR_NREQ, command,
-                  ATTR_TYPE_NUM, MAIL_ATTR_BFLAGS, flags,
+                  ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, flags,
                   ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
                   ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                   ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
index bcd4b91fb90e0fec40c2cc6324db34733b784dff..14b74f84b96ae4dac4b079868878bf953daa0795 100644 (file)
@@ -182,7 +182,7 @@ int     vbounce_append(int flags, const char *id, const char *recipient,
     if (mail_command_client(MAIL_CLASS_PRIVATE, var_soft_bounce ?
                            var_defer_service : var_bounce_service,
                            ATTR_TYPE_NUM, MAIL_ATTR_NREQ, BOUNCE_CMD_APPEND,
-                           ATTR_TYPE_NUM, MAIL_ATTR_BFLAGS, flags,
+                           ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, flags,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                            ATTR_TYPE_STR, MAIL_ATTR_RECIP, recipient,
                            ATTR_TYPE_STR, MAIL_ATTR_WHY, vstring_str(why),
@@ -216,7 +216,7 @@ int     bounce_flush(int flags, const char *queue, const char *id,
        return (-1);
     if (mail_command_client(MAIL_CLASS_PRIVATE, var_bounce_service,
                            ATTR_TYPE_NUM, MAIL_ATTR_NREQ, BOUNCE_CMD_FLUSH,
-                           ATTR_TYPE_NUM, MAIL_ATTR_BFLAGS, flags,
+                           ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, flags,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                            ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
@@ -271,7 +271,7 @@ int     vbounce_one(int flags, const char *queue, const char *id,
     vstring_vsprintf(why, fmt, ap);
     if (mail_command_client(MAIL_CLASS_PRIVATE, var_bounce_service,
                            ATTR_TYPE_NUM, MAIL_ATTR_NREQ, BOUNCE_CMD_ONE,
-                           ATTR_TYPE_NUM, MAIL_ATTR_BFLAGS, flags,
+                           ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, flags,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                            ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
index 86471854abb89bccdd933d3aae1210d9895ced96..44a4a506a31963409de74c99b03da7560c7aefd3 100644 (file)
 #define CLEANUP_FLAG_BOUNCE    (1<<0)  /* Bounce bad messages */
 #define CLEANUP_FLAG_FILTER    (1<<1)  /* Enable content filter */
 #define CLEANUP_FLAG_HOLD      (1<<2)  /* Place message on hold */
-#define CLEANUP_FLAG_DISCARD   (1<<3)  /* Discard message */
+#define CLEANUP_FLAG_DISCARD   (1<<3)  /* Discard message silently */
+
+ /*
+  * These are set on the fly while processing SMTP envelopes or message
+  * content.
+  */
+#define CLEANUP_FLAG_MASK_EXTRA \
+       (CLEANUP_FLAG_HOLD | CLEANUP_FLAG_DISCARD)
 
  /*
   * Diagnostics.
index 8c6544aeb0cca5d043367d98bf42453973d23244..862f3a6fdcb5ecca583b98ce9996b1c5d7556993 100644 (file)
@@ -151,7 +151,7 @@ int     vdefer_append(int flags, const char *id, const char *recipient,
     vstring_vsprintf(why, fmt, ap);
     if (mail_command_client(MAIL_CLASS_PRIVATE, var_defer_service,
                            ATTR_TYPE_NUM, MAIL_ATTR_NREQ, BOUNCE_CMD_APPEND,
-                           ATTR_TYPE_NUM, MAIL_ATTR_BFLAGS, flags,
+                           ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, flags,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                            ATTR_TYPE_STR, MAIL_ATTR_RECIP, recipient,
                            ATTR_TYPE_STR, MAIL_ATTR_WHY, vstring_str(why),
@@ -185,7 +185,7 @@ int     defer_flush(int flags, const char *queue, const char *id,
 {
     if (mail_command_client(MAIL_CLASS_PRIVATE, var_defer_service,
                            ATTR_TYPE_NUM, MAIL_ATTR_NREQ, BOUNCE_CMD_FLUSH,
-                           ATTR_TYPE_NUM, MAIL_ATTR_BFLAGS, flags,
+                           ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, flags,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                            ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
@@ -205,7 +205,7 @@ int     defer_warn(int flags, const char *queue, const char *id,
 {
     if (mail_command_client(MAIL_CLASS_PRIVATE, var_defer_service,
                            ATTR_TYPE_NUM, MAIL_ATTR_NREQ, BOUNCE_CMD_WARN,
-                           ATTR_TYPE_NUM, MAIL_ATTR_BFLAGS, flags,
+                           ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, flags,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                            ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
index 300665df44c3294db024a2f1437b90d681805b36..d2492292f140306866b0e4e8b88f8728b8cf0160 100644 (file)
@@ -94,7 +94,7 @@ static int deliver_pass_send_request(VSTREAM *stream, DELIVER_REQUEST *request,
     int     stat;
 
     attr_print(stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_NUM, MAIL_ATTR_DFLAGS, request->flags,
+              ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, request->flags,
               ATTR_TYPE_STR, MAIL_ATTR_QUEUE, request->queue_name,
               ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, request->queue_id,
               ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, request->data_offset,
index bb44526bcd9fea6259fb41cf59cf902f1d607021..75dd3c61bcea64e91a1c9379846ecfb1f4cf4e28 100644 (file)
@@ -196,7 +196,7 @@ static int deliver_request_get(VSTREAM *stream, DELIVER_REQUEST *request)
      * the conversation when they send bad information.
      */
     if (attr_scan(stream, ATTR_FLAG_STRICT | ATTR_FLAG_MORE,
-                 ATTR_TYPE_NUM, MAIL_ATTR_DFLAGS, &request->flags,
+                 ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, &request->flags,
                  ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue_name,
                  ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
                  ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, &request->data_offset,
index 92b9e67b7af2c28ee3bd052126c7c672485563ce..bb4e5caef385c10c07a093906d9ddee8e9b97ba6 100644 (file)
@@ -80,9 +80,7 @@ extern char *mail_pathname(const char *, const char *);
 #define MAIL_ATTR_NREQ         "nrequest"
 #define MAIL_ATTR_STATUS       "status"
 
-#define MAIL_ATTR_BFLAGS       "bounce_flags"
-#define MAIL_ATTR_DFLAGS       "delivery_flags"
-#define MAIL_ATTR_RFLAGS       "resolve_flags"
+#define MAIL_ATTR_FLAGS                "flags"
 #define MAIL_ATTR_QUEUE                "queue_name"
 #define MAIL_ATTR_QUEUEID      "queue_id"
 #define MAIL_ATTR_SENDER       "sender"
index 3bbc2d47f20ba6c2aec9598a0a508578d683e706..91c70bfb70fc68fb25d76fc29a2cc8b3bb2c0806 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only, unless they include the same bugfix as a patch release.
   */
-#define MAIL_RELEASE_DATE      "20020821"
+#define MAIL_RELEASE_DATE      "20020822"
 
 #define VAR_MAIL_VERSION       "mail_version"
 #define DEF_MAIL_VERSION       "1.1.11-" MAIL_RELEASE_DATE
index 5ae9e571f8baa24a761450b80abddb1c86f8a29a..02e3faf0e0e09a819c9a5f6411ea7fc1a3c5fb3e 100644 (file)
@@ -141,14 +141,16 @@ static void post_mail_init(VSTREAM *stream, const char *sender,
      */
     if (attr_scan(stream, ATTR_FLAG_STRICT,
                  ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
-                 ATTR_TYPE_END) != 1)
+                 ATTR_TYPE_END) != 1
+       || attr_print(stream, ATTR_FLAG_NONE,
+                     ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, flags,
+                     ATTR_TYPE_END) != 0)
        msg_fatal("unable to contact the %s service", var_cleanup_service);
 
     /*
      * Generate a minimal envelope section. The cleanup service will add a
      * size record.
      */
-    rec_fprintf(stream, REC_TYPE_FLGS, "%d", flags);
     rec_fprintf(stream, REC_TYPE_TIME, "%ld", (long) now);
     rec_fprintf(stream, REC_TYPE_ATTR, "%s=%s",
                MAIL_ATTR_ORIGIN, MAIL_ATTR_ORG_LOCAL);
index 82392eabf6bcf2ab131c144e4eb552bb5884d070..a146569153637c1c9247e03d60e392dfdbedad36 100644 (file)
@@ -36,7 +36,8 @@
 #define REC_TYPE_ORCP  'O'             /* original recipient, optional */
 #define REC_TYPE_WARN  'W'             /* warning message time */
 #define REC_TYPE_ATTR  'A'             /* named attribute for extensions */
-#define REC_TYPE_FLGS  'f'             /* set processing flags */
+
+#define REC_TYPE_FLGS  'f'             /* cleanup processing flags */
 
 #define REC_TYPE_MESG  'M'             /* start message records */
 
@@ -63,7 +64,7 @@
   * allow for the presence of A records in the extracted segment, because it
   * can be requested to re-process already queued mail with `postsuper -r'.
   */
-#define REC_TYPE_ENVELOPE      "MCTFILSDROWVAf"
+#define REC_TYPE_ENVELOPE      "MCTFILSDROWVA"
 #define REC_TYPE_CONTENT       "XLN"
 #define REC_TYPE_EXTRACT       "EDROPreAFI"
 
index bd9a9314461bf639286250d7b8c4571c4bb7b2e6..c8e6ccca944498c5b3e139691caa3b7af83e54c2 100644 (file)
@@ -168,7 +168,7 @@ void    resolve_clnt_query(const char *addr, RESOLVE_REPLY *reply)
                           ATTR_TYPE_STR, MAIL_ATTR_NEXTHOP, reply->nexthop,
 
                           ATTR_TYPE_STR, MAIL_ATTR_RECIP, reply->recipient,
-                            ATTR_TYPE_NUM, MAIL_ATTR_RFLAGS, &reply->flags,
+                            ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, &reply->flags,
                             ATTR_TYPE_END) != 4) {
            if (msg_verbose || (errno != EPIPE && errno != ENOENT))
                msg_warn("%s: bad read: %m", myname);
index f865e10c5746a15405bce93aabc86e8c77c7f0cc..a15cc5592849b224785adfdd8454b6bea8722065 100644 (file)
@@ -139,12 +139,14 @@ static FORWARD_INFO *forward_open(char *sender)
     info->cleanup = cleanup;
     info->queue_id = mystrdup(vstring_str(buffer));
     info->posting_time = time((time_t *) 0);
+    attr_print(cleanup, ATTR_FLAG_NONE,
+              ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, CLEANUP_FLAG_BOUNCE,
+              ATTR_TYPE_END);
 
     /*
      * Send initial message envelope information. For bounces, set the
      * designated sender: mailing list owner, posting user, whatever.
      */
-    rec_fprintf(cleanup, REC_TYPE_FLGS, "%d", CLEANUP_FLAG_BOUNCE);
     rec_fprintf(cleanup, REC_TYPE_TIME, "%ld", (long) info->posting_time);
     rec_fputs(cleanup, REC_TYPE_FROM, sender);
 
index 337ba7931b5405ed4b23ef8f53ca5bcc83d8fca9..b5c7e961717db7c982d959068e35ca247fc1bc89 100644 (file)
 /* Global library. */
 
 #include <mail_params.h>
+#include <mail_version.h>
 #include <debug_process.h>
 #include <mail_task.h>
 #include <mail_conf.h>
@@ -364,7 +365,7 @@ int     main(int argc, char **argv)
     master_config();
     master_sigsetup();
     master_flow_init();
-    msg_info("daemon started");
+    msg_info("daemon started -- version %s", var_mail_version);
 
     /*
      * Process events. The event handler will execute the read/write/timer
index 93c8e7c98d1ac313e9a936b71203de2199ba1d8b..d8de110c95abe19fb18062b4f435bbe8bb5b5151 100644 (file)
@@ -160,7 +160,7 @@ static int qmgr_deliver_send_request(QMGR_ENTRY *entry, VSTREAM *stream)
     nexthop = (cp = strrchr(entry->queue->name, '@')) != 0 && cp[1] ?
        cp + 1 : entry->queue->name;
     attr_print(stream, ATTR_FLAG_MORE,
-              ATTR_TYPE_NUM, MAIL_ATTR_DFLAGS, flags,
+              ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, flags,
               ATTR_TYPE_STR, MAIL_ATTR_QUEUE, message->queue_name,
               ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, message->queue_id,
               ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, message->data_offset,
index e1e733f2abc16eab2a40d5fb0c0d7f8a7aec7dbe..45c8b7f6199619e4cf532d58671335e45f21a2a9 100644 (file)
@@ -315,9 +315,18 @@ QMGR_ENTRY *qmgr_entry_create(QMGR_PEER *peer, QMGR_MESSAGE *message)
            else if (queue->peers.next != queue->peers.prev)
                msg_warn("you may need a separate master.cf transport for %s",
                         queue->name);
-           else if (transport->dest_concurrency_limit / 2 > queue->busy_refcount)
+           else {
+               msg_warn("you may need to reduce %s connect and helo timeouts",
+                        transport->name);
+               msg_warn("so that Postfix quickly skips unavailable hosts");
+               msg_warn("you may need to increase the main.cf %s and %s",
+                        VAR_MIN_BACKOFF_TIME, VAR_MAX_BACKOFF_TIME);
+               msg_warn("so that Postfix wastes less time on undeliverable mail");
                msg_warn("you may need to increase the master.cf %s process limit",
                         transport->name);
+           }
+           msg_warn("please avoid flushing the whole queue when you have");
+           msg_warn("lots of deferred mail, that is bad for performance");
            msg_warn("to turn off these warnings specify: %s = 0",
                     VAR_QMGR_CLOG_WARN_TIME);
            queue->clog_time_to_warn = now + var_qmgr_clog_warn_time;
index 8eceb81be2b1cd72121464ceb052d1cc7d60e7c9..9b3dba8d3938aed3d914a547e1a440311d2ee33d 100644 (file)
@@ -191,8 +191,6 @@ static int copy_segment(VSTREAM *qfile, VSTREAM *cleanup, PICKUP_INFO *info,
                info->rcpt = mystrdup(vstring_str(buf));
        if (type == REC_TYPE_TIME)
            continue;
-       if (type == REC_TYPE_FLGS)
-           continue;
        if (type == REC_TYPE_ATTR) {
            if ((error_text = split_nameval(vstring_str(buf), &attr_name,
                                            &attr_value)) != 0) {
@@ -269,15 +267,6 @@ static int pickup_copy(VSTREAM *qfile, VSTREAM *cleanup,
                 info->id, (int) (now - info->st.st_mtime) / DAY_SECONDS);
     }
 
-    /*
-     * Send our processing options. In case of trouble, request that the
-     * cleanup service bounces its copy of the message. because the original
-     * input file is not readable by the bounce service.
-     */
-#define PICKUP_CLEANUP_FLAGS   (CLEANUP_FLAG_BOUNCE | CLEANUP_FLAG_FILTER)
-
-    rec_fprintf(cleanup, REC_TYPE_FLGS, "%d", PICKUP_CLEANUP_FLAGS);
-
     /*
      * Make sure the message has a posting-time record.
      */
@@ -400,17 +389,23 @@ static int pickup_file(PICKUP_INFO *info)
 
     /*
      * Contact the cleanup service and read the queue ID that it has
-     * allocated. 
+     * allocated. In case of trouble, request that the cleanup service
+     * bounces its copy of the message. because the original input file is
+     * not readable by the bounce service.
      * 
      * The actual message copying code is in a separate routine, so that it is
      * easier to implement the many possible error exits without forgetting
      * to close files, or to release memory.
      */
+#define PICKUP_CLEANUP_FLAGS   (CLEANUP_FLAG_BOUNCE | CLEANUP_FLAG_FILTER)
 
     cleanup = mail_connect_wait(MAIL_CLASS_PUBLIC, var_cleanup_service);
     if (attr_scan(cleanup, ATTR_FLAG_STRICT,
                  ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, buf,
-                 ATTR_TYPE_END) != 1) {
+                 ATTR_TYPE_END) != 1
+       || attr_print(cleanup, ATTR_FLAG_NONE,
+                     ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, PICKUP_CLEANUP_FLAGS,
+                     ATTR_TYPE_END) != 0) {
        status = KEEP_MESSAGE_FILE;
     } else {
        info->id = mystrdup(vstring_str(buf));
index 3c67a7a62a13da9560c136fe42d5daed4fd01a1b..6832aa9bd6a965f598310579e1e3bf274ca2bed9 100644 (file)
@@ -297,9 +297,6 @@ int     main(int argc, char **argv)
      * 
      * If something goes wrong, slurp up the input before responding to the
      * client, otherwise the client will give up after detecting SIGPIPE.
-     * 
-     * XXX Need to add REC_TYPE_ATTR filtering code before we can talk directly
-     * to the cleanup daemon.
      */
     vstream_control(VSTREAM_IN, VSTREAM_CTL_PATH, "stdin", VSTREAM_CTL_END);
     buf = vstring_alloc(100);
@@ -318,17 +315,13 @@ int     main(int argc, char **argv)
        }
        if (rec_type == REC_TYPE_ERROR)
            msg_fatal("uid=%ld: malformed input", (long) uid);
+       if (rec_type == REC_TYPE_TIME)
+           rec_fprintf(dst->stream, REC_TYPE_TIME, "%ld",
+                       (long) time((time_t *) 0));
        if (strchr(*expected, rec_type) == 0)
            msg_fatal("uid=%ld: unexpected record type: %d", (long) uid, rec_type);
        if (rec_type == **expected)
            expected++;
-       if (rec_type == REC_TYPE_TIME) {
-           rec_fprintf(dst->stream, REC_TYPE_TIME, "%ld",
-                       (long) time((time_t *) 0));
-           continue;
-       }
-       if (rec_type == REC_TYPE_FLGS)
-           continue;
        if (REC_PUT_BUF(dst->stream, rec_type, buf) < 0) {
            while ((rec_type = rec_get(VSTREAM_IN, buf, var_line_limit)) > 0
                   && rec_type != REC_TYPE_END)
index bf0828109ce95a576efc4dd122c1070ec7907d81..64b170c26a3a939e3b42d39e00e402dd775c048d 100644 (file)
@@ -155,7 +155,7 @@ static int qmgr_deliver_send_request(QMGR_ENTRY *entry, VSTREAM *stream)
     nexthop = (cp = strrchr(entry->queue->name, '@')) != 0 && cp[1] ?
        cp + 1 : entry->queue->name;
     attr_print(stream, ATTR_FLAG_MORE,
-              ATTR_TYPE_NUM, MAIL_ATTR_DFLAGS, flags,
+              ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, flags,
               ATTR_TYPE_STR, MAIL_ATTR_QUEUE, message->queue_name,
               ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, message->queue_id,
               ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, message->data_offset,
index 7a5f9dfdb7a411e9732438931065510a4bbcf68d..1c0772dbee93246eaf1158d8a1a73029d9c9cf81 100644 (file)
@@ -254,9 +254,18 @@ QMGR_ENTRY *qmgr_entry_create(QMGR_QUEUE *queue, QMGR_MESSAGE *message)
            else if (queue->peers.next != queue->peers.prev)
                msg_warn("you may need a separate master.cf transport for %s",
                         queue->name);
-           else if (transport->dest_concurrency_limit / 2 > queue->busy_refcount)
+           else {
+               msg_warn("you may need to reduce %s connect and helo timeouts",
+                        transport->name);
+               msg_warn("so that Postfix quickly skips unavailable hosts");
+               msg_warn("you may need to increase the main.cf %s and %s",
+                        VAR_MIN_BACKOFF_TIME, VAR_MAX_BACKOFF_TIME);
+               msg_warn("so that Postfix wastes less time on undeliverable mail");
                msg_warn("you may need to increase the master.cf %s process limit",
                         transport->name);
+           }
+           msg_warn("please avoid flushing the whole queue when you have");
+           msg_warn("lots of deferred mail, that is bad for performance");
            msg_warn("to turn off these warnings specify: %s = 0",
                     VAR_QMGR_CLOG_WARN_TIME);
            queue->clog_time_to_warn = now + var_qmgr_clog_warn_time;
index b83a4040380e5eceb38e28f31dbc7c054b8f07b3..dbcfcb4f0c5fa47f835cb7b27a2922173db4e314 100644 (file)
@@ -182,7 +182,10 @@ static void qmqpd_open_file(QMQPD_STATE *state)
      * Connect to the cleanup server. Log client name/address with queue ID.
      */
     state->dest = mail_stream_service(MAIL_CLASS_PUBLIC, var_cleanup_service);
-    if (state->dest == 0)
+    if (state->dest == 0
+       || attr_print(state->dest->stream, ATTR_FLAG_NONE,
+                     ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, CLEANUP_FLAG_FILTER,
+                     ATTR_TYPE_END) != 0)
        msg_fatal("unable to connect to the %s %s service",
                  MAIL_CLASS_PUBLIC, var_cleanup_service);
     state->cleanup = state->dest->stream;
@@ -194,7 +197,6 @@ static void qmqpd_open_file(QMQPD_STATE *state)
      * bloody likely, but present for the sake of consistency with all other
      * Postfix points of entrance).
      */
-    rec_fprintf(state->cleanup, REC_TYPE_FLGS, "%d", CLEANUP_FLAG_FILTER);
     rec_fprintf(state->cleanup, REC_TYPE_TIME, "%ld", (long) state->time);
     if (*var_filter_xport)
        rec_fprintf(state->cleanup, REC_TYPE_FILT, "%s", var_filter_xport);
index ef81c30a8cf032febbc9dd12c205e109430eaeb0..ca31431ffa44fa9e91d288f70b4fca8bc953f162 100644 (file)
@@ -538,11 +538,12 @@ static void mail_open_stream(SMTPD_STATE *state)
     if (SMTPD_STAND_ALONE(state) == 0) {
        state->dest = mail_stream_service(MAIL_CLASS_PUBLIC,
                                          var_cleanup_service);
-       if (state->dest == 0)
+       if (state->dest == 0
+           || attr_print(state->dest->stream, ATTR_FLAG_NONE,
+                       ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, CLEANUP_FLAG_FILTER,
+                         ATTR_TYPE_END) != 0)
            msg_fatal("unable to connect to the %s %s service",
                      MAIL_CLASS_PUBLIC, var_cleanup_service);
-       rec_fprintf(state->dest->stream, REC_TYPE_FLGS, "%d",
-                   CLEANUP_FLAG_FILTER);
     }
 
     /*
index 2a3a389192ea5cf147aa3d8ac16298026fe23f6c..ab7e01cfe6bdf6e958cbf058fd5c1590e4471bab 100644 (file)
@@ -1509,25 +1509,35 @@ static int check_table_result(SMTPD_STATE *state, const char *table,
                             var_access_map_code, reply_name, reply_class));
 
     /*
-     * HOLD means deliver later.
+     * HOLD means deliver later. But we may still change our mind, and
+     * reject/discard the message for other reasons.
      */
     if (strcasecmp(value, "HOLD") == 0) {
        vstring_sprintf(error_text, "<%s>: %s triggers HOLD action",
                        reply_name, reply_class);
        log_whatsup(state, "hold", STR(error_text));
+#ifndef TEST
        rec_fprintf(state->dest->stream, REC_TYPE_FLGS, "%d",
                    CLEANUP_FLAG_HOLD);
+#endif
+       return (SMTPD_CHECK_DUNNO);
     }
 
     /*
      * DISCARD means silently discard and claim successful delivery.
+     * 
+     * XXX Set some global flag that disables all further restrictions.
+     * Triggering a "reject" or "hold" action after "discard" is silly.
      */
     if (strcasecmp(value, "DISCARD") == 0) {
        vstring_sprintf(error_text, "<%s>: %s triggers DISCARD action",
                        reply_name, reply_class);
        log_whatsup(state, "discard", STR(error_text));
+#ifndef TEST
        rec_fprintf(state->dest->stream, REC_TYPE_FLGS, "%d",
                    CLEANUP_FLAG_DISCARD);
+#endif
+       return (SMTPD_CHECK_OK);
     }
 
     /*
index 4a8b2c57f5842090d89bd753c3f1994070be8377..5679f8b6417ec0fec2eab6f37ced54cdac63eaf1 100644 (file)
@@ -107,6 +107,11 @@ void    smtpd_peer_init(SMTPD_STATE *state)
     struct hostent *hp;
     int     i;
 
+    /*
+     * Avoid suprious complaints from Purify on Solaris.
+     */
+    memset((char *) &sin, 0, len);
+
     /*
      * Look up the peer address information.
      */
index a3af883fc28a663399e036270908cf8506ffd9fa..b53d56563a4b710ebea951806421c0e94151d039 100644 (file)
@@ -291,7 +291,7 @@ int     resolve_proto(VSTREAM *stream)
               ATTR_TYPE_STR, MAIL_ATTR_TRANSPORT, STR(channel),
               ATTR_TYPE_STR, MAIL_ATTR_NEXTHOP, STR(nexthop),
               ATTR_TYPE_STR, MAIL_ATTR_RECIP, STR(nextrcpt),
-              ATTR_TYPE_NUM, MAIL_ATTR_RFLAGS, flags,
+              ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, flags,
               ATTR_TYPE_END);
 
     if (vstream_fflush(stream) != 0) {
index fa370107aa1a66e5501d40eb19958e2347ce906b..9eafc6613ed54bcc25ab6618de0a3590c0ded924 100644 (file)
@@ -490,6 +490,7 @@ static void dict_ldap_get_values(DICT_LDAP *dict_ldap, LDAPMessage * res,
     char   *attr;
     char   *myname = "dict_ldap_get_values";
     struct timeval tv;
+    LDAPURLDesc *url;
 
     tv.tv_sec = dict_ldap->timeout;
     tv.tv_usec = 0;
@@ -541,8 +542,14 @@ static void dict_ldap_get_values(DICT_LDAP *dict_ldap, LDAPMessage * res,
                        if (msg_verbose)
                            msg_info("%s: looking up URL %s", myname,
                                     vals[i]);
-                       rc = ldap_url_search_st(dict_ldap->ld, vals[i],
-                                               0, &tv, &resloop);
+                       rc = ldap_url_parse(vals[i], &url);
+                       if (rc == 0) {
+                           rc = ldap_search_st(dict_ldap->ld, url->lud_dn,
+                                           url->lud_scope, url->lud_filter,
+                                               url->lud_attrs, 0, &tv,
+                                               &resloop);
+                           ldap_free_urldesc(url);
+                       }
                    } else {
                        if (msg_verbose)
                            msg_info("%s: looking up DN %s", myname, vals[i]);