]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-20001005
authorWietse Venema <wietse@porcupine.org>
Thu, 5 Oct 2000 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:26:51 +0000 (06:26 +0000)
20 files changed:
postfix/ETRN_README
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/conf/main.cf
postfix/conf/postfix-script-nosgid
postfix/conf/postfix-script-sgid
postfix/conf/sample-flush.cf
postfix/html/flush.8.html
postfix/html/flushd.8.html [deleted file]
postfix/makedefs
postfix/man/man8/flush.8
postfix/man/man8/flushd.8 [deleted file]
postfix/src/flush/flush.c
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/nqmgr/qmgr.c
postfix/src/nqmgr/qmgr_active.c
postfix/src/qmgr/qmgr.c
postfix/src/qmgr/qmgr_active.c
postfix/src/smtpd/smtpd.c

index ec87fd50487b5e7f7658a50503edcdafbd6ae29a..4f5b1685ffc50946cded94036cafa241cd7d285f 100644 (file)
@@ -17,17 +17,18 @@ The SMTP ETRN command was designed for sites that have intermittent
 Internet connectivity. With ETRN, a site can tell the mail server
 of its provider to "Please deliver all my mail now".
 
-Postfix versions before 20001003 implemented the ETRN command in
-a lame manner: they would attempt to deliver all queued mail.  This
-is slow on mail servers that queue mail for many customers.
+Postfix versions before 20001005 implemented the ETRN command in
+a lame manner: they simply attempted to deliver all queued mail.
+This is slow on mail servers that queue mail for many customers.
 
-As of version 20001003, Postfix has a faster ETRN implementation.
-At the same time, the command "sendmail -qR" is now implemented by
-sending an ETRN command to the local SMTP server.
+As of version 20001005, Postfix has a fast ETRN implementation that
+does not require Postfix to examine every queue file.  The command
+"sendmail -qR" is now implemented by sending an ETRN command to
+the local SMTP server.
 
-Postfix "fast ETRN/sendmail -qR" speeds up deliveries by looking
-only at mail that is queued for a given destination site. Postfix
-"slow ETRN" is still used as a fall-back method.
+Postfix "fast ETRN/sendmail -qR" speeds up deliveries by attempting
+to deliver only mail that is queued for a given destination site.
+The old Postfix "slow ETRN" is still used as a fall-back method.
 
 How Postfix fast ETRN works
 ===========================
@@ -46,10 +47,12 @@ only for destinations that Postfix is willing to relay mail to:
 
     fast_flush_policy = relay
 
-The relay_domains parameter specifies what destinations Postfix
-will relay to.  For destinations without "fast ETRN/sendmail -qR"
-service, Postfix falls back to the old "slow ETRN" which delivers
-all queued mail.
+The "relay_domains" parameter specifies what destinations Postfix
+will relay to.  
+
+For destinations that are not eligible for the new "fast ETRN/sendmail
+-qR" service, Postfix falls back to the old "slow ETRN" method
+which attempts to deliver all queued mail.
 
 To enable "fast ETRN/sendmail -qR" for all destinations, specify:
 
@@ -69,16 +72,16 @@ mail logfiles.  If you omit this step, the logfiles will eventually
 become populated as Postfix routinely attempts to deliver delayed
 mail, but that will take a couple hours.
 
