]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.0.10 v2.0.10
authorWietse Venema <wietse@porcupine.org>
Wed, 21 May 2003 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 15:51:46 +0000 (15:51 +0000)
26 files changed:
postfix/HISTORY
postfix/README_FILES/FILTER_README
postfix/README_FILES/SASL_README
postfix/README_FILES/VIRTUAL_README
postfix/conf/master.cf
postfix/conf/pcre_table
postfix/conf/sample-mime.cf
postfix/conf/sample-pcre-access.cf
postfix/conf/sample-regexp-access.cf
postfix/html/cleanup.8.html
postfix/html/pcre_table.5.html
postfix/man/man5/pcre_table.5
postfix/man/man8/cleanup.8
postfix/proto/pcre_table
postfix/src/cleanup/cleanup.c
postfix/src/cleanup/cleanup_envelope.c
postfix/src/cleanup/cleanup_extracted.c
postfix/src/global/mail_queue.c
postfix/src/global/mail_version.h
postfix/src/local/token.c
postfix/src/pickup/pickup.c
postfix/src/postdrop/postdrop.c
postfix/src/postsuper/postsuper.c
postfix/src/proxymap/proxymap.c
postfix/src/sendmail/sendmail.c
postfix/src/util/readlline.c

index d71d9a292c0969488ae7243fe076e44f38a144bd..b92b35e4c4b7166d944314964d13876b6a158b8c 100644 (file)
@@ -7727,9 +7727,48 @@ Apologies for any names omitted.
        and 2) MIME input processing is turned off, and 3) MIME
        8bit->7bit conversion is requested upon delivery via SMTP.
 
+20030424
+
+       Cleanup: readlline() did not terminate the result before
+       complaining about lines starting with whitespace.
+
+       Cleanup: eliminated valid_hostname warning for invalid
+       queue file names. File: global/mail_queue.c.
+
+       Bugfix: the Postfix sendmail command applied the message
+       size limit when running as newaliases. The limiting code
+       is now moved to the message enqueuing branch of the code.
+       File: sendmail/sendmail.c.
+
+20030429
+
+       Bugfix: "," was not recognized in proxy_read_maps settings.
+       Fix by Leandro Santi. File: proxymap/proxymap.c.
+
+20030502
+
+       Bugfix: defer delivery after .forward etc. file read error.
+       File: local/token.c. Problem reported by Ben Rosengart,
+       Panix.
+
+20030520
+
+       Cleanup: future time stamps in Received: headers and negative
+       delays in delivery agent logging after "postdrop -r",
+       because deferred queue files had future file modification
+       times.  File:  src/postsuper/postsuper.c.
+
+20030521
+
+       Cleanup: nqmgr warnings about "recipient count mismatch"
+       after "postdrop -r", because the cleanup server did not
+       count the "already done" recipients. Problem reported by
+       Richard Stockton, Gramma Software. Files:
+       cleanup/cleanup_envelope.c, cleanup/cleanup_extracted.c
+
 Open problems:
 
-        Low: smtp-source may block when sending large test messages.
+       Low: smtp-source may block when sending large test messages.
 
        Low: after successful delivery, per-queue window += 1/window,
        after failure, queue window -= 1 (Victor).
index e59ccfa510d41e82214acc752b2e53a242b2e52f..ecdf61d717b55de1bc418717362f69c8b548e434 100644 (file)
@@ -236,8 +236,9 @@ program.
 
 Note: the localhost port 10025 SMTP server filter should announce
 itself as "220 localhost...".  Postfix aborts delivery when it
-connects to an SMTP server that uses the same hostname, because
-that normally means you have a mail delivery loop problem.
+connects to an SMTP server that uses the same hostname as Postfix
+("host <servername> greeted me with my own hostname"), because that
+normally means you have a mail delivery loop problem.
 
 The example here assumes that the /some/where/filter command is a
 PERL script. PERL has modules that make talking SMTP easy. The
@@ -280,9 +281,9 @@ mail.
 The "-o local_recipient_maps=" and "-o relay_recipient_maps=" avoid
 unnecessary table lookups.
 
