]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.0.0-20030109
authorWietse Venema <wietse@porcupine.org>
Thu, 9 Jan 2003 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:28:42 +0000 (06:28 +0000)
28 files changed:
postfix/HISTORY
postfix/conf/regexp_table
postfix/conf/sample-pcre-header.cf
postfix/conf/sample-regexp-header.cf
postfix/html/postqueue.1.html
postfix/html/postsuper.1.html
postfix/html/proxymap.8.html
postfix/html/regexp_table.5.html
postfix/html/trivial-rewrite.8.html
postfix/man/man1/postqueue.1
postfix/man/man1/postsuper.1
postfix/man/man5/regexp_table.5
postfix/man/man8/proxymap.8
postfix/man/man8/trivial-rewrite.8
postfix/proto/regexp_table
postfix/src/cleanup/cleanup_message.c
postfix/src/global/dict_proxy.c
postfix/src/global/mail_version.h
postfix/src/global/resolve_clnt.c
postfix/src/global/rewrite_clnt.c
postfix/src/global/verify_clnt.c
postfix/src/master/multi_server.c
postfix/src/postqueue/postqueue.c
postfix/src/postsuper/postsuper.c
postfix/src/proxymap/proxymap.c
postfix/src/smtpd/smtpd_check.c
postfix/src/trivial-rewrite/transport.c
postfix/src/trivial-rewrite/trivial-rewrite.c

index b0d8f16b5dc5eb2bb06f5cdd7f4960b543dce46b..c7f35b6916e9ac9e0ab575ef98854c9549b3f490 100644 (file)
@@ -7690,7 +7690,7 @@ Apologies for any names omitted.
        It should not try to open any user/domain/uce related tables
        at all. File:  smtpd/smtpd.c.
 
-20020106
+20030106
 
        Bugfix: bouncing to owner-alias was broken, i.e. the mail
        kept being deferred, and when that was fixed, another buglet
@@ -7702,8 +7702,32 @@ Apologies for any names omitted.
        specifies a hostname for which the same IP address is listed
        multiple times. File: master/master_ent.c.
 
+20030107
+
+       Robustness: check that FILTER actions in SMTPD access maps
+       or cleanup header/body_checks have plausible syntax. Files:
+       smtpd/smtpd_check.c, cleanup/cleanup_message.c.
+
+20030109
+
+       Cleanup: unnecessary "premature end of file on xxx while
+       reading yyy" warnings became exposed after some code
+       simplification. Files" global/*_clnt.c, global/dict_proxy.c
+
+       Robustness: undo the change that causes a multi-server
+       process to stop accepting new connections while it still
+       services existing clients for an extended amount of time.
+       We need a better process retirement strategy. File:
+       master/multi_server.c.
+
 Open problems:
 
+       Med: make qmgr recipient bounce/defer activity asynchronous
+       or add a multi-recipient operation that reduces overhead.
+
+       Low: postmap/postalias should not try to open a bogus file
+       when given an unsupported dictionary type.
+
        Med: do not postpone rejected "MAIL FROM" size information,
        and find a way to log the sender address in the rejected
        command.
index 2cefe946c0f877c90f52960a926c3092ae08e0ed..94bcf2f13646ace6f38818a18395ba9497ce5648 100644 (file)
@@ -89,7 +89,9 @@
 #        /^postmaster@/       OK
 # 
 #        # Protect your outgoing majordomo exploders
-#        /^(.*)-outgoing@(.*)$/!/^owner-/         550 Use ${1}@${2} instead
+#        if !/^owner-/
+#        /^(.*)-outgoing@(.*)$/   550 Use ${1}@${2} instead
+#        endif
 # 
 # EXAMPLE HEADER FILTER MAP
 #        # These were once common in junk mail.
index c0fcd7f0d1fa12f5ed5f7a97b561e2638a9b95db..9dc72813a6dcfa427507587abd5b442d9ae7f44f 100644 (file)
@@ -3,8 +3,8 @@
 #      message header filtering. See pcre_table(5) for syntax description.
 #
 #      Message headers are filtered one at a time. This filter understands
-#      multi-line message headers. However, the message header filter has
-#      no knowledge of MIME headers that are embedded in the message body.
+#      multi-line message headers, including MIME headers in the message
+#      body.
 #
 #      The first field is a perl-like regular expression. The expression
 #      delimiter can be any character except whitespace, or characters
index f1b6d4a899b549abf5d3305481a4e739292a9176..bc29fdf6d45c91d7b678acd887d3afee72e5041f 100644 (file)
@@ -2,8 +2,7 @@
 # for a description of the syntax.
 #
 # Message headers are filtered one at a time. This filter understands
-# multi-line mail headers. However, the message header filter has no
-# knowledge of MIME headers that are embedded in the message body.
+# multi-line mail headers, including MIME headers in the message body.
 #
 # The general format of a table entry is PATTERN RESULT. 
 #