-To test the "fast ETRN" service, telnet to the Postfix SMTP server
-from a client that is allowed to execute ETRN commands (by default,
-that's every client), and type:
+After the "sendmail -q" has completed all delivery attempts (that
+can take a while), you're ready to test the "fast ETRN" service.
+Telnet to the Postfix SMTP server from a client that is allowed to
+execute ETRN commands (by default, that's every client), and type:
 
     helo my.client.name
     etrn some.customer.domain
 
-where "some.customer.domain" is the name of a domain that your mail
-server is willing to relay mail to, and that your server has some
-mail queued for.
+where "some.customer.domain" is the name of a domain that has a
+non-empty logfile somewhere under /var/spool/postfix/flush.
 
 In the maillog file, you should immediately see a couple of logfile
 records, as evidence that the queue manager has opened queue files:
@@ -89,15 +92,19 @@ records, as evidence that the queue manager has opened queue files:
        from=<whatever>, size=4711, nrcpt=1 (queue active)
 
 What happens next depends on whether the destination is reachable.
+If it's not reachable, the mail queue IDs will be added back to
+the some.customer.domain logfile under /var/spool/postfix/flush.
 
 Repeat the exercise with another domain that your server is willing
-to relay to, but that has no mail queued.
+to relay to (domain listed in "relay_domains"), but that has no mail
+queued.
 
     helo my.client.name
     etrn some.other.customer.domain
 
-This time, the "etrn" command should not trigger any mail deliveries
-at all.
+This time, the "etrn" command should trigger NO mail deliveries at
+all. If this triggers delivery of all mail, then you used the wrong
+domain name, or "fast ETRN" service is turned off.
 
 Finally, repeat the exercise with a destination that your mail
 server is not willing to relay to.  It does not matter if your
index 27868f5c759d4a587c48394c1e2c5c947aed63c7..828ae4a3ea299e53a03b4f09066ea71814b41e35 100644 (file)
@@ -4330,13 +4330,26 @@ Apologies for any names omitted.
 20001003
 
        Feature: the fast flush refresh and purge time interval
-       parameters can now be specified in seconds or in user-specified
-       units by providing an appropriate suffix:  s (seconds), m
-       (minutes), h (hours), d (days), w (weeks).  unit.  This
-       was needed so that I could test the flush server code in
-       a reasonable way.  Other time parameters will be migrated
-       as time permits.  Files:  global/mail_conf_time.c,
+       parameters can now be specified in user-specified units by
+       providing an appropriate suffix:  s (seconds), m (minutes),
+       h (hours), d (days), w (weeks).  unit.  This was needed so
+       that I could test the flush server code in a reasonable
+       way (its timeouts are normally specified in days or hours,
+       and I don't have that much time for testing).  Other Postfix
+       time interval parameters will be migrated as time permits.
+       Files:  conf/sample-flush.cf, global/mail_conf_time.c,
        postconf/postconf.c.
 
        Unfeature: qmgr_hog_factor is now disabled by default. It
-       was just too confusing.
+       was just too confusing. If you don't know what this means,
+       do not worry.
+
+20001005
+
+       Cleanup: after "postfix reload" do not penalize mail that
+       was in the active queue, but make it ready for immediate
+       delivery so that ETRN etc. works as intended. Files:
+       *qmgr/qmgr.c, *qmgr/qmgr_active.c.
+
+       Portability: Redhat 7 library interfaces have changed
+       incompatibly, which breaks existing software. File makedefs.
index dfa8a726f548ac3f36865fd55ec58e57b4e99c15..c92903b46254b45e4e6039fc8871f869bbf776b9 100644 (file)
@@ -1,4 +1,4 @@
-Incompatible changes with snapshot-20001003
+Incompatible changes with snapshot-20001005
 ===========================================
 
 If this release does not work for you, you can go back to a previous
@@ -10,43 +10,33 @@ Some recommended parameter settings have changed, and a new entry
 must be added to the master.cf file before you can start Postfix
 again.
 
-After installing the new Postfix release:
+1 - The recommended Postfix configuration no longer uses flat
+    directories for the "active", "bounce", and "defer" queue
+    directories.  The "flush" directory for the new "flush" service
+    directory should not be flat either.
 
-- Check the output from "postconf hash_queue_names". The recommended
-  setting now includes the names of the "active", "bounce", "defer",
-  and "flush" directories.
+    Upon start-up, Postfix checks if the hash_queue_names configuration
+    parameter is properly set up, and will add any queue directory
+    names that are missing.
 
-  If your setting does not contain at least these directory names,
-  either you need to remove the explicit setting from the main.cf
-  file (so that Postfix uses the recommended default setting), or
-  you need to update it.
+2 - In order to improve performance of one-to-one mail deliveries
+    the queue manager will now look at up to 10000 queue files
+    (was: 1000).  The default qmgr_message_active_limit setting
+    was changed accordingly.
 
-- Check the output from "postconf qmgr_message_active_limit". The
-  recommended value has changed to 10000.
+    If you have a non-default qmgr_message_active_limit in main.cf,
+    you may want adjust it.
 
-  If your setting is lower, either you need to remove the explicit
-  setting from the main.cf file (so that Postfix uses the recommended
-  default setting), or you need to update it.
+3 - The new "flush" service needs to be configured in master.cf.
 
-- Add a new entry to the master.cf file for the new flush service:
+    Upon start-up, Postfix checks if the new "flush" service is
+    configured in the master.cf file, and will add an entry if it
+    is missing.
 
-    flush        unix  -       -       n       1000?   0       flush
+Should you wish to back out to a previous Postfix release there is
+no need to undo the above changes.
 
-  This entry is not needed if you won't use the fast flush service.
-  This service is used by default; to disable the fast flush service,
-  you need to specify in the main.cf file:
-
-    fast_flush_policy = none
-
-  In the new master.cf entry, the 1000? requests that the "fast
-  flush" service does some cleaning up every 15 minutes, but only
-  if the fast flush service is actually being used.  The 0 means
-  that Postfix should run as many flush servers as are needed.
-  Changing this may cause deadlock.
-
-Now you can start Postfix again.
-
-Major changes with snapshot-20001001
+Major changes with snapshot-20001005
 ====================================
 
 In order to improve performance of one-to-one deliveries, Postfix
@@ -57,9 +47,9 @@ SMTP ETRN command - it attempted to deliver all mail in the queue,
 regardless of its destination.  This is slow if your mail server
 queues mail for lots of different destinations.
 
-This release introduces fast "ETRN" and "sendmail -qR". Unlike
-their lame predecessor, these deliver only mail that is queued for
-the specified destinations.
+This release introduces fast "ETRN" and "sendmail -qR". These
+deliver only mail that is queued for the specified destination,
+without requiring Postfix to open every file in the mail queue.
 
 Postfix now maintains per-destination logfiles with information
 about what mail is queued for specific destinations.  By default,
index ab0909982f5f7154da80d8bd87b564b6facddd1e..92a27f3288328e103d4de60b016325ee2ceba984 100644 (file)
@@ -356,8 +356,8 @@ mail_owner = postfix
 # 
 # The fast_flush_policy controls what destinations are eligible for
 # this "fast ETRN/sendmail -qR" service. Specify "all" to make all
-# destinations eligible, "relay" for relay destinations only, and
-# "none" to turn this feature off.
+# destinations eligible, "relay" for relay destinations only (the
+# default), and "none" to turn this feature off.
 # 
 #fast_flush_policy = all
 #fast_flush_policy = relay
index 425fe6acd8a13b9709bee1ce77d90fbaf8843150..25235a208a7ddb9dca2919f91c293a9c2fc73fc4 100755 (executable)
@@ -227,6 +227,31 @@ check)
                done
        done
 
+       # Look for incomplete upgrades.
+
+       test -f $config_directory/master.cf || {
+               $FATAL no $config_directory/master.cf file found
+               exit 1
+       }
+       grep 'flush.*flush' $config_directory/master.cf >/dev/null || {
+               $WARN adding missing entry for flush service to master.cf
+               cat >>$config_directory/master.cf <<EOF
+flush    unix  -       -       n       1000?   0       flush
+EOF
+       }
+       found=`$command_directory/postconf -h hash_queue_names`
+       missing=
+       (echo "$found" | grep active >/dev/null) || missing="$missing active"
+       (echo "$found" | grep bounce >/dev/null) || missing="$missing bounce"
+       (echo "$found" | grep defer >/dev/null)  || missing="$missing defer"
+       (echo "$found" | grep flush >/dev/null)  || missing="$missing flush"
+       test -n "$missing" && {
+               $WARN fixing main.cf hash_queue_names for missing $missing
+               $command_directory/postconf -e hash_queue_names="$found$missing"
+       }
+
+       # See if all queue files are in the right place.
+
        $command_directory/postsuper || exit 1
 
        find corrupt -type f -exec $WARN damaged message: {} \;
index 1c6231f13ef402f76347fd1e9c43ad6063e486e4..2cf7f5c383b09ca80635d5c83f8692fcbd5775f1 100755 (executable)
@@ -228,6 +228,32 @@ check)
                done
        done
 
+       # Look for incomplete upgrades.
+
+       test -f $config_directory/master.cf || {
+               $FATAL no $config_directory/master.cf file found
+               exit 1
+       }
+       grep 'flush.*flush' $config_directory/master.cf >/dev/null || {
+               $WARN adding missing entry for flush service to master.cf
+               cat >>$config_directory/master.cf <<EOF
+flush    unix  -       -       n       1000?   0       flush
+EOF
+       }
+       found=`$command_directory/postconf -h hash_queue_names`
+       missing=
+       (echo "$found" | grep active >/dev/null) || missing="$missing active"
+       (echo "$found" | grep bounce >/dev/null) || missing="$missing bounce"
+       (echo "$found" | grep defer >/dev/null)  || missing="$missing defer"
+       (echo "$found" | grep flush >/dev/null)  || missing="$missing flush"
+       test -n "$missing" && {
+               $WARN fixing main.cf hash_queue_names for missing $missing
+               $command_directory/postconf -e hash_queue_names="$found$missing"
+       }
+
+       # See if all queue files are in the right place.
+
+
        $command_directory/postsuper || exit 1
 
        find corrupt -type f -exec $WARN damaged message: {} \;
index 0d6bb815417b2139d15634f6b6e8aada84b33eb1..0cc0105aa4f1d7dde095c28de92bc8d59f42daa3 100644 (file)
@@ -2,43 +2,47 @@
 # HERE JUST SERVES AS AN EXAMPLE.
 #
 # This file contains example settings of Postfix parameters that
-# control the fast flush service, which is the engine that implements
-# ETRN and "sendmail -qR".
+# control the fast flush service, which is the code that implements
+# fast ETRN and fast "sendmail -qR".
 
 # The fast_flush_policy parameter specifies what destinations are
 # eligible for per-destination logfiles with mail that is queued to
 # those destinations.
 # 
-# When a destination is eligible, ETRN and "sendmail -qR" are
-# implemented by delivering only messages that are queued for that
-# destination (Postfix will deliver to all recipients of those
-# messages, regardless of their destination).
+# When a destination is eligible for "fast flush" logfiles, ETRN and
+# "sendmail -qR" are implemented by delivering only messages that
+# are listed in the logfile for that destination (in fact, Postfix
+# will deliver to all recipients of those messages, regardless of
+# their destination, but that is not an issue when you relay mail
+# for an eligible site).
 # 
-# When a destination is not eligible, ETRN and "sendmail -qR" are
-# implemented simply by attempting to deliver all queued mail.
+# When a destination is not eligible for "fast flush" logfiles, ETRN
+# and "sendmail -qR" are implemented simply by attempting to deliver
+# all queued mail. That's the slow service that Postfix used to
+# implement before 20001005.
 # 
-# By default, Postfix maintains per-destination deferred mail logfiles
-# only for destinations that the Postfix SMTP server is willing to
-# relay to (see the relay_domains parameter in sample-smtpd.cf).
+# By default, Postfix maintains "fast flush" logfiles only for
+# destinations that the Postfix SMTP server is willing to relay to
+# (see the relay_domains parameter in sample-smtpd.cf).
 #
-# Specify "all" to enable per-destination deferred mail logfiles
-# for all destinations, "none" to disable the logfiles altogether.
+# Specify "all" to enable "fast flush" logfiles for all destinations,
+# "none" to disable the logfiles altogether.
 #
 #fast_flush_policy = all
 fast_flush_policy = relay
 #fast_flush_policy = none
 
-# The fast_flush_purge_delay parameter controls how long an empty
-# per-destination deferred mail logfile is allowed to live. 
+# The fast_flush_purge_time parameter controls how long an empty
+# per-destination "fast flush" logfile is allowed to live. 
 #
 # You can specify the time as a number, or as a number followed by
 # a letter that indicates the time unit: s=seconds, m=minutes, h=hours,
 # d=days, w=weeks.  The default time unit is days.
 #
-fast_flush_purge_delay = 7d
+fast_flush_purge_time = 7d
 
-# The fast_flush_refresh_delay parameter controls how long a non-empty
-# per-destination deferred mail logfile is allowed to remain unread
+# The fast_flush_refresh_time parameter controls how long a non-empty
+# per-destination "fast flush" logfile is allowed to remain unread
 # before its contents need to be refreshed. The contents of a logfile
 # are refreshed by requesting delivery of messages listed in the
 # logfile.
@@ -47,4 +51,4 @@ fast_flush_purge_delay = 7d
 # a letter that indicates the time unit: s=seconds, m=minutes, h=hours,
 # d=days, w=weeks.  The default time unit is hours.
 #
-fast_flush_refresh_delay = 12h
+fast_flush_refresh_time = 12h
index 5f00b04ae663b6a1e07292f6fb5238eb2dfc16fb..e8f8d77f3b05108922454991f013f89ca4deb582 100644 (file)
@@ -6,7 +6,7 @@ FLUSH(8)                                                 FLUSH(8)
 
 
 <b>NAME</b>
-       flush - Postfix fast flush cache manager
+       flush - Postfix fast flush server
 
 <b>SYNOPSIS</b>
        <b>flush</b> [generic Postfix daemon options]
@@ -27,7 +27,7 @@ FLUSH(8)                                                 FLUSH(8)
 
        Per-destination logfiles of deferred mail  are  maintained
        only  for  eligible  destinations. The policy is specified
-       with the <b>fast</b><i>_</i><b>flush</b><i>_</i><b>cache</b><i>_</i><b>policy</b> configuration parameter:
+       with the <b>fast</b><i>_</i><b>flush</b><i>_</i><b>policy</b> configuration parameter:
 
        <b>all</b>    Maintain per-destination logfiles for all  destina-
               tions.
@@ -43,21 +43,21 @@ FLUSH(8)                                                 FLUSH(8)
        This server implements the following requests:
 
        <b>FLUSH</b><i>_</i><b>REQ</b><i>_</i><b>ADD</b> <i>sitename</i> <i>queue_id</i>
-              Inform the cache manager that the specified message
-              is  queued  for <i>sitename</i>. Depending on caching pol-
-              icy, the cache manager stores or ignores the infor-
-              mation.
+              Inform the fast flush  server  that  the  specified
+              message  is  queued for <i>sitename</i>. Depending on log-
+              ging  policy,  the  fast  flush  server  stores  or
+              ignores the information.
 
        <b>FLUSH</b><i>_</i><b>REQ</b><i>_</i><b>SEND</b> <i>sitename</i>
               Request  delivery  of mail that is queued for <i>site-</i>
               <i>name</i>.  If the destination is eligible  for  a  fast
               flush  logfile,  this  request triggers delivery of
-              specific messages;  the per-destination logfile  is
-              truncated to zero length; if mail is undeliverable,
-              it will be logged to the per-destination logfile.
+              messages listed in that destination's logfile,  and
+              the logfile is truncated to zero length; if mail is
+              undeliverable it will be added back to the logfile.
 
               If the destination is not eligible for a fast flush
-              logfile,  this  request  triggers  delivery  of all
+              logfile, this  request  triggers  delivery  of  all
               queued mail.
 
 
@@ -72,33 +72,27 @@ FLUSH(8)                                                 FLUSH(8)
 
 
        <b>TRIGGER</b><i>_</i><b>REQ</b><i>_</i><b>WAKEUP</b>
-              This wakeup request from the master is an  alterna-
+              This  wakeup request from the master is an alterna-
               tive way to request <b>FLUSH</b><i>_</i><b>REQ</b><i>_</i><b>REFRESH</b>.
 
        <b>FLUSH</b><i>_</i><b>REQ</b><i>_</i><b>REFRESH</b> (completes in the background)
               Refresh  non-empty  per-destination  logfiles  that
-              were not read in  $<b>fast</b><i>_</i><b>flush</b><i>_</i><b>refresh</b><i>_</i><b>delay</b>  hours,
-              by  simulating  send  requests  (see above) for the
-              corresponding destinations.
+              were not read in $<b>fast</b><i>_</i><b>flush</b><i>_</i><b>refresh</b><i>_</i><b>time</b> hours, by
+              simulating send requests (see above) for the corre-
+              sponding destinations.
 
               Delete empty per-destination logfiles that were not
-              updated in <b>fast</b><i>_</i><b>flush</b><i>_</i><b>purge</b><i>_</i><b>delay</b> days.
+              updated in <b>fast</b><i>_</i><b>flush</b><i>_</i><b>purge</b><i>_</i><b>time</b> days.
 
        <b>FLUSH</b><i>_</i><b>REQ</b><i>_</i><b>PURGE</b> (completes in the background)
-              Refresh  all non-empty per-destination logfiles, by
+              Refresh all non-empty per-destination logfiles,  by
               simulating send requests (see above) for the corre-
               sponding  destinations.   This  can  be  incredibly
-              expensive when caching is enabled for all  deferred
+              expensive  when logging is enabled for all deferred
               mail, and is not recommended.
 
               Delete empty per-destination logfiles that were not
-              updated in <b>fast</b><i>_</i><b>flush</b><i>_</i><b>purge</b><i>_</i><b>delay</b> days.
-
-       Fast  flush  logfiles   are   truncated   only   after   a
-       <b>FLUSH</b><i>_</i><b>REQ</b><i>_</i><b>SEND</b>  request,  not when mail is actually deliv-
-       ered, and therefore can accumulate outdated  or  redundant
-       data.  In order to maintain sanity, <b>FLUSH</b><i>_</i><b>REQ</b><i>_</i><b>REFRESH</b> must
-       be executed periodically.
+              updated in <b>fast</b><i>_</i><b>flush</b><i>_</i><b>purge</b><i>_</i><b>time</b> days.
 
        The server response is one of:
 
@@ -106,25 +100,31 @@ FLUSH(8)                                                 FLUSH(8)
               The request completed normally.
 
        <b>FLUSH</b><i>_</i><b>STAT</b><i>_</i><b>BAD</b>
-              The flush server rejected the request (bad  request
+              The  flush server rejected the request (bad request
               name, bad request parameter value).
 
        <b>FLUSH</b><i>_</i><b>STAT</b><i>_</i><b>FAIL</b>
               The request failed.
 
 <b>SECURITY</b>
-       The  fast  flush server is not security-sensitive. It does
-       not talk to the network, and it does  not  talk  to  local
-       users.   The  fast  flush server can run chrooted at fixed
+       The fast flush server is not security-sensitive.  It  does
+       not  talk  to  the  network, and it does not talk to local
+       users.  The fast flush server can run  chrooted  at  fixed
        low privilege.
 
 <b>DIAGNOSTICS</b>
        Problems and transactions are logged to <b>syslogd</b>(8).
 
 <b>BUGS</b>
-       In reality, this server schedules delivery of all  recipi-
-       ents of a deferred message.  This limitation is due to the
-       fact that one queue runner has to handle mail for multiple
+       Fast   flush   logfiles   are   truncated   only  after  a
+       <b>FLUSH</b><i>_</i><b>REQ</b><i>_</i><b>SEND</b> request, not when mail is  actually  deliv-
+       ered,  and  therefore can accumulate outdated or redundant
+       data. In order to maintain sanity, <b>FLUSH</b><i>_</i><b>REQ</b><i>_</i><b>REFRESH</b>  must
+       be  executed  periodically.  This  can be automated with a
+       suitable wakeup timer setting in the <b>master.cf</b>  configura-
+       tion file.
+
+       Upon  receipt  of  a  request  to  deliver all mail for an
 
 
 
@@ -137,7 +137,12 @@ FLUSH(8)                                                 FLUSH(8)
 FLUSH(8)                                                 FLUSH(8)
 
 
-       destinations.
+       eligible destination, this server requests delivery of all
+       messages  that  are  listed in that destination's logfile,
+       regardless of the recipients of those  messages.  This  is
+       not an issue for mail that is sent to a <b>relay</b><i>_</i><b>domains</b> des-
+       tination because such mail typically only  has  recipients
+       in one domain.
 
 <b>FILES</b>
        /var/spool/postfix/flush, location of "fast flush" logfiles.
@@ -147,17 +152,17 @@ FLUSH(8)                                                 FLUSH(8)
        default values. Use the <b>postfix</b>  <b>reload</b>  command  after  a
        configuration change.
 
-       <b>fast</b><i>_</i><b>flush</b><i>_</i><b>cache</b><i>_</i><b>policy</b>
+       <b>fast</b><i>_</i><b>flush</b><i>_</i><b>policy</b>
               What  destinations can have a "fast flush" logfile:
               <b>all</b>, <b>relay</b> (relay destinations) or <b>none</b>.
 
-       <b>fast</b><i>_</i><b>flush</b><i>_</i><b>refresh</b><i>_</i><b>delay</b>
+       <b>fast</b><i>_</i><b>flush</b><i>_</i><b>refresh</b><i>_</i><b>time</b>
               Refresh a non-empty "fast flush" logfile  that  was
               not read in this amount of time (default time unit:
               hours), by simulating a send request for the corre-
               sponding destination.
 
-       <b>fast</b><i>_</i><b>flush</b><i>_</i><b>purge</b><i>_</i><b>delay</b>
+       <b>fast</b><i>_</i><b>flush</b><i>_</i><b>purge</b><i>_</i><b>time</b>
               Remove  an  empty "fast flush" logfile that was not
               updated in this amount of time (default time  unit:
               days).
@@ -189,11 +194,6 @@ FLUSH(8)                                                 FLUSH(8)
 
 
 
-
-
-
-
-
                                                                 3
 
 
diff --git a/postfix/html/flushd.8.html b/postfix/html/flushd.8.html
deleted file mode 100644 (file)
index 9da503d..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-<html> <head> </head> <body> <pre>
-
-
-
-FLUSHD(8)                                               FLUSHD(8)
-
-
-<b>NAME</b>
-       flushd - Postfix fast flush daemon
-
-<b>SYNOPSIS</b>
-       <b>flushd</b> [generic Postfix daemon options]
-
-<b>DESCRIPTION</b>
-       The flush server maintains so-called "fast flush" logfiles
-       with information about what messages are queued for a spe-
-       cific  site.  This program expects to be run from the <a href="master.8.html"><b>mas-</b>
-       <b>ter</b>(8)</a> process manager.
-
-       This server implements the following requests:
-
-       <b>FLUSH</b><i>_</i><b>REQ</b><i>_</i><b>ADD</b> <i>sitename</i> <i>queue_id</i>
-              Append <i>queue_id</i> to the fast flush log for the spec-
-              ified site.
-
-       <b>FLUSH</b><i>_</i><b>REQ</b><i>_</i><b>SEND</b> <i>sitename</i>
-              Arrange  for  the delivery of all messages that are
-              listed in the fast flush logfile for the  specified
-              site.   After the logfile is processed, the file is
-              truncated to length zero.
-
-       The response to the client is one of:
-
-       <b>FLUSH</b><i>_</i><b>STAT</b><i>_</i><b>OK</b>
-              The request completed normally.
-
-       <b>FLUSH</b><i>_</i><b>STAT</b><i>_</i><b>BAD</b>
-              The flush server rejected the request (bad  request
-              name, bad request parameter value).
-
-       <b>FLUSH</b><i>_</i><b>STAT</b><i>_</i><b>UNKNOWN</b>
-              The specified site has no fast flush log.
-
-       Fast  flush  logfiles  are  truncated  only  after a flush
-       request. In order to prevent fast flush logs from  growing
-       too  large, and to prevent them from accumulating too much
-       outdated information, the flush service generates  a  pro-
-       active   flush   request  once  every  every  1000  append
-       requests. This should not impact operation.
-
-<b>SECURITY</b>
-       The fast flush server is moderately security-sensitive. It
-       does  not  talk  to the network, but it does talk to local
-       unprivileged users, in order to emulate "sendmail -qRsite"
-       behavior.   For  this  reason all strings in a request are
-       truncated at <i>line_length_limit</i>, before they are  subjected
-       to further validation.
-
-       The fast flush server can run chrooted at fixed low privi-
-       lege.
-
-
-
-
-                                                                1
-
-
-
-
-
-FLUSHD(8)                                               FLUSHD(8)
-
-
-<b>DIAGNOSTICS</b>
-       Problems and transactions are logged to <b>syslogd</b>(8).
-
-<b>BUGS</b>
-       In reality, this server schedules  delivery  of  messages,
-       regardless of their destination. This limitation is due to
-       the fact that one queue runner has to handle mail for mul-
-       tiple destinations.
-
-<b>CONFIGURATION</b> <b>PARAMETERS</b>
-       The  following  <b>main.cf</b> parameters are especially relevant
-       to this program. See the Postfix <b>main.cf</b> file  for  syntax
-       details  and  for  default  values. Use the <b>postfix</b> <b>reload</b>
-       command after a configuration change.
-
-       <b>line</b><i>_</i><b>length</b><i>_</i><b>limit</b>
-              Maximal length of strings in a  fast  flush  client
-              request.
-
-<b>SEE</b> <b>ALSO</b>
-       <a href="smtpd.8.html">smtpd(8)</a> Postfix SMTP server
-       <a href="qmgr.8.html">qmgr(8)</a> Postfix queue manager
-       syslogd(8) system logging
-
-<b>LICENSE</b>
-       The  Secure  Mailer  license must be distributed with this
-       software.
-
-<b>AUTHOR(S)</b>
-       Wietse Venema
-       IBM T.J. Watson Research
-       P.O. Box 704
-       Yorktown Heights, NY 10598, USA
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-                                                                2
-
-
-</pre> </body> </html>
index 3cdbecfe1a59bc5e97442847fe752e81444d988f..7064185914ccf9aec4ed429889478dd5f99a3954 100644 (file)
@@ -159,15 +159,24 @@ case "$SYSTEM.$RELEASE" in
                *)      echo "Unknown AIX version: `uname -v`." 1>&2; exit 1;;
                esac;;
     Linux.2*)  SYSTYPE=LINUX2
