diff --git a/postfix/HISTORY b/postfix/HISTORY index d319941eb..d2b4339be 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -6623,6 +6623,15 @@ Apologies for any names omitted. address must be handled sensibly. Files: global/resolve_clnt.c, trivial-rewrite/resolve.c. It ain't perfect yet, but close. +20020613 + + Bugfix: postsuper -r was broken as of 20020510. The cleanup + daemon would discard mail with MIME type information. Moved + a bunch of sanity checks from the cleanup daemon to the + pickup daemon, so the checks are in one place. Problem + experienced by Pavol Luptak. Files: pickup/pickup.c, + cleanup/cleanup_extracted.c. + Open problems: Medium: old maildrop files are no longer readable by the @@ -6630,8 +6639,8 @@ Open problems: Low: all table lookups should consistently use internalized (unquoted) or externalized (quoted) forms as lookup keys. - smtpd, qmgr, local, etc. use internalized forms as keys. - cleanup uses externalized forms. + smtpd, qmgr, local, etc. use unquoted address forms as + keys. cleanup uses quoted forms. Low: sendmail does not store null command-line recipients. diff --git a/postfix/conf/virtual b/postfix/conf/virtual index 1a093feb3..338aa6439 100644 --- a/postfix/conf/virtual +++ b/postfix/conf/virtual @@ -1,4 +1,3 @@ -# # VIRTUAL(5) VIRTUAL(5) # # NAME @@ -132,8 +131,8 @@ # $inet_interfaces. # # This functionality overlaps with functionality of -# the local alias(5) database. The difference is that -# virtual mapping can be applied to non-local +# the local aliases(5) database. The difference is +# that virtual mapping can be applied to non-local # addresses. # # @domain address, address, ... @@ -216,5 +215,4 @@ # P.O. Box 704 # Yorktown Heights, NY 10598, USA # -# 1 -# +# VIRTUAL(5) diff --git a/postfix/html/virtual.5.html b/postfix/html/virtual.5.html index 4e716c41e..0a1f49a69 100644 --- a/postfix/html/virtual.5.html +++ b/postfix/html/virtual.5.html @@ -1,5 +1,4 @@
-
 VIRTUAL(5)                                             VIRTUAL(5)
 
 NAME
@@ -133,8 +132,8 @@ VIRTUAL(5)                                             VIRTUAL(5)
               $inet_interfaces.
 
               This functionality overlaps with  functionality  of
-              the local alias(5) database. The difference is that
-              virtual  mapping  can  be  applied   to   non-local
+              the  local  aliases(5)  database. The difference is
+              that virtual mapping can be  applied  to  non-local
               addresses.
 
        @domain address, address, ...
@@ -217,6 +216,5 @@ VIRTUAL(5)                                             VIRTUAL(5)
        P.O. Box 704
        Yorktown Heights, NY 10598, USA
 
-                                                                1
-
+                                                       VIRTUAL(5)
 