index ccc74d664b3ae82e7162a166cc34f86a444ce9de..8c4bd612985d32ecbd99cffac49e000c7ed84310 100644 (file)
@@ -11,9 +11,11 @@ POSTQUEUE(1)                                         POSTQUEUE(1)
 
 <b>DESCRIPTION</b>
        The  <b>postqueue</b>  program implements the Postfix user inter-
-       face for queue management. It implements  all  the  opera-
-       tions that are traditionally available via the <a href="sendmail.1.html"><b>sendmail</b>(1)</a>
-       command.
+       face for queue management. It implements  operations  that
+       are  traditionally  available via the <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command.
+       See the <a href="postsuper.1.html"><b>postsuper</b>(1)</a> command  for  queue  operations  that
+       require  super-user  privileges such as deleting a message
+       from the queue or changing the status of a message.
 
        The following options are recognized:
 
@@ -109,7 +111,8 @@ POSTQUEUE(1)                                         POSTQUEUE(1)
               request and in the <b>sendmail</b> <b>-qR</b> command.
 
 <b>SEE</b> <b>ALSO</b>
-       sendmail(8) sendmail-compatible user interface
+       <a href="sendmail.1.html">sendmail(1)</a> sendmail-compatible user interface
+       <a href="postsuper.1.html">postsuper(1)</a> privileged queue operations
        <a href="qmgr.8.html">qmgr(8)</a> queue manager
        <a href="showq.8.html">showq(8)</a> list mail queue
        <a href="flushd.8.html">flush(8)</a> fast flush service
index ed012cfb19e5201a6675d60e16566f4cf72a7979..f80d1da047c968a9d37078d22fc7f3151ba8da5f 100644 (file)
@@ -11,27 +11,29 @@ POSTSUPER(1)                                         POSTSUPER(1)
 <b>DESCRIPTION</b>
        The <b>postsuper</b> command does maintenance jobs on the Postfix
        queue.  Use of the command is restricted to the superuser.
+       See the <b>postqueue</b> command for  unprivileged  queue  opera-
+       tions such as listing or flushing the mail queue.
 
-       By default, <b>postsuper</b> performs  the  operations  requested
-       with  the  <b>-s</b>  and  <b>-p</b> command-line options on all Postfix
+       By  default,  <b>postsuper</b>  performs the operations requested
+       with the <b>-s</b> and <b>-p</b> command-line  options  on  all  Postfix
        queue directories - this includes the <b>incoming</b>, <b>active</b> and
-       <b>deferred</b>  directories  with  mail  files  and  the <b>bounce</b>,
+       <b>deferred</b> directories  with  mail  files  and  the  <b>bounce</b>,
        <b>defer</b>, <b>trace</b> and <b>flush</b> directories with log files.
 
        Options:
 
        <b>-c</b> <i>config_dir</i>
-              The <b>main.cf</b> configuration  file  is  in  the  named
+              The  <b>main.cf</b>  configuration  file  is  in the named
               directory  instead  of  the  default  configuration
-              directory. See  also  the  MAIL_CONFIG  environment
+              directory.  See  also  the  MAIL_CONFIG environment
               setting below.
 
        <b>-d</b> <i>queue_id</i>
               Delete one message with the named queue ID from the
-              named  mail  queue(s)  (default:  <b>hold</b>,   <b>incoming</b>,
+              named   mail  queue(s)  (default:  <b>hold</b>,  <b>incoming</b>,
               <b>active</b> and <b>deferred</b>).  If a <i>queue_id</i> of <b>-</b> is speci-
-              fied, the program reads  queue  IDs  from  standard
-              input.  For  example, to delete all mail from or to
+              fied,  the  program  reads  queue IDs from standard
+              input. For example, to delete all mail from  or  to
               <b>user@example.com</b>:
 
               mailq | tail +2 | awk  'BEGIN { RS = "" } \
@@ -39,117 +41,117 @@ POSTSUPER(1)                                         POSTSUPER(1)
               ' | tr -d '*!' | postsuper -d -
 
               Specify <b>-d</b> <b>ALL</b> to remove all messages; for example,
-              specify  <b>-d</b>  <b>ALL</b>  <b>deferred</b>  to  delete  mail in the
-              <b>deferred</b> queue.  As a safety measure, the word  <b>ALL</b>
+              specify <b>-d</b> <b>ALL</b>  <b>deferred</b>  to  delete  mail  in  the
+              <b>deferred</b>  queue.  As a safety measure, the word <b>ALL</b>
               must be specified in upper case.
 
-              <b>Postfix</b>  <b>queue</b>  <b>IDs</b>  <b>are</b>  <b>reused.</b>   <b>There</b> <b>is</b> <b>a</b> <b>very</b>
-              <b>small</b> <b>possibility</b> <b>that</b> <b>postsuper</b> <b>deletes</b> <b>the</b>  <b>wrong</b>
-              <b>message</b>  <b>file</b> <b>when</b> <b>it</b> <b>is</b> <b>executed</b> <b>while</b> <b>the</b> <b>Postfix</b>
+              <b>Postfix</b> <b>queue</b> <b>IDs</b> <b>are</b>  <b>reused.</b>   <b>There</b>  <b>is</b>  <b>a</b>  <b>very</b>
+              <b>small</b>  <b>possibility</b> <b>that</b> <b>postsuper</b> <b>deletes</b> <b>the</b> <b>wrong</b>
+              <b>message</b> <b>file</b> <b>when</b> <b>it</b> <b>is</b> <b>executed</b> <b>while</b> <b>the</b>  <b>Postfix</b>
               <b>mail</b> <b>system</b> <b>is</b> <b>running.</b>
 
               The scenario is as follows:
 
-              1)     The Postfix queue manager deletes  the  mes-
-                     sage  that  <b>postsuper</b> is supposed to delete,
-                     because Postfix is finished  with  the  mes-
+              1)     The  Postfix  queue manager deletes the mes-
+                     sage that <b>postsuper</b> is supposed  to  delete,
+                     because  Postfix  is  finished with the mes-
                      sage.
 