-               for name in db nsl resolv
+               if [ -f /usr/lib/lib/db-3.1.a -a -f /usr/include/db3/db_185.h ]
+               then
+                   CCARGS="$CCARGS -DPATH_DB_H='<db3/db_185.h>'"
+                   SYSLIBS="$SYSLIBS -ldb-3.1"
+               else
+                   if [ -f /usr/include/db_185.h ]
+                   then
+                       CCARGS="$CCARGS -DPATH_DB_H='<db_185.h>'"
+                   elif [ -f /usr/include/db/db.h ]
+                   then
+                       CCARGS="$CCARGS -DPATH_DB_H='<db/db.h>'"
+                   fi
+                   test -f /usr/lib/libdb.a && SYSLIBS="$SYSLIBS -ldb"
+               fi
+               for name in nsl resolv
                do
                    test -f /usr/lib/lib$name.a && SYSLIBS="$SYSLIBS -l$name"
                done
-               if [ -f /usr/include/db_185.h ]; then
-                   CCARGS="$CCARGS -DPATH_DB_H='<db_185.h>'"
-               elif [ -f /usr/include/db/db.h ]; then
-                   CCARGS="$CCARGS -DPATH_DB_H='<db/db.h>'"
-               fi
                ;;
      IRIX*.5.*)        SYSTYPE=IRIX5
                # Use the native compiler by default