diff --git a/postfix/man/man5/virtual.5 b/postfix/man/man5/virtual.5 index 4ddc5d42e..780581039 100644 --- a/postfix/man/man5/virtual.5 +++ b/postfix/man/man5/virtual.5 @@ -144,7 +144,7 @@ Mail for \fIuser\fR@\fIsite\fR is redirected to \fIaddress\fR when $\fRmydestination\fR, or when it is listed in $\fIinet_interfaces\fR. .sp This functionality overlaps with functionality of the local -\fIalias\fR(5) database. The difference is that \fBvirtual\fR +\fIaliases\fR(5) database. The difference is that \fBvirtual\fR mapping can be applied to non-local addresses. .IP "@\fIdomain address, address, ...\fR" Mail for any user in \fIdomain\fR is redirected to \fIaddress\fR. diff --git a/postfix/proto/virtual b/postfix/proto/virtual index 214eb8882..7255da7ca 100644 --- a/postfix/proto/virtual +++ b/postfix/proto/virtual @@ -132,7 +132,7 @@ # $\fRmydestination\fR, or when it is listed in $\fIinet_interfaces\fR. # .sp # This functionality overlaps with functionality of the local -# \fIalias\fR(5) database. The difference is that \fBvirtual\fR +# \fIaliases\fR(5) database. The difference is that \fBvirtual\fR # mapping can be applied to non-local addresses. # .IP "@\fIdomain address, address, ...\fR" # Mail for any user in \fIdomain\fR is redirected to \fIaddress\fR. diff --git a/postfix/src/cleanup/cleanup_extracted.c b/postfix/src/cleanup/cleanup_extracted.c index 53faf57b6..a1c9d6b07 100644 --- a/postfix/src/cleanup/cleanup_extracted.c +++ b/postfix/src/cleanup/cleanup_extracted.c @@ -120,21 +120,13 @@ void cleanup_extracted(CLEANUP_STATE *state, int type, char *buf, int len) /* cleanup_extracted_process - process extracted segment */ -static void cleanup_extracted_process(CLEANUP_STATE *state, int type, char *buf, int unused_len) +static void cleanup_extracted_process(CLEANUP_STATE *state, int type, char *buf, int len) { char *myname = "cleanup_extracted_process"; VSTRING *clean_addr; ARGV *rcpt; char **cpp; - if (type == REC_TYPE_RRTO) { - /* XXX Use extracted information instead. */ - return; - } - if (type == REC_TYPE_ERTO) { - /* XXX Use extracted information instead. */ - return; - } if (type == REC_TYPE_RCPT) { clean_addr = vstring_alloc(100); cleanup_rewrite_internal(clean_addr, *buf ? buf : var_empty_addr); @@ -154,9 +146,7 @@ static void cleanup_extracted_process(CLEANUP_STATE *state, int type, char *buf, return; } if (type != REC_TYPE_END) { - msg_warn("%s: unexpected record type %d in extracted segment", - state->queue_id, type); - state->errs |= CLEANUP_STAT_BAD; + cleanup_out(state, type, buf, len); return; } diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 93cf88a40..c3a43af0c 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -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 "20020610" +#define MAIL_RELEASE_DATE "20020613" #define VAR_MAIL_VERSION "mail_version" #define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE diff --git a/postfix/src/pickup/pickup.c b/postfix/src/pickup/pickup.c index 6357fd790..e50c72117 100644 --- a/postfix/src/pickup/pickup.c +++ b/postfix/src/pickup/pickup.c @@ -200,19 +200,26 @@ static int copy_segment(VSTREAM *qfile, VSTREAM *cleanup, PICKUP_INFO *info, } #define STREQ(x,y) (strcmp(x,y) == 0) - if (info->st.st_uid == var_owner_uid - || (STREQ(attr_name, MAIL_ATTR_ENCODING) - && (STREQ(attr_value, MAIL_ATTR_ENC_7BIT) - || STREQ(attr_value, MAIL_ATTR_ENC_8BIT) - || STREQ(attr_value, MAIL_ATTR_ENC_NONE)))) { + if (STREQ(attr_name, MAIL_ATTR_ENCODING) + && (STREQ(attr_value, MAIL_ATTR_ENC_7BIT) + || STREQ(attr_value, MAIL_ATTR_ENC_8BIT) + || STREQ(attr_value, MAIL_ATTR_ENC_NONE))) { rec_fprintf(cleanup, REC_TYPE_ATTR, "%s=%s", attr_name, attr_value); - continue; + } else if (info->st.st_uid != var_owner_uid) { + msg_warn("uid=%ld: ignoring attribute record: %.200s=%.200s", + (long) info->st.st_uid, attr_name, attr_value); } - msg_warn("uid=%ld: ignoring attribute record: %.200s=%.200s", - (long) info->st.st_uid, attr_name, attr_value); continue; } + if (type == REC_TYPE_RRTO) + /* Use message header extracted information instead. */ + continue; + if (type == REC_TYPE_ERTO) + /* Use message header extracted information instead. */ + continue; + if (type == REC_TYPE_INSP && info->st.st_uid != var_owner_uid) + continue; if (type == REC_TYPE_FILT && info->st.st_uid != var_owner_uid) continue; else {