-              2)     New  mail  arrives,  and  the new message is
-                     given the same queue ID as the message  that
+              2)     New mail arrives, and  the  new  message  is
+                     given  the same queue ID as the message that
                      <b>postsuper</b> is supposed to delete.  The proba-
-                     bility for reusing a  deleted  queue  ID  is
-                     about  1  in  2**15 (the number of different
+                     bility  for  reusing  a  deleted queue ID is
+                     about 1 in 2**15 (the  number  of  different
                      microsecond values that the system clock can
                      distinguish within a second).
 
-              3)     <b>postsuper</b>  deletes  the new message, instead
-                     of the  old  message  that  it  should  have
+              3)     <b>postsuper</b> deletes the new  message,  instead
+                     of  the  old  message  that  it  should have
                      deleted.
 
        <b>-h</b> <i>queue_id</i>
-              Put  mail  "on  hold" so that no attempt is made to
-              deliver it.  Move one message with the named  queue
+              Put mail "on hold" so that no attempt  is  made  to
+              deliver  it.  Move one message with the named queue
               ID from the named mail queue(s) (default: <b>incoming</b>,
-              <b>active</b> and <b>deferred</b>)  to  the  <b>hold</b>  queue.   If  a
+              <b>active</b>  and  <b>deferred</b>)  to  the  <b>hold</b>  queue.  If a
               <i>queue_id</i> of <b>-</b> is specified, the program reads queue
               IDs from standard input.
 
-              Specify <b>-h</b> <b>ALL</b> to hold all messages;  for  example,
+              Specify  <b>-h</b>  <b>ALL</b> to hold all messages; for example,
               specify  <b>-h</b>  <b>ALL</b>  <b>deferred</b>  to  hold  mail  in  the
-              <b>deferred</b> queue.  As a safety measure, the word  <b>ALL</b>
+              <b>deferred</b>  queue.  As a safety measure, the word <b>ALL</b>
               must be specified in upper case.
 
-              Note:  mail  that  is put "on hold" will not expire
-              when its  time  in  the  queue  exceeds  the  <b>maxi-</b>
+              Note: mail that is put "on hold"  will  not  expire
+              when  its  time  in  the  queue  exceeds  the <b>maxi-</b>
               <b>mal</b><i>_</i><b>queue</b><i>_</i><b>lifetime</b> setting.
 
        <b>-H</b> <i>queue_id</i>
               Release mail that was put "on hold".  Move one mes-
-              sage with the named queue ID from  the  named  mail
+              sage  with  the  named queue ID from the named mail
               queue(s) (default: <b>hold</b>) to the <b>deferred</b> queue.  If
-              a <i>queue_id</i> of <b>-</b> is  specified,  the  program  reads
+              a  <i>queue_id</i>  of  <b>-</b>  is specified, the program reads
               queue IDs from standard input.
 
-              Specify  <b>-H</b>  <b>ALL</b>  to  release  all mail that is "on
-              hold".  As a safety measure, the word <b>ALL</b>  must  be
+              Specify <b>-H</b> <b>ALL</b> to release  all  mail  that  is  "on
+              hold".   As  a safety measure, the word <b>ALL</b> must be
               specified in upper case.
 
-       <b>-p</b>     Purge  old temporary files that are left over after
+       <b>-p</b>     Purge old temporary files that are left over  after
               system or software crashes.
 
        <b>-r</b> <i>queue_id</i>
-              Requeue the message with the named  queue  ID  from
-              the  named  mail queue(s) (default: <b>hold</b>, <b>incoming</b>,
-              <b>active</b> and <b>deferred</b>).   To  requeue  multiple  mes-
-              sages,  specify  multiple  <b>-r</b> command-line options.
+              Requeue  the  message  with the named queue ID from
+              the named mail queue(s) (default:  <b>hold</b>,  <b>incoming</b>,
+              <b>active</b>  and  <b>deferred</b>).   To  requeue multiple mes-
+              sages, specify multiple  <b>-r</b>  command-line  options.
               Alternatively, if a <i>queue_id</i> of <b>-</b> is specified, the
               program reads queue IDs from standard input.
 
               Specify <b>-r</b> <b>ALL</b> to requeue all messages. As a safety