index ddf141ef5f78a9926c8f319d3fa0b472b68d9a66..b3b0cc22bbcb50d045c25f8479c24190a90020eb 100644 (file)
@@ -4,7 +4,7 @@
 .SH NAME
 flush
 \-
-Postfix fast flush cache manager
+Postfix fast flush server
 .SH SYNOPSIS
 .na
 .nf
@@ -28,7 +28,7 @@ an email address.
 
 Per-destination logfiles of deferred mail are maintained only for
 eligible destinations. The policy is specified with the
-\fBfast_flush_cache_policy\fR configuration parameter:
+\fBfast_flush_policy\fR configuration parameter:
 .IP \fBall\fR
 Maintain per-destination logfiles for all destinations.
 .IP "\fBrelay\fR (default policy)"
@@ -40,16 +40,15 @@ Do not maintain per-destination logfiles.
 .PP
 This server implements the following requests:
 .IP "\fBFLUSH_REQ_ADD\fI sitename queue_id\fR"
-Inform the cache manager that the specified message is queued for
-\fIsitename\fR. Depending on caching policy, the cache manager
+Inform the fast flush server that the specified message is queued for
+\fIsitename\fR. Depending on logging policy, the fast flush server
 stores or ignores the information.
 .IP "\fBFLUSH_REQ_SEND\fI sitename\fR"
 Request delivery of mail that is queued for \fIsitename\fR.
 If the destination is eligible for a fast flush logfile,
