diff --git a/postfix/HISTORY b/postfix/HISTORY index 8e2859e66..3091eb7ba 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -4808,3 +4808,23 @@ Apologies for any names omitted. Bugfix: the MISSING_USLEEP feature was used backwards. Patrik Rak. File: util/random_sleep.c. + +20010130 + + Workaround: Linux usleep() is void, BSD/Solaris usleep() + returns int, don't use it. File util/random_sleep.c. + + Made local maildir bounce/defer handling mode consistent + with local mailbox delivery. File local/maildir.c. + + The smtp client now defers delivery when all MX hosts have + no A record. File: smtp/smtp_addr.c + + Bundled the man2html and postlink quick hacks so people + can do their own manual page processing. See scripts in + the mantools directory. + + Updated the reference to sendmail in the html/index.html page. + + Added note about the Cisco PIX "fixup smtp" bug when "." + and "CRLF" arrive in separate packets. File: html/faq.html. diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 5e9306ac4..26fab0180 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -27,8 +27,8 @@ agent can deliver mail for any number of domains. See the file VIRTUAL_README for detailed examples. This code is still new. Once it stops changing it will become part of the non-beta release. -Many "valid_hostname" warnings were eliminated, and the rest was -replaced by something more informative. +Many "valid_hostname" warnings were eliminated. The complaints that +were not eliminated were replaced by something more informative. SASL support (RFC 2554) for the LMTP delivery agent. This is required by recent Cyrus implementations when delivering mail over TCP diff --git a/postfix/html/faq.html b/postfix/html/faq.html index db0cfd95b..1cfd0b911 100644 --- a/postfix/html/faq.html +++ b/postfix/html/faq.html @@ -1314,10 +1314,40 @@ by itself.

However, when you see mail deliveries fail consistently, you may -have a different problem: broken path MTU discovery. +have a different problem: broken path MTU discovery. Or it could +be a broken PIX firewall. + +

Cisco PIX "fixup protocol smtp" bug

+ +The Cisco PIX has have a bug when running software older than +version 5.2(4) or 6.0(1).

+The bug ID is CSCds90792. The "fixup protocol smtp" feature does +not correctly handle the case where the "." and the "CRLF" at the +end of mail are sent in separate packets. + +

+ +How does one recognize a mailer behind a Cisco PIX with "fixup +protocol smtp" enabled? As of version 5.1 and later, the fixup +protocol smtp command changes the characters in the SMTP banner to +asterisks except for the "2", "0", "0" and space characters. + +

+ +When you connect to a mailer behind such a filter you see something +like: + +

+
+220 **************************************0******0*********20 ****200**0*********0*00
+
+
+ +

IP path MTU discovery

+ A little background is in order. With the SMTP protocol, the HELO, MAIL FROM and RCPT TO commands and responses are relatively short. When you're talking to sendmail, every command and every response diff --git a/postfix/html/index.html b/postfix/html/index.html index 5cacb4f37..32b4627ae 100644 --- a/postfix/html/index.html +++ b/postfix/html/index.html @@ -29,17 +29,15 @@ First of all, thank you for your interest in the Postfix project.

What is Postfix? It is Wietse -Venema's attempt to provide an alternative to the widely-used -Sendmail program. Sendmail -is responsible for most of the e-mail delivered on the Internet. -With an estimated 100 million users, that's billions of messages -daily. A stunning number. +Venema's mailer that started life as an alternative to the +widely-used Sendmail program.

Postfix attempts to be fast, easy to administer, and secure, while at the same time being sendmail compatible enough to not upset -existing users. +existing users. Thus, the outside has a sendmail-ish flavor, but +the inside is completely different.