-The "-o myhostname=localhost.domain.tld" avoids a possible problem
-if your content filter is based on a proxy that simply relays SMTP
-commands.
+The "-o myhostname=localhost.domain.tld" avoids false alarms ("host
+<servername> greeted me with my own hostname") if your content
+filter is based on a proxy that simply relays SMTP commands.
 
 The "-o smtpd_xxx_restrictions" and "-o mynetworks=127.0.0.0/8"
 turn off UCE controls that would only waste time here.
index e2d1d39df6ceda4e11ff1b693888070e0d457c54..b2b6aa9a492e4ee470e2a20fa1a1aa4d35c4e8e9 100644 (file)
@@ -50,7 +50,8 @@ UCE restriction.
 
 SASL authentication information is not passed on via message headers
 or via SMTP.  It is no-one's business what username and authentication
-method the poster was using in order to access the mail server.
+method the poster was using in order to access the mail server. The
+people who need to know can find the information in the maillog file.
 
 When sending mail, Postfix looks up the server hostname or destination
 domain (the address remote part) in a table, and if a username/password
@@ -227,6 +228,19 @@ can use one of the following commands:
 mmencode is part of the metamail software.
 MIME::Base64 is available from www.cpan.org.
 
+Trouble shooting the SASL internals
+===================================
+
+[based on text by Liviu Daia]
+
+In the Cyrus SASL sources you'll find a subdirectory named "sample".
+Run make there, then run the resulting sample server and client in
+separate terminals.  Strace / ktrace / truss the server to see what
+makes it unhappy, fix the problem, then write the authors thanking
+them for providing such useful logging.  Repeat the previous step
+until you can successfully authenticate with the sample client.
+Only then get back to Postfix.
+
 Enabling SASL authentication in the Postfix SMTP client
 =======================================================
 
index fd833bc0a5484980018d840f96a6659fa0af465d..5c9df76137f60ee0644194f185ea345cda4c23a3 100644 (file)
@@ -24,12 +24,13 @@ It looks up the user mailbox location, uid and gid via separate
 maps, and the mailbox location map can specify either mailbox or
 maildir delivery (controlled by trailing slash on mailbox name).
 
-The agent does not support user+foo address extensions, aliases or
-.forward files (use the virtual table instead), and therefore
-doesn't support file or program aliases. This choice was made to
-simplify and streamline the code (it allowed me to dispense with
-70% of local's code - mostly the bits that are a security headache)
-- if you need this functionality, this agent isn't for you.
+The agent allows but ignores user+foo address extensions, does not
+support aliases or .forward files (use the virtual table instead),
+and therefore doesn't support file or program aliases. This choice
+was made to simplify and streamline the code (it allowed me to
+dispense with 70% of local's code - mostly the bits that are a
+security headache) - if you need this functionality, this agent
+isn't for you.
 
 It also doesn't support writing to a common spool as root and then
 chowning the mailbox to the user - I felt this functionality didn't
@@ -67,7 +68,7 @@ virtual_mailbox_domains
 
     Specifies the list of domains that should be delivered to the
     $virtual_transport delivery agent (default: virtual). As of
-    version 1.2, Postfix is smart enough that you don't have to
+    version 2.0, Postfix is smart enough that you don't have to
     list every virtual domain in a Postfix transport map.
 
 virtual_mailbox_maps
@@ -160,9 +161,9 @@ Example 1: using the virtual delivery agent for all local mail
 ==============================================================
 
 This example does not use the Postfix local delivery agent at all.
-With this configuration Postfix does no user+foo address extension,
-no alias expansion, no .forward file expansion, and no lookups of
-recipients in /etc/passwd.
+With this configuration Postfix does no alias expansion, no .forward
+file expansion, no lookups of recipients in /etc/passwd, and allows
+but ignores user+foo address extensions.
 
 Instead of "hash" specify "dbm" or "btree", depending on your system
 type.  The command "postconf -m" displays possible lookup table
index 80857d088497a341575d2337a38fc4e36f6c30d3..24ecff7865ba2f837acfd8fb5eeb8aa36e73f270 100644 (file)
@@ -1,8 +1,14 @@
 #
-# Postfix master process configuration file.  Each line describes how
-# a mailer component program should be run. The fields that make up
-# each line are described below. A "-" field value requests that a
-# default value be used for that field.
+# Postfix master process configuration file.  Each logical line
+# describes how a Postfix daemon program should be run.
+#
+# A logical line starts with non-whitespace, non-comment text. 
+# Empty lines and whitespace-only lines are ignored, as are comment
+# lines whose first non-whitespace character is a `#'.
+# A line that starts with whitespace continues a logical line.
+#
+# The fields that make up each line are described below. A "-" field
+# value requests that a default value be used for that field.
 #
 # Service: any name that is valid for the specified transport type
 # (the next field).  With INET transports, a service is specified as
 # SPECIFY ONLY PROGRAMS THAT ARE WRITTEN TO RUN AS POSTFIX DAEMONS.
 # ALL DAEMONS SPECIFIED HERE MUST SPEAK A POSTFIX-INTERNAL PROTOCOL.
 #
-# DO NOT CHANGE THE ZERO PROCESS LIMIT FOR CLEANUP/BOUNCE/DEFER OR
-# POSTFIX WILL BECOME STUCK UP UNDER HEAVY LOAD
-#
-# DO NOT CHANGE THE ONE PROCESS LIMIT FOR PICKUP/QMGR OR POSTFIX WILL
-# DELIVER MAIL MULTIPLE TIMES.
-#
 # DO NOT SHARE THE POSTFIX QUEUE BETWEEN MULTIPLE POSTFIX INSTANCES.
 #
 # ==========================================================================
index c8db65bac1a2060b474dc854a3a8f9365d04ed62..ad5bd0bc9d662476e4d57b74cdae9e02e5ceaafb 100644 (file)
 # 
 # EXAMPLE SMTPD ACCESS MAP
 #        # Protect your outgoing majordomo exploders
-#        /^(?!owner-)(.*)-outgoing@/     550 Use ${1}@${2} instead
+#        /^(?!owner-)(.*)-outgoing@(.*)/ 550 Use ${1}@${2} instead
 # 
 #        # Bounce friend@whatever, except when whatever is our domain (you would
 #        # be better just bouncing all friend@ mail - this is just an example).
index 67aa228003a084273a793a0f742372defd521c05..ac4d9f2417582a09dc21415a2a70e37225d3105c 100644 (file)
@@ -66,4 +66,4 @@ strict_8bitmime = no
 # 
 # This blocks mail from poorly written mail software.
 # 
-strict_mime_domain_encoding = no
+strict_mime_encoding_domain = no
index c9735698f8a932e5453d7f6b4356a3609f07a8ca..03aa27a8c82d406ab31acec0a7e87b7de27ef47c 100644 (file)
@@ -45,7 +45,7 @@
 
 # Protect your outgoing majordomo exploders
 #
-/^(?!owner-)(.*)-outgoing@/            550 Use ${1}@${2} instead
+/^(?!owner-)(.*)-outgoing@(.*)/                550 Use ${1}@${2} instead
 
 
 # Bounce friend@whatever, except when whatever is our domain (you would
index 6d6d1c27ec3fdf8badc8d43cd61db406de784e6d..10df2529d1cda1fd51999754fd5f85fb95ca6f1f 100644 (file)
@@ -30,4 +30,6 @@
 /^postmaster@/                         OK
 
 # Protect your outgoing majordomo exploders
-/^(.*)-outgoing@(.*)$/!/^owner-.*/     550 Use ${1}@${2} instead
+if !/^owner-.*/
+/^(.*)-outgoing@(.*)$/                 550 Use ${1}@${2} instead
+endif
index 0e793b6a2c2a48c9677e8556dada499b6d258f22..1a50ad5ad43c8bfa80b25dc43ef18c771fcb8571 100644 (file)
@@ -133,7 +133,7 @@ CLEANUP(8)                                             CLEANUP(8)
               ple,  bounces  from  qmail  or from old versions of
               Postfix).
 
-       <b>strict</b><i>_</i><b>mime</b><i>_</i><b>domain</b><i>_</i><b>encoding</b>
+       <b>strict</b><i>_</i><b>mime</b><i>_</i><b>encoding</b><i>_</i><b>domain</b>
               Reject mail with invalid <b>Content-Transfer-Encoding:</b>
               information  for  message/*  or  multipart/*.  This
               blocks mail from poorly written software.
index 31da45f43a9e97daf6f6735fcd3c7618fa31f0e9..6be1fd8c71f76fb70e804f6f859b38593416b0ba 100644 (file)
@@ -136,7 +136,7 @@ PCRE_TABLE(5)                                       PCRE_TABLE(5)
 
 <b>EXAMPLE</b> <b>SMTPD</b> <b>ACCESS</b> <b>MAP</b>
        # Protect your outgoing majordomo exploders
-       /^(?!owner-)(.*)-outgoing@/     550 Use ${1}@${2} instead
+       /^(?!owner-)(.*)-outgoing@(.*)/ 550 Use ${1}@${2} instead
 
        # Bounce friend@whatever, except when whatever is our domain (you would
        # be better just bouncing all friend@ mail - this is just an example).
index 6293ed4a8c413b558913034865041948f1da9841..7fcedcb888dff91b08e73c4c1621fcf7ef4641cd 100644 (file)
@@ -119,7 +119,7 @@ or $(n) if they aren't followed by whitespace.
 .na
 .nf
 # Protect your outgoing majordomo exploders
-/^(?!owner-)(.*)-outgoing@/     550 Use ${1}@${2} instead
+/^(?!owner-)(.*)-outgoing@(.*)/ 550 Use ${1}@${2} instead
 
 # Bounce friend@whatever, except when whatever is our domain (you would
 # be better just bouncing all friend@ mail - this is just an example).
index 19a0106f59e67b2946fbb657f4a7bea2f6fd4287..8505ae271f0241898dc6fe26863a29c245d00762 100644 (file)
@@ -121,7 +121,7 @@ this also breaks majordomo approval requests when the included
 request contains valid 8-bit MIME mail, and it breaks bounces from
 mailers that do not properly encapsulate 8-bit content (for example,
 bounces from qmail or from old versions of Postfix).
-.IP \fBstrict_mime_domain_encoding\fR
+.IP \fBstrict_mime_encoding_domain\fR
 Reject mail with invalid \fBContent-Transfer-Encoding:\fR
 information for message/* or multipart/*. This blocks mail
 from poorly written software.
index c8512c70c87100c1b526287765cc78fda09b3d8e..eab2ebbee5ce2db300389b008cc0e4ee19f78d07 100644 (file)
 #      or $(n) if they aren't followed by whitespace.
 # EXAMPLE SMTPD ACCESS MAP
 #      # Protect your outgoing majordomo exploders
-#      /^(?!owner-)(.*)-outgoing@/     550 Use ${1}@${2} instead
+#      /^(?!owner-)(.*)-outgoing@(.*)/ 550 Use ${1}@${2} instead
 #
 #      # Bounce friend@whatever, except when whatever is our domain (you would
 #      # be better just bouncing all friend@ mail - this is just an example).
index ba7b6bf326385e7343d4d084159e0a401f61b6ff..b5a20a16594d89ffb4fe349335690d0281a39eb4 100644 (file)
 /*     request contains valid 8-bit MIME mail, and it breaks bounces from
 /*     mailers that do not properly encapsulate 8-bit content (for example,
 /*     bounces from qmail or from old versions of Postfix).
-/* .IP \fBstrict_mime_domain_encoding\fR
+/* .IP \fBstrict_mime_encoding_domain\fR
 /*     Reject mail with invalid \fBContent-Transfer-Encoding:\fR
 /*     information for message/* or multipart/*. This blocks mail
 /*     from poorly written software.
index 77734a8b0af3ddb317b29ef27af4069f2ad2bc03..950be4a5c3c2819bcae04d36ab675ee97d1cf6b2 100644 (file)
@@ -207,6 +207,8 @@ static void cleanup_envelope_process(CLEANUP_STATE *state, int type, char *buf,
        vstring_free(clean_addr);
        myfree(state->orig_rcpt);
        state->orig_rcpt = 0;
+    } else if (type == REC_TYPE_DONE) {
+        /* void */ ;
     } else if (type == REC_TYPE_WARN) {
        if ((state->warn_time = atol(buf)) < 0) {
            state->errs |= CLEANUP_STAT_BAD;
index 19131642d11718a7068958665e9749a89d21e15d..93aa0f0716bcedf9b0b04aa7abc316dd0d0c99e0 100644 (file)
@@ -160,8 +160,11 @@ static void cleanup_extracted_process(CLEANUP_STATE *state, int type, char *buf,
        myfree(state->orig_rcpt);
        state->orig_rcpt = 0;
        return;
+    } else if (type == REC_TYPE_DONE) {
+       return;
     } else if (type == REC_TYPE_ORCP) {
        state->orig_rcpt = mystrdup(buf);
+       return;
     }
     if (type != REC_TYPE_END) {
        cleanup_out(state, type, buf, len);
index 54916c8b59fd1a2b8ee9477d4ea2221afc4f909c..bb00522fc112d1de14bf70de3aa4cb8cdfc3204b 100644 (file)
@@ -311,7 +311,7 @@ int     mail_queue_id_ok(const char *queue_id)
     /*
      * OK if in valid hostname form.
      */
-    return (valid_hostname(queue_id, DO_GRIPE));
+    return (valid_hostname(queue_id, DONT_GRIPE));
 }
 
 /* mail_queue_enter - make mail queue entry with locally-unique name */
index c3e5ca9252f14e593b98f4b310702203c13617ce..9df4cebceed4f3543e92e1a41187c2cc9a8090e7 100644 (file)
   * 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      "20030418"
+#define MAIL_RELEASE_DATE      "20030521"
 
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "2.0.9"
+#define DEF_MAIL_VERSION       "2.0.10"
 extern char *var_mail_version;
 
  /*
index c427eb7042c4b24e1985822fe12722cda427804e..897def9cc439a3d29b0966504426ca67e275c095 100644 (file)
@@ -98,6 +98,7 @@
 #include <tok822.h>
 #include <mail_params.h>
 #include <bounce.h>
+#include <defer.h>
 
 /* Application-specific. */
 
@@ -207,6 +208,10 @@ int     deliver_token_stream(LOCAL_STATE state, USER_ATTR usr_attr,
                break;
        }
     }
+    if (vstream_ferror(fp))
+       status = defer_append(BOUNCE_FLAG_KEEP,
+                             BOUNCE_ATTR(state.msg_attr),
+                             "error reading .forward file: %m");
     vstring_free(buf);
     return (status);
 }