-this request triggers delivery of specific messages;  the
-per-destination logfile is truncated to zero length; if mail
-is undeliverable, it will be logged to the per-destination
-logfile.
+this request triggers delivery of messages listed in that
+destination's logfile, and the logfile is truncated to zero length;
+if mail is undeliverable it will be added back to the logfile.
 .sp
 If the destination is not eligible for a fast flush logfile,
 this request triggers delivery of all queued mail.
@@ -58,25 +57,20 @@ This wakeup request from the master is an alternative way to
 request \fBFLUSH_REQ_REFRESH\fR.
 .IP "\fBFLUSH_REQ_REFRESH\fR (completes in the background)"
 Refresh non-empty per-destination logfiles that were not read in
-$\fBfast_flush_refresh_delay\fR hours, by simulating
+$\fBfast_flush_refresh_time\fR hours, by simulating
 send requests (see above) for the corresponding destinations.
 .sp
 Delete empty per-destination logfiles that were not updated in
-\fBfast_flush_purge_delay\fR days.
+\fBfast_flush_purge_time\fR days.
 .IP "\fBFLUSH_REQ_PURGE\fR (completes in the background)"
 Refresh all non-empty per-destination logfiles, by simulating
 send requests (see above) for the corresponding destinations.
-This can be incredibly expensive when caching is enabled for
+This can be incredibly expensive when logging is enabled for
 all deferred mail, and is not recommended.
 .sp
 Delete empty per-destination logfiles that were not updated in
-\fBfast_flush_purge_delay\fR days.
+\fBfast_flush_purge_time\fR days.
 .PP
-Fast flush logfiles are truncated only after a \fBFLUSH_REQ_SEND\fR
-request, not when mail is actually delivered, and therefore can
-accumulate outdated or redundant data. In order to maintain sanity,
-\fBFLUSH_REQ_REFRESH\fR must be executed periodically.
-
 The server response is one of:
 .IP \fBFLUSH_STAT_OK\fR
 The request completed normally.
@@ -100,9 +94,19 @@ Problems and transactions are logged to \fBsyslogd\fR(8).
 .SH BUGS
 .ad
 .fi
