From: Wietse Venema Date: Wed, 31 Jan 2007 05:00:00 +0000 (-0500) Subject: postfix-2.4-20070131 X-Git-Tag: v2.4.0-RC1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adb3660497294bad06c0a813bf2230337b08d46d;p=thirdparty%2Fpostfix.git postfix-2.4-20070131 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 5c077de5d..342974176 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -13160,6 +13160,12 @@ Apologies for any names omitted. Disable workaround pending completion of updated TLS] support in non-production releases. +20070131 + + Assorted code cleanup, portability fixes/workarounds, and + minor updates: global/dict_ldap.c, mantools/postlink, + tlsmgs/tlsmgr.c, conf/master.cf. LaMont Jones. + Wish list: Update message content length when adding/removing headers. diff --git a/postfix/conf/master.cf b/postfix/conf/master.cf index 77daf91c6..29ea1a043 100644 --- a/postfix/conf/master.cf +++ b/postfix/conf/master.cf @@ -55,26 +55,45 @@ scache unix - - n - 1 scache # maildrop. See the Postfix MAILDROP_README file for details. # Also specify in main.cf: maildrop_destination_recipient_limit=1 # -maildrop unix - n n - - pipe - flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} +#maildrop unix - n n - - pipe +# flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} +# +# ==================================================================== # # The Cyrus deliver program has changed incompatibly, multiple times. # -old-cyrus unix - n n - - pipe - flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user} +#old-cyrus unix - n n - - pipe +# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user} +# +# ==================================================================== +# # Cyrus 2.1.5 (Amos Gouaux) # Also specify in main.cf: cyrus_destination_recipient_limit=1 -cyrus unix - n n - - pipe - user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user} +# +#cyrus unix - n n - - pipe +# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user} +# +# ==================================================================== # # See the Postfix UUCP_README file for configuration details. # -uucp unix - n n - - pipe - flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) +#uucp unix - n n - - pipe +# flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) +# +# ==================================================================== # # Other external delivery methods. # -ifmail unix - n n - - pipe - flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) -bsmtp unix - n n - - pipe - flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient +#ifmail unix - n n - - pipe +# flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) +# +#bsmtp unix - n n - - pipe +# flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient +# +#scalemail-backend unix - n n - 2 pipe +# flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store +# ${nexthop} ${user} ${extension} +# +#mailman unix - n n - - pipe +# flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py +# ${nexthop} ${user} diff --git a/postfix/conf/postfix-files b/postfix/conf/postfix-files index 0f1a23b1b..b0a0bfe68 100644 --- a/postfix/conf/postfix-files +++ b/postfix/conf/postfix-files @@ -311,6 +311,7 @@ $html_directory/SMTPD_ACCESS_README.html:f:root:-:644 $html_directory/SMTPD_POLICY_README.html:f:root:-:644 $html_directory/SMTPD_PROXY_README.html:f:root:-:644 $html_directory/STANDARD_CONFIGURATION_README.html:f:root:-:644 +$html_directory/TLS_LEGACY_README.html:f:root:-:644 $html_directory/TLS_README.html:f:root:-:644 $html_directory/TUNING_README.html:f:root:-:644 $html_directory/ULTRIX_README.html:f:root:-:644 diff --git a/postfix/mantools/postlink b/postfix/mantools/postlink index 10ace1b3b..b81a59ac2 100755 --- a/postfix/mantools/postlink +++ b/postfix/mantools/postlink @@ -8,15 +8,19 @@ LINE: while (<>) { chop; - # Glue together words that were broken across line breaks. - - Again: - if (/-[<\/bB>]*$/) { - $_ .= "\n"; - $len1 = length; - $_ .= <>; - chop if $len1 < length; - goto Again; + # Glue together words that were broken across line breaks. The + # "label: if_block" was generated by a sed-to-perl converter; the + # braces around this are a workaround for buggy implementations. + + { + Again: + if (/-[<\/bB>]*$/) { + $_ .= "\n"; + $len1 = length; + $_ .= <>; + chop if $len1 < length; + goto Again; + } } if (/<[Aa] *[HhNn][RrAa][EeMm][FfEe] *=/) { print; diff --git a/postfix/src/global/dict_ldap.c b/postfix/src/global/dict_ldap.c index b373301e2..efd8c3927 100644 --- a/postfix/src/global/dict_ldap.c +++ b/postfix/src/global/dict_ldap.c @@ -266,29 +266,30 @@ typedef struct { static void rfc2253_quote(DICT *unused, const char *name, VSTRING *result) { - unsigned char *sub = (unsigned char *)name; - size_t len; + const char *sub = name; + size_t len; /* - * The RFC only requires quoting of a leading or trailing space, - * but it is harmless to quote whitespace everywhere. Similarly, - * we quote all '#' characters, even though only the leading '#' - * character requires quoting per the RFC. + * The RFC only requires quoting of a leading or trailing space, but it + * is harmless to quote whitespace everywhere. Similarly, we quote all + * '#' characters, even though only the leading '#' character requires + * quoting per the RFC. */ while (*sub) - if ((len = strcspn(sub, " \t\"#+,;<>\\")) > 0) { + if ((len = strcspn(sub, " \t\"#+,;<>\\")) > 0) { vstring_strncat(result, sub, len); sub += len; } else - vstring_sprintf_append(result, "\\%02X", *(sub++)); + vstring_sprintf_append(result, "\\%02X", + *((const unsigned char *) sub++)); } /* rfc2254_quote - Quote input key for safe inclusion in the query filter */ static void rfc2254_quote(DICT *unused, const char *name, VSTRING *result) { - unsigned char *sub = (unsigned char *)name; - size_t len; + const char *sub = name; + size_t len; /* * If any characters in the supplied address should be escaped per RFC @@ -298,11 +299,12 @@ static void rfc2254_quote(DICT *unused, const char *name, VSTRING *result) * parameter and then this more comprehensive mechanism. */ while (*sub) - if ((len = strcspn(sub, "*()\\")) > 0) { + if ((len = strcspn(sub, "*()\\")) > 0) { vstring_strncat(result, sub, len); sub += len; } else - vstring_sprintf_append(result, "\\%02X", *(sub++)); + vstring_sprintf_append(result, "\\%02X", + *((const unsigned char *) sub++)); } static BINHASH *conn_hash = 0; @@ -355,7 +357,6 @@ static int dict_ldap_set_errno(LDAP * ld, int rc) static int dict_ldap_result(LDAP *ld, int msgid, int timeout, LDAPMessage **res) { - int rc; struct timeval mytimeval; mytimeval.tv_sec = timeout; diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index b53bb3d17..99c1fcd15 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20070125" +#define MAIL_RELEASE_DATE "20070131" #define MAIL_VERSION_NUMBER "2.4" #ifdef SNAPSHOT diff --git a/postfix/src/tls/tls_misc.c b/postfix/src/tls/tls_misc.c index 3030ca181..ee3fe9197 100644 --- a/postfix/src/tls/tls_misc.c +++ b/postfix/src/tls/tls_misc.c @@ -152,6 +152,8 @@ NAME_CODE tls_cipher_level_table[] = { 0, TLS_CIPHER_NONE, }; +#if 0 + typedef struct { char *algorithm; char *exclusion; @@ -187,6 +189,8 @@ static cipher_probe cipher_probe_list[] = { 0, 0, }; +#endif + /* * Parsed OpenSSL version number. */ @@ -204,9 +208,11 @@ const char *tls_cipher_list(int cipher_level,...) { const char *myname = "tls_cipher_list"; static VSTRING *buf; +#if 0 static ARGV *exclude_unavailable; cipher_probe *probe; int i; +#endif va_list ap; const char *exclude; char *tok; diff --git a/postfix/src/tlsmgr/tlsmgr.c b/postfix/src/tlsmgr/tlsmgr.c index bb483fa4d..ed1018ec1 100644 --- a/postfix/src/tlsmgr/tlsmgr.c +++ b/postfix/src/tlsmgr/tlsmgr.c @@ -213,6 +213,7 @@ * Tunables. */ char *var_tls_rand_source; +int var_tls_daemon_rand_bytes; int var_tls_rand_bytes; int var_tls_reseed_period; int var_tls_prng_exch_period;