index c87206bf4b445dce7b14260cfa056ae1d99cc0e1..634352fe2d0e942e5070d97d1cf28dc17efb358a 100644 (file)
@@ -178,6 +178,8 @@ static int copy_segment(VSTREAM *qfile, VSTREAM *cleanup, PICKUP_INFO *info,
        if ((type = rec_get(qfile, buf, var_line_limit)) < 0
            || strchr(expected, type) == 0)
            return (file_read_error(info, type));
+       if (msg_verbose)
+           msg_info("%s: read %c %s", info->id, type, vstring_str(buf));
        if (type == *expected)
            break;
        if (type == REC_TYPE_FROM)
@@ -194,6 +196,8 @@ static int copy_segment(VSTREAM *qfile, VSTREAM *cleanup, PICKUP_INFO *info,
                info->rcpt = mystrdup(vstring_str(buf));
        if (type == REC_TYPE_TIME)
            continue;
+       if (type == REC_TYPE_SIZE)
+           continue;
        if (type == REC_TYPE_ATTR) {
            if ((error_text = split_nameval(vstring_str(buf), &attr_name,
                                            &attr_value)) != 0) {
index 6832aa9bd6a965f598310579e1e3bf274ca2bed9..141702406f07c98b1c661bf36191b89e9d4b4903 100644 (file)
@@ -315,9 +315,6 @@ int     main(int argc, char **argv)
        }
        if (rec_type == REC_TYPE_ERROR)
            msg_fatal("uid=%ld: malformed input", (long) uid);
-       if (rec_type == REC_TYPE_TIME)
-           rec_fprintf(dst->stream, REC_TYPE_TIME, "%ld",
-                       (long) time((time_t *) 0));
        if (strchr(*expected, rec_type) == 0)
            msg_fatal("uid=%ld: unexpected record type: %d", (long) uid, rec_type);
        if (rec_type == **expected)
index d8831fc26c23dc145f56a613ee1327758c312750..85f9a3ddbcc0441d7cdc4bac8b1f39c36367c0ce 100644 (file)
 #include <string.h>
 #include <signal.h>
 #include <stdio.h>                     /* remove() */
+#include <utime.h>
 
 /* Utility library. */
 
@@ -428,6 +429,7 @@ static int requeue_one(const char **queue_names, const char *queue_id)
     VSTRING *new_path_buf;
     int     found;
     int     tries;
+    struct utimbuf tbuf;
 
     /*
      * Sanity check. No early returns beyond this point.
@@ -454,6 +456,9 @@ static int requeue_one(const char **queue_names, const char *queue_id)
                continue;
            (void) mail_queue_path(new_path_buf, MAIL_QUEUE_MAILDROP, queue_id);
            if (postrename(old_path, STR(new_path_buf)) == 0) {
+               tbuf.actime = tbuf.modtime = time((time_t *) 0);
+               if (utime(STR(new_path_buf), &tbuf) < 0) 
+                   msg_warn("%s: reset time stamps: %m", STR(new_path_buf));
                msg_info("%s: requeued", queue_id);
                found = 1;
                break;
index fd93a8275856a2f4e937af4f8e6d4766bec8cec5..88418b500621b645bdae74fe12cb2274fce8c052 100644 (file)
@@ -350,7 +350,7 @@ DICT   *dict_proxy_open(const char *map, int open_flags, int dict_flags)
 
 static void post_jail_init(char *unused_name, char **unused_argv)
 {
-    const char *sep = " \t\r\n";
+    const char *sep = ", \t\r\n";
     char   *saved_filter;
     char   *bp;
     char   *type_name;
index 954bd07173bbb30871bd61ca90b1bced995040a1..29bc38feb4c9e332970c0d519896bd75440c855f 100644 (file)
@@ -378,6 +378,13 @@ static void enqueue(const int flags, const char *encoding, const char *sender,
      */
     buf = vstring_alloc(100);
 
+    /*
+     * Stop run-away process accidents by limiting the queue file size. This
+     * is not a defense against DOS attack.
+     */
+    if (var_message_limit > 0 && get_file_limit() > var_message_limit)
+       set_file_limit((off_t) var_message_limit);
+
     /*
      * The sender name is provided by the user. In principle, the mail pickup
      * service could deduce the sender name from queue file ownership, but:
@@ -428,7 +435,6 @@ static void enqueue(const int flags, const char *encoding, const char *sender,
      * 
      * XXX Should limit the size of envelope records.
      */
-    rec_fprintf(dst, REC_TYPE_TIME, "%ld", (long) time((time_t *) 0));
     if (full_name || (full_name = fullname()) != 0)
        rec_fputs(dst, REC_TYPE_FULL, full_name);
     rec_fputs(dst, REC_TYPE_FROM, saved_sender);
@@ -612,13 +618,6 @@ int     main(int argc, char **argv)
     if (chdir(var_queue_dir))
        msg_fatal_status(EX_UNAVAILABLE, "chdir %s: %m", var_queue_dir);
 
-    /*
-     * Stop run-away process accidents by limiting the queue file size. This
-     * is not a defense against DOS attack.
-     */
-    if (var_message_limit > 0 && get_file_limit() > var_message_limit)
-       set_file_limit((off_t) var_message_limit);
-
     signal(SIGPIPE, SIG_IGN);
 
     /*
index 9be31eab10928eb9d9ba578d67cc693dd415a42f..49f1beb7a727e325d713188f3bb95b7ffe8ff5f9 100644 (file)
@@ -101,6 +101,7 @@ VSTRING *readlline(VSTRING *buf, VSTREAM *fp, int *lineno)
                break;
        }
     }
+    VSTRING_TERMINATE(buf);
 
     /*
      * Invalid input: continuing text without preceding text. Allowing this
@@ -118,6 +119,5 @@ VSTRING *readlline(VSTRING *buf, VSTREAM *fp, int *lineno)
     /*
      * Done.
      */
-    VSTRING_TERMINATE(buf);
     return (LEN(buf) > 0 ? buf : 0);
 }