-In reality, this server schedules delivery of all recipients
-of a deferred message.  This limitation is due to the fact that
-one queue runner has to handle mail for multiple destinations.
+Fast flush logfiles are truncated only after a \fBFLUSH_REQ_SEND\fR
+request, not when mail is actually delivered, and therefore can
+accumulate outdated or redundant data. In order to maintain sanity,
+\fBFLUSH_REQ_REFRESH\fR must be executed periodically. This can
+be automated with a suitable wakeup timer setting in the
+\fBmaster.cf\fR configuration file.
+
+Upon receipt of a request to deliver all mail for an eligible
+destination, this server requests delivery of all messages that
+are listed in that destination's logfile, regardless of the
+recipients of those messages. This is not an issue for mail
+that is sent to a \fBrelay_domains\fR destination because
+such mail typically only has recipients in one domain.
 .SH FILES
 .na
 .nf
@@ -115,14 +119,14 @@ one queue runner has to handle mail for multiple destinations.
 See the Postfix \fBmain.cf\fR file for syntax details and for
 default values. Use the \fBpostfix reload\fR command after a
 configuration change.
-.IP \fBfast_flush_cache_policy\fR
+.IP \fBfast_flush_policy\fR
 What destinations can have a "fast flush" logfile: \fBall\fR,
 \fBrelay\fR (relay destinations) or \fBnone\fR.
-.IP \fBfast_flush_refresh_delay\fR
+.IP \fBfast_flush_refresh_time\fR
 Refresh a non-empty "fast flush" logfile that was not read in
 this amount of time (default time unit: hours), by simulating
 a send request for the corresponding destination.
-.IP \fBfast_flush_purge_delay\fR
+.IP \fBfast_flush_purge_time\fR
 Remove an empty "fast flush" logfile that was not updated in
 this amount of time (default time unit: days).
 .SH SEE ALSO