-              measure, the word <b>ALL</b> must be  specified  in  upper
+              measure,  the  word  <b>ALL</b> must be specified in upper
               case.
 
-              A  requeued message is moved to the <b>maildrop</b> queue,
-              from where it is copied by the pickup daemon  to  a
-              new  file whose name is guaranteed to match the new
+              A requeued message is moved to the <b>maildrop</b>  queue,
+              from  where  it is copied by the pickup daemon to a
+              new file whose name is guaranteed to match the  new
               queue file inode number. The new queue file is sub-
-              jected  again to mail address rewriting and substi-
+              jected again to mail address rewriting and  substi-
               tution. This is useful when rewriting rules or vir-
               tual mappings have changed.
 
-              Postfix  queue  IDs  are  reused.   There is a very
+              Postfix queue IDs are  reused.   There  is  a  very
               small possibility that <b>postsuper</b> requeues the wrong
-              message  file when it is executed while the Postfix
+              message file when it is executed while the  Postfix
               mail system is running, but no harm should be done.
 
        <b>-s</b>     Structure check and structure repair.  It is highly
-              recommended to perform this operation  once  before
+              recommended  to  perform this operation once before
               Postfix startup.
 
-              <b>o</b>      Rename  files  whose name does not match the
+              <b>o</b>      Rename files whose name does not  match  the
                      message file inode number. This operation is
-                     necessary  after restoring a mail queue from
+                     necessary after restoring a mail queue  from
                      a different machine, or from backup media.
 
               <b>o</b>      Move queue files that are in the wrong place
                      in the file system hierarchy and remove sub-
                      directories that are no longer needed.  File
-                     position  rearrangements are necessary after
+                     position rearrangements are necessary  after
                      a  change  in  the  <b>hash</b><i>_</i><b>queue</b><i>_</i><b>names</b>  and/or
                      <b>hash</b><i>_</i><b>queue</b><i>_</i><b>depth</b> configuration parameters.
 
        <b>-v</b>     Enable verbose logging for debugging purposes. Mul-
-              tiple <b>-v</b> options  make  the  software  increasingly
+              tiple  <b>-v</b>  options  make  the software increasingly
               verbose.
 
 <b>DIAGNOSTICS</b>
-       Problems  are reported to the standard error stream and to
+       Problems are reported to the standard error stream and  to
        <b>syslogd</b>.
 
-       <b>postsuper</b> reports the number of messages deleted with  <b>-d</b>,
+       <b>postsuper</b>  reports the number of messages deleted with <b>-d</b>,
        the number of messages requeued with <b>-r</b>, and the number of
-       messages whose queue file name  was  fixed  with  <b>-s</b>.  The
+       messages  whose  queue  file  name  was fixed with <b>-s</b>. The
        report is written to the standard error stream and to <b>sys-</b>
        <b>logd</b>.
 
@@ -158,22 +160,26 @@ POSTSUPER(1)                                         POSTSUPER(1)
               Directory with the <b>main.cf</b> file.
 
 <b>BUGS</b>