diff --git a/postfix/mantools/README b/postfix/mantools/README index 230cdc91a..946fbcf90 100644 --- a/postfix/mantools/README +++ b/postfix/mantools/README @@ -15,3 +15,7 @@ mansect extract manual page section from source file srctoman extract man page from source file usage: srctoman file.suffix usage: srctoman -type file + +man2html quick script to htmlize nroff -man output + +postlink quick script to hyperlink man2html output diff --git a/postfix/mantools/man2html b/postfix/mantools/man2html new file mode 100755 index 000000000..56355712e --- /dev/null +++ b/postfix/mantools/man2html @@ -0,0 +1,18 @@ +#!/bin/sh + +# Crude script to convert formatted manual pages to HTML + +echo '
'
+
+sed '
+	s/\([<>&]\)\1/\1/g
+	s/&/\&/g
+	s//\>/g
+	s;_\(.\);\1;g
+	s;.\(.\);\1;g
+	s;;;g
+	s;;;g
+' "$@"
+
+echo '
' diff --git a/postfix/mantools/postlink b/postfix/mantools/postlink new file mode 100755 index 000000000..907832719 --- /dev/null +++ b/postfix/mantools/postlink @@ -0,0 +1,49 @@ +#!/bin/sh + +# Crude script to make formatted Postfix man pages clickable. +# RFC links by Ralf Hildebrandt. + +exec sed ' + :again + /-[]*$/{ + N + b again + } + s/[]*bounce[]*(8)/&<\/a>/ + s/[]*cleanup[]*(8)/&<\/a>/ + s/[]*defer[]*(8)/&<\/a>/ + s/[]*error[]*(8)/&<\/a>/ + s/[]*flush[]*(8)/&<\/a>/ + s/[]*local[]*(8)/&<\/a>/ + s/[]*mas[-]*\n*[ ]*ter[]*(8)/&<\/a>/ + s/[]*pickup[]*(8)/&<\/a>/ + s/[]*pipe[]*(8)/&<\/a>/ + s/[]*qmgr[]*(8)/&<\/a>/ + s/[]*showq[]*(8)/&<\/a>/ + s/[]*smtp[]*(8)/&<\/a>/ + s/[]*smtpd[]*(8)/&<\/a>/ + s/[]*spawn[]*(8)/&<\/a>/ + s/[]*triv[-]*\n*[ ]*ial[-]*\n*[ ]*rewrite[]*(8)/&<\/a>/ + s/[]*mailq[]*(1)/&<\/a>/ + s/[]*newaliases[]*(1)/&<\/a>/ + s/[]*postalias[]*(1)/&<\/a>/ + s/[]*postcat[]*(1)/&<\/a>/ + s/[]*postconf[]*(1)/&<\/a>/ + s/[]*postdrop[]*(1)/&<\/a>/ + s/[]*postfix[]*(1)/&<\/a>/ + s/[]*postkick[]*(1)/&<\/a>/ + s/[]*postlock[]*(1)/&<\/a>/ + s/[]*postlog[]*(1)/&<\/a>/ + s/[]*postmap[]*(1)/&<\/a>/ + s/[]*send[-]*\n*[ ]*mail[]*(1)/&<\/a>/ + s/[]*access[]*(5)/&<\/a>/ + s/[]*aliases[]*(5)/&<\/a>/ + s/[]*canonical[]*(5)/&<\/a>/ + s/[]*etrn[]*(5)/&<\/a>/ + s/[]*pcre[]*_[]*table[]*(5)/&<\/a>/ + s/[]*regexp[]*_[]*table[]*(5)/&<\/a>/ + s/[]*relocated[]*(5)/&<\/a>/ + s/[]*trans[-]*\n*[ ]*port[]*(5)/&<\/a>/ + s/[]*virtual[]*(5)/&<\/a>/ + s/RFC *\([0-9]*\)/&<\/a>/ +' "$@" diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 7f563b54e..3310517dc 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -15,7 +15,7 @@ * Version of this program. */ #define VAR_MAIL_VERSION "mail_version" -#define DEF_MAIL_VERSION "Snapshot-20010129" +#define DEF_MAIL_VERSION "Snapshot-20010130" extern char *var_mail_version; /* LICENSE diff --git a/postfix/src/local/maildir.c b/postfix/src/local/maildir.c index 01adc5b15..e9bd0de85 100644 --- a/postfix/src/local/maildir.c +++ b/postfix/src/local/maildir.c @@ -59,6 +59,7 @@ #include #include +#include #include #include @@ -152,10 +153,11 @@ int deliver_maildir(LOCAL_STATE state, USER_ATTR usr_attr, char *path) set_eugid(var_owner_uid, var_owner_gid); if (status) - bounce_append(BOUNCE_FLAG_KEEP, BOUNCE_ATTR(state.msg_attr), - "maildir delivery failed: %s", vstring_str(why)); + status = (errno == ENOSPC ? defer_append : bounce_append) + (BOUNCE_FLAG_KEEP, BOUNCE_ATTR(state.msg_attr), + "maildir delivery failed: %s", vstring_str(why)); else - sent(SENT_ATTR(state.msg_attr), "maildir"); + status = sent(SENT_ATTR(state.msg_attr), "maildir"); vstring_free(buf); vstring_free(why); myfree(newdir); @@ -163,5 +165,5 @@ int deliver_maildir(LOCAL_STATE state, USER_ATTR usr_attr, char *path) myfree(curdir); myfree(tmpfile); myfree(newfile); - return (0); + return (status); } diff --git a/postfix/src/smtp/smtp_addr.c b/postfix/src/smtp/smtp_addr.c index 7c06a8e5a..d86c694e1 100644 --- a/postfix/src/smtp/smtp_addr.c +++ b/postfix/src/smtp/smtp_addr.c @@ -336,6 +336,11 @@ DNS_RR *smtp_domain_addr(char *name, VSTRING *why, int *found_myself) best_pref = (mx_names ? mx_names->pref : IMPOSSIBLE_PREFERENCE); addr_list = smtp_addr_list(mx_names, why); dns_rr_free(mx_names); + if (addr_list == 0) { + smtp_errno = SMTP_RETRY; + msg_warn("MX hosts for %s have no valid A record", name); + break; + } best_found = (addr_list ? addr_list->pref : IMPOSSIBLE_PREFERENCE); if (msg_verbose) smtp_print_addr(name, addr_list); diff --git a/postfix/src/util/rand_sleep.c b/postfix/src/util/rand_sleep.c index af6fdfcdc..079324b49 100644 --- a/postfix/src/util/rand_sleep.c +++ b/postfix/src/util/rand_sleep.c @@ -69,12 +69,7 @@ void rand_sleep(unsigned delay, unsigned variation) if (my_pid == 0) srandom(my_pid = (getpid() ^ time((time_t *) 0))); usec = (delay - variation / 2) + variation * (double) random() / RAND_MAX; -#ifdef MISSING_USLEEP doze(usec); -#else - if (usleep(usec) < 0) - msg_fatal("usleep: %m"); -#endif } #ifdef TEST