diff --git a/postfix/man/man8/flushd.8 b/postfix/man/man8/flushd.8
deleted file mode 100644 (file)
index 2f18673..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-.TH FLUSHD 8 
-.ad
-.fi
-.SH NAME
-flushd
-\-
-Postfix fast flush daemon
-.SH SYNOPSIS
-.na
-.nf
-\fBflushd\fR [generic Postfix daemon options]
-.SH DESCRIPTION
-.ad
-.fi
-The flush server maintains so-called "fast flush" logfiles with
-information about what messages are queued for a specific site.
-This program expects to be run from the \fBmaster\fR(8) process
-manager.
-
-This server implements the following requests:
-.IP "\fBFLUSH_REQ_ADD\fI sitename queue_id\fR"
-Append \fIqueue_id\fR to the fast flush log for the
-specified site.
-.IP "\fBFLUSH_REQ_SEND\fI sitename\fR"
-Arrange for the delivery of all messages that are listed in the fast
-flush logfile for the specified site.  After the logfile is processed,
-the file is truncated to length zero.
-.PP
-The response to the client is one of:
-.IP \fBFLUSH_STAT_OK\fR
-The request completed normally.
-.IP \fBFLUSH_STAT_BAD\fR
-The flush server rejected the request (bad request name, bad
-request parameter value).
-.IP \fBFLUSH_STAT_UNKNOWN\fR
-The specified site has no fast flush log.
-.PP
-Fast flush logfiles are truncated only after a flush request. In
-order to prevent fast flush logs from growing too large, and to
-prevent them from accumulating too much outdated information, the
-flush service generates a pro-active flush request once every
-every 1000 append requests. This should not impact operation.
-.SH SECURITY
-.na
-.nf
-.ad
-.fi
-The fast flush server is moderately security-sensitive. It does not
-talk to the network, but it does talk to local unprivileged users, in
-order to emulate "sendmail -qRsite" behavior.  For this reason all
-strings in a request are truncated at \fIline_length_limit\fR,
-before they are subjected to further validation.
-
-The fast flush server can run chrooted at fixed low privilege.
-.SH DIAGNOSTICS
-.ad
-.fi
-Problems and transactions are logged to \fBsyslogd\fR(8).
-.SH BUGS
-.ad
-.fi
-In reality, this server schedules delivery of messages, regardless
-of their destination. This limitation is due to the fact that
-one queue runner has to handle mail for multiple destinations.
-.SH CONFIGURATION PARAMETERS
-.na
-.nf
-.ad
-.fi
-The following \fBmain.cf\fR parameters are especially relevant to
-this program. See the Postfix \fBmain.cf\fR file for syntax details
-and for default values. Use the \fBpostfix reload\fR command after
-a configuration change.
-.IP \fBline_length_limit\fR
-Maximal length of strings in a fast flush client request.
-.SH SEE ALSO
-.na
-.nf
-smtpd(8) Postfix SMTP server
-qmgr(8) Postfix queue manager
-syslogd(8) system logging
-.SH LICENSE
-.na
-.nf
-.ad
-.fi
-The Secure Mailer license must be distributed with this software.
-.SH AUTHOR(S)
-.na
-.nf
-Wietse Venema
-IBM T.J. Watson Research
-P.O. Box 704
-Yorktown Heights, NY 10598, USA
index c1157b0ad63f96896c0da671519ce9930822c71a..e763eb11cf4f70bc7a153596ff0312466bf94bd6 100644 (file)
@@ -2,7 +2,7 @@
 /* NAME
 /*     flush 8
 /* SUMMARY
-/*     Postfix fast flush cache manager
+/*     Postfix fast flush server
 /* SYNOPSIS
 /*     \fBflush\fR [generic Postfix daemon options]
 /* DESCRIPTION
@@ -22,7 +22,7 @@
 /*
 /*     Per-destination logfiles of deferred mail are maintained only for
 /*     eligible destinations. The policy is specified with the
-/*     \fBfast_flush_cache_policy\fR configuration parameter:
+/*     \fBfast_flush_policy\fR configuration parameter:
 /* .IP \fBall\fR
 /*     Maintain per-destination logfiles for all destinations.
 /* .IP "\fBrelay\fR (default policy)"
 /* .PP
 /*     This server implements the following requests:
 /* .IP "\fBFLUSH_REQ_ADD\fI sitename queue_id\fR"
-/*     Inform the cache manager that the specified message is queued for
-/*     \fIsitename\fR. Depending on caching policy, the cache manager
+/*     Inform the fast flush server that the specified message is queued for
+/*     \fIsitename\fR. Depending on logging policy, the fast flush server
 /*     stores or ignores the information.
 /* .IP "\fBFLUSH_REQ_SEND\fI sitename\fR"
 /*     Request delivery of mail that is queued for \fIsitename\fR.
 /*     If the destination is eligible for a fast flush logfile,
-/*     this request triggers delivery of specific messages;  the
-/*     per-destination logfile is truncated to zero length; if mail
-/*     is undeliverable, it will be logged to the per-destination
-/*     logfile.
+/*     this request triggers delivery of messages listed in that
+/*     destination's logfile, and the logfile is truncated to zero length;
+/*     if mail is undeliverable it will be added back to the logfile.
 /* .sp
 /*     If the destination is not eligible for a fast flush logfile,
 /*     this request triggers delivery of all queued mail.
 /*     request \fBFLUSH_REQ_REFRESH\fR.
 /* .IP "\fBFLUSH_REQ_REFRESH\fR (completes in the background)"
 /*     Refresh non-empty per-destination logfiles that were not read in
-/*     $\fBfast_flush_refresh_delay\fR hours, by simulating
+/*     $\fBfast_flush_refresh_time\fR hours, by simulating
 /*     send requests (see above) for the corresponding destinations.
 /* .sp
 /*     Delete empty per-destination logfiles that were not updated in
-/*     \fBfast_flush_purge_delay\fR days.
+/*     \fBfast_flush_purge_time\fR days.
 /* .IP "\fBFLUSH_REQ_PURGE\fR (completes in the background)"
 /*     Refresh all non-empty per-destination logfiles, by simulating
 /*     send requests (see above) for the corresponding destinations.
-/*     This can be incredibly expensive when caching is enabled for
+/*     This can be incredibly expensive when logging is enabled for
 /*     all deferred mail, and is not recommended.
 /* .sp
 /*     Delete empty per-destination logfiles that were not updated in
-/*     \fBfast_flush_purge_delay\fR days.
+/*     \fBfast_flush_purge_time\fR days.
 /* .PP
-/*     Fast flush logfiles are truncated only after a \fBFLUSH_REQ_SEND\fR
-/*     request, not when mail is actually delivered, and therefore can
-/*     accumulate outdated or redundant data. In order to maintain sanity,
-/*     \fBFLUSH_REQ_REFRESH\fR must be executed periodically.
-/*
 /*     The server response is one of:
 /* .IP \fBFLUSH_STAT_OK\fR
 /*     The request completed normally.
 /* DIAGNOSTICS
 /*     Problems and transactions are logged to \fBsyslogd\fR(8).
 /* BUGS
-/*     In reality, this server schedules delivery of all recipients
-/*     of a deferred message.  This limitation is due to the fact that
-/*     one queue runner has to handle mail for multiple destinations.
+/*     Fast flush logfiles are truncated only after a \fBFLUSH_REQ_SEND\fR
+/*     request, not when mail is actually delivered, and therefore can
+/*     accumulate outdated or redundant data. In order to maintain sanity,
+/*     \fBFLUSH_REQ_REFRESH\fR must be executed periodically. This can
+/*     be automated with a suitable wakeup timer setting in the
+/*     \fBmaster.cf\fR configuration file.
+/*
+/*     Upon receipt of a request to deliver all mail for an eligible
+/*     destination, this server requests delivery of all messages that
+/*     are listed in that destination's logfile, regardless of the
+/*     recipients of those messages. This is not an issue for mail
+/*     that is sent to a \fBrelay_domains\fR destination because
+/*     such mail typically only has recipients in one domain.
 /* FILES
 /*     /var/spool/postfix/flush, location of "fast flush" logfiles.
 /* CONFIGURATION PARAMETERS
 /*     See the Postfix \fBmain.cf\fR file for syntax details and for
 /*     default values. Use the \fBpostfix reload\fR command after a
 /*     configuration change.
-/* .IP \fBfast_flush_cache_policy\fR
+/* .IP \fBfast_flush_policy\fR
 /*     What destinations can have a "fast flush" logfile: \fBall\fR,
 /*     \fBrelay\fR (relay destinations) or \fBnone\fR.
-/* .IP \fBfast_flush_refresh_delay\fR
+/* .IP \fBfast_flush_refresh_time\fR
 /*     Refresh a non-empty "fast flush" logfile that was not read in
 /*     this amount of time (default time unit: hours), by simulating
 /*     a send request for the corresponding destination.
-/* .IP \fBfast_flush_purge_delay\fR
+/* .IP \fBfast_flush_purge_time\fR
 /*     Remove an empty "fast flush" logfile that was not updated in
 /*     this amount of time (default time unit: days).
 /* SEE ALSO
@@ -213,7 +217,7 @@ static int flush_policy_init(void)
     }
 }
 
-/* flush_policy_ok - check caching policy */
+/* flush_policy_ok - check logging policy */
 
 static int flush_policy_ok(const char *site)
 {
@@ -243,7 +247,7 @@ static int flush_add_service(const char *site, const char *queue_id)
        msg_info("%s: site %s queue_id %s", myname, site, queue_id);
 
     /*
-     * If this site is not eligible for caching, just ignore the request.
+     * If this site is not eligible for logging, just ignore the request.
      */
     if (flush_policy_ok(site) == 0)
        return (FLUSH_STAT_OK);
@@ -304,7 +308,7 @@ static int flush_send_service(const char *site)
        msg_info("%s: site %s", myname, site);
 
     /*
-     * If this site is not eligible for caching, deliver all queued mail.
+     * If this site is not eligible for logging, deliver all queued mail.
      */
     if (flush_policy_ok(site) == 0)
        return (mail_flush_deferred());
@@ -368,6 +372,12 @@ static int flush_send_service(const char *site)
                if (errno != ENOENT)
                    msg_warn("%s: update %s time stamps: %m",
                             myname, STR(queue_file));
+               /* XXX Wart... */
+               mail_queue_path(queue_file, MAIL_QUEUE_INCOMING, STR(queue_id));
+               if (utime(STR(queue_file), &tbuf) < 0)
+                   if (errno != ENOENT)
+                       msg_warn("%s: update %s time stamps: %m",
+                                myname, STR(queue_file));
            } else if (mail_queue_rename(STR(queue_id), MAIL_QUEUE_DEFERRED,
                                         MAIL_QUEUE_INCOMING) < 0) {
                if (errno != ENOENT)
index 14ee16569d3625430b355da6cf9350748bea1c55..de7fbea983d07a52dc2fa39c2081f745cdad6d18 100644 (file)
@@ -1075,11 +1075,11 @@ extern char *var_fflush_policy;
 #define FFLUSH_POLICY_RELAY            "relay"
 #define FFLUSH_POLICY_NONE             "none"
 
-#define VAR_FFLUSH_PURGE               "fast_flush_purge_delay"
+#define VAR_FFLUSH_PURGE               "fast_flush_purge_time"
 #define DEF_FFLUSH_PURGE               "7d"
 extern int var_fflush_purge;
 
-#define VAR_FFLUSH_REFRESH             "fast_flush_refresh_delay"
+#define VAR_FFLUSH_REFRESH             "fast_flush_refresh_time"
 #define DEF_FFLUSH_REFRESH             "12h"
 extern int var_fflush_refresh;
 
index 8ced2ecfa46fa28f5e9e6bd2e71baabf827f222f..b5e97cb80e14cc67b59f70ce1fbc20ebc44a6d7b 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-20001004"
+#define DEF_MAIL_VERSION       "Snapshot-20001005"
 extern char *var_mail_version;
 
 /* LICENSE
index 7c1d11a950228f7c51589e5ff5b97ca4ad18b9d0..39705adbf08db1606777ab1dc3758edeac6e67c2 100644 (file)
@@ -492,8 +492,7 @@ static void qmgr_post_init(char *unused_name, char **unused_argv)
      */
     var_use_limit = 0;
     var_idle_limit = 0;
-    qmgr_move(MAIL_QUEUE_ACTIVE, MAIL_QUEUE_INCOMING,
-             event_time() + var_min_backoff_time);
+    qmgr_move(MAIL_QUEUE_ACTIVE, MAIL_QUEUE_INCOMING, event_time());
     qmgr_incoming = qmgr_scan_create(MAIL_QUEUE_INCOMING);
     qmgr_deferred = qmgr_scan_create(MAIL_QUEUE_DEFERRED);
     qmgr_scan_request(qmgr_incoming, QMGR_SCAN_START);
index 9ba5a7dab5402205f24f2c8e19fc2c91d4fd4147..89d44dada258ce35b8f39865d6e1862a2379f3f5 100644 (file)
@@ -128,7 +128,7 @@ static void qmgr_active_corrupt(const char *queue_id)
 /* qmgr_active_defer - defer queue file */
 
 static void qmgr_active_defer(const char *queue_name, const char *queue_id,
-                                     int delay)
+                                     const char *dest_queue, int delay)
 {
     char   *myname = "qmgr_active_defer";
     const char *path;
@@ -141,12 +141,12 @@ static void qmgr_active_defer(const char *queue_name, const char *queue_id,
     path = mail_queue_path((VSTRING *) 0, queue_name, queue_id);
     if (utime(path, &tbuf) < 0)
        msg_fatal("%s: update %s time stamps: %m", myname, path);
-    if (mail_queue_rename(queue_id, queue_name, MAIL_QUEUE_DEFERRED)) {
+    if (mail_queue_rename(queue_id, queue_name, dest_queue)) {
        if (errno != ENOENT)
            msg_fatal("%s: rename %s from %s to %s: %m", myname,
-                     queue_id, queue_name, MAIL_QUEUE_DEFERRED);
+                     queue_id, queue_name, dest_queue);
        msg_warn("%s: rename %s from %s to %s: %m", myname,
-                queue_id, queue_name, MAIL_QUEUE_DEFERRED);
+                queue_id, queue_name, dest_queue);
     } else if (msg_verbose) {
        msg_info("%s: defer %s", myname, queue_id);
     }
@@ -217,7 +217,7 @@ void    qmgr_active_feed(QMGR_SCAN *scan_info, const char *queue_id)
                                      scan_info->flags)) == 0) {
        qmgr_active_corrupt(queue_id);
     } else if (message == QMGR_MESSAGE_LOCKED) {
-       qmgr_active_defer(MAIL_QUEUE_ACTIVE, queue_id, var_min_backoff_time);
+       qmgr_active_defer(MAIL_QUEUE_ACTIVE, queue_id, MAIL_QUEUE_INCOMING, 60);
     } else {
 
        /*
@@ -350,7 +350,8 @@ void    qmgr_active_done(QMGR_MESSAGE *message)
        } else {
            delay = var_min_backoff_time;
        }
-       qmgr_active_defer(message->queue_name, message->queue_id, delay);
+       qmgr_active_defer(message->queue_name, message->queue_id,
+                         MAIL_QUEUE_DEFERRED, delay);
     }
 
     /*
index 374008e921903443f0911b9412e5f05dbdc16430..17f0473f3223eb89498065f0745e9e8480edd015 100644 (file)
@@ -455,8 +455,7 @@ static void qmgr_post_init(char *unused_name, char **unused_argv)
      */
     var_use_limit = 0;
     var_idle_limit = 0;
-    qmgr_move(MAIL_QUEUE_ACTIVE, MAIL_QUEUE_INCOMING,
-             event_time() + var_min_backoff_time);
+    qmgr_move(MAIL_QUEUE_ACTIVE, MAIL_QUEUE_INCOMING, event_time());
     qmgr_incoming = qmgr_scan_create(MAIL_QUEUE_INCOMING);
     qmgr_deferred = qmgr_scan_create(MAIL_QUEUE_DEFERRED);
     qmgr_scan_request(qmgr_incoming, QMGR_SCAN_START);
index 9ba5a7dab5402205f24f2c8e19fc2c91d4fd4147..89d44dada258ce35b8f39865d6e1862a2379f3f5 100644 (file)
@@ -128,7 +128,7 @@ static void qmgr_active_corrupt(const char *queue_id)
 /* qmgr_active_defer - defer queue file */
 
 static void qmgr_active_defer(const char *queue_name, const char *queue_id,
-                                     int delay)
+                                     const char *dest_queue, int delay)
 {
     char   *myname = "qmgr_active_defer";
     const char *path;
@@ -141,12 +141,12 @@ static void qmgr_active_defer(const char *queue_name, const char *queue_id,
     path = mail_queue_path((VSTRING *) 0, queue_name, queue_id);
     if (utime(path, &tbuf) < 0)
        msg_fatal("%s: update %s time stamps: %m", myname, path);
-    if (mail_queue_rename(queue_id, queue_name, MAIL_QUEUE_DEFERRED)) {
+    if (mail_queue_rename(queue_id, queue_name, dest_queue)) {
        if (errno != ENOENT)
            msg_fatal("%s: rename %s from %s to %s: %m", myname,
-                     queue_id, queue_name, MAIL_QUEUE_DEFERRED);
+                     queue_id, queue_name, dest_queue);
        msg_warn("%s: rename %s from %s to %s: %m", myname,
-                queue_id, queue_name, MAIL_QUEUE_DEFERRED);
+                queue_id, queue_name, dest_queue);
     } else if (msg_verbose) {
        msg_info("%s: defer %s", myname, queue_id);
     }
@@ -217,7 +217,7 @@ void    qmgr_active_feed(QMGR_SCAN *scan_info, const char *queue_id)
                                      scan_info->flags)) == 0) {
        qmgr_active_corrupt(queue_id);
     } else if (message == QMGR_MESSAGE_LOCKED) {
-       qmgr_active_defer(MAIL_QUEUE_ACTIVE, queue_id, var_min_backoff_time);
+       qmgr_active_defer(MAIL_QUEUE_ACTIVE, queue_id, MAIL_QUEUE_INCOMING, 60);
     } else {
 
        /*
@@ -350,7 +350,8 @@ void    qmgr_active_done(QMGR_MESSAGE *message)
        } else {
            delay = var_min_backoff_time;
        }
-       qmgr_active_defer(message->queue_name, message->queue_id, delay);
+       qmgr_active_defer(message->queue_name, message->queue_id,
+                         MAIL_QUEUE_DEFERRED, delay);
     }
 
     /*
index 62ba71dfae12793f67c28c96cb0627341620c50d..201d4c249901303e72d32ad6c620670ee5b8e6b5 100644 (file)
@@ -1082,6 +1082,7 @@ static int etrn_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
      * to perform the request.
      */
     if (SMTPD_STAND_ALONE(state)) {
+       msg_warn("do not use ETRN in \"sendmail -bs\" mode");
        smtpd_chat_reply(state, "458 Unable to queue messages");
        return (-1);
     }