-       Mail that is not sanitized by Postfix (i.e.  mail  in  the
+       Mail  that  is  not sanitized by Postfix (i.e. mail in the
        <b>maildrop</b> queue) cannot be placed "on hold".
 
 <b>CONFIGURATION</b> <b>PARAMETERS</b>
-       See  the  Postfix  <b>main.cf</b> file for syntax details and for
+       See the Postfix <b>main.cf</b> file for syntax  details  and  for
        default values.
 
        <b>hash</b><i>_</i><b>queue</b><i>_</i><b>depth</b>
               Number of subdirectory levels for hashed queues.
 
        <b>hash</b><i>_</i><b>queue</b><i>_</i><b>names</b>
-              The names of queues that are organized into  multi-
+              The  names of queues that are organized into multi-
               ple levels of subdirectories.
 
+<b>SEE</b> <b>ALSO</b>
+       <a href="sendmail.1.html">sendmail(1)</a> sendmail-compatible user interface
+       <a href="postqueue.1.html">postqueue(1)</a> unprivileged queue operations
+
 <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 96dc9abafdb4e099008f759d2d39ce59225b423c..12dad01ac99cea9415482781369812eb422fca16 100644 (file)
@@ -80,9 +80,9 @@ PROXYMAP(8)                                           PROXYMAP(8)
        connections.  When all servers are  busy  while  a  client
        connects,  the  master  creates a new proxymap server pro-
        cess, provided that the proxymap server process  limit  is
-       not  exceeded.   Each  proxymap server stops accepting new
-       connections after serving <b>$max</b><i>_</i><b>use</b> clients  or  terminates
-       after <b>$max</b><i>_</i><b>idle</b> seconds of idle time.
+       not exceeded.  Each proxymap server terminates after serv-
+       ing at least <b>$max</b><i>_</i><b>use</b> clients or after  <b>$max</b><i>_</i><b>idle</b>  seconds
+       of idle time.
 
 <b>SECURITY</b>
        The  proxymap  server  opens only tables that are approved
index a4e957ef850849879e729db224fcaf92b93fcc69..624820adbc4756ad275c47fa001605cc05efb5b0 100644 (file)
@@ -90,7 +90,9 @@ REGEXP_TABLE(5)                                   REGEXP_TABLE(5)
        /^postmaster@/       OK
 
        # Protect your outgoing majordomo exploders
-       /^(.*)-outgoing@(.*)$/!/^owner-/         550 Use ${1}@${2} instead
+       if !/^owner-/
+       /^(.*)-outgoing@(.*)$/   550 Use ${1}@${2} instead
+       endif
 
 <b>EXAMPLE</b> <b>HEADER</b> <b>FILTER</b> <b>MAP</b>
        # These were once common in junk mail.
index 9705a6732653b48ebc28431d3f7fb7431e430fc9..bc7f10c9957e66df6a04037c605e3ffd7e575939 100644 (file)
@@ -81,9 +81,9 @@ TRIVIAL-REWRITE(8)                             TRIVIAL-REWRITE(8)
        taneous connections.  When all servers are  busy  while  a
        client  connects, the master creates a new server process,
        provided that the trivial-rewrite server process limit  is
-       not exceeded.  Each trivial-rewrite server stops accepting
-       new connections after serving <b>$max</b><i>_</i><b>use</b> clients  or  termi-
-       nates after <b>$max</b><i>_</i><b>idle</b> seconds of idle time.
+       not  exceeded.   Each  trivial-rewrite  server  terminates
+       after serving at least <b>$max</b><i>_</i><b>use</b> clients of after <b>$max</b><i>_</i><b>idle</b>
+       seconds of idle time.
 
 <b>STANDARDS</b>
        None.  The  command  does  not  interact  with the outside
index da8f3d5ee8090107702bc6da77f9c5b00bd5b332..491bfccbfbaca38c5ad792ccd19cae581522f0b8 100644 (file)
@@ -17,8 +17,11 @@ Postfix queue control
 .ad
 .fi
 The \fBpostqueue\fR program implements the Postfix user interface
-for queue management. It implements all the operations that are
+for queue management. It implements operations that are
 traditionally available via the \fBsendmail\fR(1) command.
+See the \fBpostsuper\fR(1) command for queue operations
+that require super-user privileges such as deleting a message
+from the queue or changing the status of a message.
 
 The following options are recognized:
 .IP "\fB-c \fIconfig_dir\fR"
@@ -112,7 +115,8 @@ request and in the \fBsendmail -qR\fR command.
 .SH SEE ALSO
 .na
 .nf
-sendmail(8) sendmail-compatible user interface
+sendmail(1) sendmail-compatible user interface
+postsuper(1) privileged queue operations
 qmgr(8) queue manager
 showq(8) list mail queue
 flush(8) fast flush service
index 4884c72029d4e765b7c8450061ff91f2f63264ae..cbd50485dfddeaabfe77a9b9fd5ccd2becc629c7 100644 (file)
@@ -18,6 +18,8 @@ Postfix superintendent
 .fi
 The \fBpostsuper\fR command does maintenance jobs on the Postfix
 queue. Use of the command is restricted to the superuser.
+See the \fBpostqueue\fR command for unprivileged queue operations
+such as listing or flushing the mail queue.
 
 By default, \fBpostsuper\fR performs the operations requested with the
 \fB-s\fR and \fB-p\fR command-line options on all Postfix queue
@@ -176,6 +178,11 @@ Number of subdirectory levels for hashed queues.
 .IP \fBhash_queue_names\fR
 The names of queues that are organized into multiple levels of
 subdirectories.
+.SH SEE ALSO
+.na
+.nf
+sendmail(1) sendmail-compatible user interface
+postqueue(1) unprivileged queue operations
 .SH LICENSE
 .na
 .nf
index 0aa3df518eb953296996f359559ca1ebeff8aa2a..8b418efe2f57faef2b0d905943d95525b80d6cdd 100644 (file)
@@ -84,7 +84,9 @@ by whitespace.
 /^postmaster@/       OK
 
 # Protect your outgoing majordomo exploders
-/^(.*)-outgoing@(.*)$/!/^owner-/         550 Use ${1}@${2} instead
+if !/^owner-/
+/^(.*)-outgoing@(.*)$/   550 Use ${1}@${2} instead
+endif
 .SH EXAMPLE HEADER FILTER MAP
 .na
 .nf
index 149b2d6e61fb872faa49aa829f3d584f9489dd05..b36119748a419a03abd4204ee5b2f0187910cfe8 100644 (file)
@@ -77,8 +77,8 @@ server.  Each server can handle multiple simultaneous connections.
 When all servers are busy while a client connects, the master
 creates a new proxymap server process, provided that the proxymap
 server process limit is not exceeded.
-Each proxymap server stops accepting new connections after serving
-\fB$max_use\fR clients or terminates after \fB$max_idle\fR seconds
+Each proxymap server terminates after serving
+at least \fB$max_use\fR clients or after \fB$max_idle\fR seconds
 of idle time.
 .SH SECURITY
 .na
index 807bcb85e12cfdec8b2d602daf411776eb5650a4..a768b873e329ae78e76707951aa156f5a85af0f8 100644 (file)
@@ -75,8 +75,8 @@ server.  Each server can handle multiple simultaneous connections.
 When all servers are busy while a client connects, the master
 creates a new server process, provided that the trivial-rewrite
 server process limit is not exceeded.
-Each trivial-rewrite server stops accepting new connections after
-serving \fB$max_use\fR clients or terminates after \fB$max_idle\fR
+Each trivial-rewrite server terminates after
+serving at least \fB$max_use\fR clients of after \fB$max_idle\fR
 seconds of idle time.
 .SH STANDARDS
 .na
index d275f7b8debc5c340693e1ed090d4f5f7f1c89f3..6c7ab4553d016d8f044749d91b0a2e45117b2453 100644 (file)
@@ -76,7 +76,9 @@
 #      /^postmaster@/       OK
 #
 #      # Protect your outgoing majordomo exploders
-#      /^(.*)-outgoing@(.*)$/!/^owner-/         550 Use ${1}@${2} instead
+#      if !/^owner-/
+#      /^(.*)-outgoing@(.*)$/   550 Use ${1}@${2} instead
+#      endif
 # EXAMPLE HEADER FILTER MAP
 #      # These were once common in junk mail.
 #      /^Subject: make money fast/     REJECT
index 5fff208884a09af2fbf0af329eccfc7507c3f4f8..b7283fde0fdcfbdcf4ec56f6946735cb7eff7ab1 100644 (file)
@@ -316,6 +316,9 @@ static int cleanup_act(CLEANUP_STATE *state, char *context, const char *buf,
     if (STREQUAL(value, "FILTER", command_len)) {
        if (*optional_text == 0) {
            msg_warn("missing FILTER command argument in %s map", map_class);
+       } else if (strchr(optional_text, ':') == 0) {
+           msg_warn("bad FILTER command %s in %s, need transport:destination",
+                    optional_text, map_class);
        } else {
            if (state->filter)
                myfree(state->filter);
index 70bc5b87f7f0f2f5a348ee08bd88ff050615654a..67fff08f2f2e376dd316cd6a90c8cfd5c8009dab 100644 (file)
@@ -110,6 +110,7 @@ static const char *dict_proxy_lookup(DICT *dict, const char *key)
                       ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, dict_proxy->in_flags,
                       ATTR_TYPE_STR, MAIL_ATTR_KEY, key,
                       ATTR_TYPE_END) != 0
+           || vstream_fflush(stream)
            || attr_scan(stream, ATTR_FLAG_STRICT,
                         ATTR_TYPE_NUM, MAIL_ATTR_STATUS, &status,
                         ATTR_TYPE_STR, MAIL_ATTR_VALUE, dict_proxy->result,
index 6ff928d0c3fa33929ee52d4428b02ebb66bab7e7..31e08b42b4b5bbd1e5b3113824e1c47dd87b1353 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      "20030107"
+#define MAIL_RELEASE_DATE      "20030109"
 
 #define VAR_MAIL_VERSION       "mail_version"
 #define DEF_MAIL_VERSION       "2.0.0-" MAIL_RELEASE_DATE
index 698617952d52e4aae5a0c9ef7e43a9774fcf3365..c6f1e2dd57484f4f7e5df85ce27391d7937fee2e 100644 (file)
@@ -189,6 +189,7 @@ void    resolve_clnt_query(const char *addr, RESOLVE_REPLY *reply)
                       ATTR_TYPE_STR, MAIL_ATTR_REQ, RESOLVE_ADDR,
                       ATTR_TYPE_STR, MAIL_ATTR_ADDR, addr,
                       ATTR_TYPE_END) != 0
+           || vstream_fflush(stream)
            || attr_scan(stream, ATTR_FLAG_STRICT,
                       ATTR_TYPE_STR, MAIL_ATTR_TRANSPORT, reply->transport,
                         ATTR_TYPE_STR, MAIL_ATTR_NEXTHOP, reply->nexthop,
index 24bb4d4326ac8a9e0466a2980b044c532aaaf067..2d76065356a1633142f79eb1a376d4dcee4f0fb4 100644 (file)
@@ -131,6 +131,7 @@ VSTRING *rewrite_clnt(const char *rule, const char *addr, VSTRING *result)
                       ATTR_TYPE_STR, MAIL_ATTR_RULE, rule,
                       ATTR_TYPE_STR, MAIL_ATTR_ADDR, addr,
                       ATTR_TYPE_END) != 0
+           || vstream_fflush(stream)
            || attr_scan(stream, ATTR_FLAG_STRICT,
                         ATTR_TYPE_STR, MAIL_ATTR_ADDR, result,
                         ATTR_TYPE_END) != 1) {
index dd7a09156ac1dd93db4d3c38b38cb49daa81c5ba..6ee65183f110f9e7ab874c407ef8f6f776fe20b2 100644 (file)
@@ -122,6 +122,7 @@ int     verify_clnt_query(const char *addr, int *addr_status, VSTRING *why)
                       ATTR_TYPE_STR, MAIL_ATTR_REQ, VRFY_REQ_QUERY,
                       ATTR_TYPE_STR, MAIL_ATTR_ADDR, addr,
                       ATTR_TYPE_END) != 0
+           || vstream_fflush(stream)
            || attr_scan(stream, ATTR_FLAG_MISSING,
                         ATTR_TYPE_NUM, MAIL_ATTR_STATUS, &request_status,
                         ATTR_TYPE_NUM, MAIL_ATTR_ADDR_STATUS, addr_status,
index f4d12996d092e499781ffe6caca87a3be75664a3..5e2b487253562de7172f04eef1dec80899c99747 100644 (file)
 /*     This value is taken from the global \fBmain.cf\fR configuration
 /*     file. Setting \fBvar_use_limit\fR to zero disables the client limit.
 /*
-/*     When the use count reaches the use limit, the process no longer
-/*     accepts new connections.  Once all existing clients disconnect the
-/*     process terminates.
-/*
 /*     The var_idle_limit variable limits the time that a service
 /*     receives no client connection requests before it commits suicide.
 /*     This value is taken from the global \fBmain.cf\fR configuration
@@ -241,6 +237,7 @@ void    multi_server_disconnect(VSTREAM *stream)
     event_disable_readwrite(vstream_fileno(stream));
     (void) vstream_fclose(stream);
     client_count--;
+    use_count++;
 }
 
 /* multi_server_execute - in case (char *) != (struct *) */
@@ -258,10 +255,10 @@ static void multi_server_execute(int unused_event, char *context)
      * Do not bother the application when the client disconnected.
      */
     if (peekfd(vstream_fileno(stream)) > 0) {
-       if (var_use_limit >= 0 && master_notify(var_pid, MASTER_STAT_TAKEN) < 0)
+       if (master_notify(var_pid, MASTER_STAT_TAKEN) < 0)
            multi_server_abort(EVENT_NULL_TYPE, EVENT_NULL_CONTEXT);
        multi_server_service(stream, multi_server_name, multi_server_argv);
-       if (var_use_limit >= 0 && master_notify(var_pid, MASTER_STAT_AVAIL) < 0)
+       if (master_notify(var_pid, MASTER_STAT_AVAIL) < 0)
            multi_server_abort(EVENT_NULL_TYPE, EVENT_NULL_CONTEXT);
     } else {
        multi_server_disconnect(stream);
@@ -291,7 +288,6 @@ static void multi_server_wakeup(int fd)
     non_blocking(fd, BLOCKING);
     close_on_exec(fd, CLOSE_ON_EXEC);
     client_count++;
-    use_count++;
     stream = vstream_fdopen(fd, O_RDWR);
     tmp = concatenate(multi_server_name, " socket", (char *) 0);
     vstream_control(stream, VSTREAM_CTL_PATH, tmp, VSTREAM_CTL_END);
@@ -682,43 +678,7 @@ NORETURN multi_server_main(int argc, char **argv, MULTI_SERVER_FN service,...)
     /*
      * The event loop, at last.
      */
-    for (;;) {
-
-       /*
-        * When the use count reaches the use limit, notify the master daemon
-        * that we are no longer listening, close the listen sockets, and
-        * dispose of the accept lock if any. A use_limit < 0 indicates that
-        * the client limit was reached.
-        */
-       if (var_use_limit > 0 && use_count >= var_use_limit) {
-           if (msg_verbose)
-               msg_info("use limit reached -- closing listen socket");
-           if (master_notify(var_pid, MASTER_STAT_TAKEN) < 0)
-               multi_server_abort(EVENT_NULL_TYPE, EVENT_NULL_CONTEXT);
-           for (fd = MASTER_LISTEN_FD; fd < MASTER_LISTEN_FD + socket_count; fd++) {
-               event_disable_readwrite(fd);
-               (void) close(fd);
-           }
-           if (multi_server_lock != 0) {
-               (void) vstream_fclose(multi_server_lock);
-               multi_server_lock = 0;
-           }
-           var_use_limit = -1;
-       }
-
-       /*
-        * Terminate if the client limit was reached and no connections remain.
-        */
-       if (var_use_limit < 0 && client_count == 0) {
-           if (msg_verbose)
-               msg_info("all clients disconnected -- exiting");
-           break;
-       }
-
-       /*
-        * Grab the optional accept lock, do some optional idle processing,
-        * and wait for the next event.
-        */
+    while (var_use_limit == 0 || use_count < var_use_limit || client_count > 0) {
        if (multi_server_lock != 0) {
            watchdog_stop(watchdog);
            if (myflock(vstream_fileno(multi_server_lock), INTERNAL_LOCK,
index 41b15b44c66ea313fd73cf34510db40806bb9ba1..5189518b4a88ded8c56d6176e79701113d349c8b 100644 (file)
 /*     \fBpostqueue\fR [\fB-c \fIconfig_dir\fR] \fB-s \fIsite\fR
 /* DESCRIPTION
 /*     The \fBpostqueue\fR program implements the Postfix user interface
-/*     for queue management. It implements all the operations that are
+/*     for queue management. It implements operations that are
 /*     traditionally available via the \fBsendmail\fR(1) command.
+/*     See the \fBpostsuper\fR(1) command for queue operations
+/*     that require super-user privileges such as deleting a message
+/*     from the queue or changing the status of a message.
 /*
 /*     The following options are recognized:
 /* .IP "\fB-c \fIconfig_dir\fR"
@@ -94,7 +97,8 @@
 /*     specifies the domains that Postfix accepts in the SMTP \fBETRN\fR
 /*     request and in the \fBsendmail -qR\fR command.
 /* SEE ALSO
-/*     sendmail(8) sendmail-compatible user interface
+/*     sendmail(1) sendmail-compatible user interface
+/*     postsuper(1) privileged queue operations
 /*     qmgr(8) queue manager
 /*     showq(8) list mail queue
 /*     flush(8) fast flush service
index 1565d2a171e1dde02fb71a727ceba2b6baa76e38..3247a2c0015b07238f5db28e8284317704897aeb 100644 (file)
@@ -12,6 +12,8 @@
 /* DESCRIPTION
 /*     The \fBpostsuper\fR command does maintenance jobs on the Postfix
 /*     queue. Use of the command is restricted to the superuser.
+/*     See the \fBpostqueue\fR command for unprivileged queue operations
+/*     such as listing or flushing the mail queue.
 /*
 /*     By default, \fBpostsuper\fR performs the operations requested with the
 /*     \fB-s\fR and \fB-p\fR command-line options on all Postfix queue
 /* .IP \fBhash_queue_names\fR
 /*     The names of queues that are organized into multiple levels of
 /*     subdirectories.
+/* SEE ALSO
+/*     sendmail(1) sendmail-compatible user interface
+/*     postqueue(1) unprivileged queue operations
 /* LICENSE
 /* .ad
 /* .fi
index 345862e0b74389a82e3a475847732e389333cc93..a318a6291622362fa885fb17c10fc47a3f2af3d1 100644 (file)
@@ -69,8 +69,8 @@
 /*     When all servers are busy while a client connects, the master
 /*     creates a new proxymap server process, provided that the proxymap
 /*     server process limit is not exceeded.
-/*     Each proxymap server stops accepting new connections after serving
-/*     \fB$max_use\fR clients or terminates after \fB$max_idle\fR seconds
+/*     Each proxymap server terminates after serving
+/*     at least \fB$max_use\fR clients or after \fB$max_idle\fR seconds
 /*     of idle time.
 /* SECURITY
 /* .ad
@@ -359,7 +359,8 @@ static void post_jail_init(char *unused_name, char **unused_argv)
        do {
            type_name += PROXY_COLON_LEN;
        } while (!strncmp(type_name, PROXY_COLON, PROXY_COLON_LEN));
-       if (htable_locate(proxy_read_maps, type_name) == 0)
+       if (strchr(type_name, ':') != 0
+           && htable_locate(proxy_read_maps, type_name) == 0)
            (void) htable_enter(proxy_read_maps, type_name, (char *) 0);
     }
     myfree(saved_filter);
index 7e3e5ca8e8826ad5194674e703d3e4c8a2d62bdd..4761d12565797a8087106efa6ca1b98989872bb5 100644 (file)
@@ -1758,6 +1758,10 @@ static int check_table_result(SMTPD_STATE *state, const char *table,
            msg_warn("access map %s entry %s has FILTER entry without value",
                     table, datum);
            return (SMTPD_CHECK_DUNNO);
+       } else if (strchr(cmd_text, ':') == 0) {
+           msg_warn("access map %s entry %s requires transport:destination",
+                    table, datum);
+           return (SMTPD_CHECK_DUNNO);
        } else {
            vstring_sprintf(error_text, "<%s>: %s triggers FILTER %s",
                            reply_name, reply_class, cmd_text);
index 504a777d07c25c29da1b1e7d4c5de367ca5a37ab..28abcb63a8b086108c6f06cf85638348ccbe16b1 100644 (file)
@@ -294,6 +294,8 @@ int     transport_lookup(const char *addr, const char *rcpt_domain,
     /*
      * Fall back to the wild-card entry.
      */
+    if (transport_errno) 
+       transport_wildcard_init();
     if (transport_errno) {
        dict_errno = transport_errno;
        RETURN_FREE(NOTFOUND);
index 60948ec95a181f8c2c8dc7d89b2c89968c0e9afb..759e8e3170e91837e1ca3e504fe1a7eafe226ea1 100644 (file)
@@ -65,8 +65,8 @@
 /*     When all servers are busy while a client connects, the master
 /*     creates a new server process, provided that the trivial-rewrite
 /*     server process limit is not exceeded.
-/*     Each trivial-rewrite server stops accepting new connections after
-/*     serving \fB$max_use\fR clients or terminates after \fB$max_idle\fR
+/*     Each trivial-rewrite server terminates after
+/*     serving at least \fB$max_use\fR clients of after \fB$max_idle\fR
 /*     seconds of idle time.
 /* STANDARDS
 /* .ad