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.
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
<p>
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.
+
+<h4>Cisco PIX "fixup protocol smtp" bug</h4>
+
+The Cisco PIX has have a bug when running software older than
+version 5.2(4) or 6.0(1).
+
+<p>
+
+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.
+
+<p>
+
+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.
<p>
+When you connect to a mailer behind such a filter you see something
+like:
+
+<blockquote>
+<pre>
+220 **************************************0******0*********20 ****200**0*********0*00
+</pre>
+</blockquote>
+
+<h4>IP path MTU discovery</h4>
+
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
<p>
What is Postfix? It is <a href="http://www.porcupine.org/wietse/">Wietse
-Venema's</a> attempt to provide an alternative to the widely-used
-<a href="http://www.sendmail.org/">Sendmail</a> 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</a> mailer that started life as an alternative to the
+widely-used <a href="http://www.sendmail.org/">Sendmail</a> program.
<p>
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.
<hr>
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
--- /dev/null
+#!/bin/sh
+
+# Crude script to convert formatted manual pages to HTML
+
+echo '<html> <head> </head> <body> <pre>'
+
+sed '
+ s/\([<>&]\)\b\1/\1/g
+ s/&/\&/g
+ s/</\</g
+ s/>/\>/g
+ s;_\b\(.\);<i>\1</i>;g
+ s;.\b\(.\);<b>\1</b>;g
+ s;</i><i>;;g
+ s;</b><b>;;g
+' "$@"
+
+echo '</pre> </body> </html>'
--- /dev/null
+#!/bin/sh
+
+# Crude script to make formatted Postfix man pages clickable.
+# RFC links by Ralf Hildebrandt.
+
+exec sed '
+ :again
+ /-[</bB>]*$/{
+ N
+ b again
+ }
+ s/[<bB>]*bounce[</bB>]*(8)/<a href="bounce.8.html">&<\/a>/
+ s/[<bB>]*cleanup[</bB>]*(8)/<a href="cleanup.8.html">&<\/a>/
+ s/[<bB>]*defer[</bB>]*(8)/<a href="defer.8.html">&<\/a>/
+ s/[<bB>]*error[</bB>]*(8)/<a href="error.8.html">&<\/a>/
+ s/[<bB>]*flush[</bB>]*(8)/<a href="flushd.8.html">&<\/a>/
+ s/[<bB>]*local[</bB>]*(8)/<a href="local.8.html">&<\/a>/
+ s/[<bB>]*mas[-</bB>]*\n*[ <bB>]*ter[</bB>]*(8)/<a href="master.8.html">&<\/a>/
+ s/[<bB>]*pickup[</bB>]*(8)/<a href="pickup.8.html">&<\/a>/
+ s/[<bB>]*pipe[</bB>]*(8)/<a href="pipe.8.html">&<\/a>/
+ s/[<bB>]*qmgr[</bB>]*(8)/<a href="qmgr.8.html">&<\/a>/
+ s/[<bB>]*showq[</bB>]*(8)/<a href="showq.8.html">&<\/a>/
+ s/[<bB>]*smtp[</bB>]*(8)/<a href="smtp.8.html">&<\/a>/
+ s/[<bB>]*smtpd[</bB>]*(8)/<a href="smtpd.8.html">&<\/a>/
+ s/[<bB>]*spawn[</bB>]*(8)/<a href="spawn.8.html">&<\/a>/
+ s/[<bB>]*triv[-</bB>]*\n*[ <bB>]*ial[-</bB>]*\n*[ <bB>]*rewrite[</bB>]*(8)/<a href="trivial-rewrite.8.html">&<\/a>/
+ s/[<bB>]*mailq[</bB>]*(1)/<a href="mailq.1.html">&<\/a>/
+ s/[<bB>]*newaliases[</bB>]*(1)/<a href="newaliases.1.html">&<\/a>/
+ s/[<bB>]*postalias[</bB>]*(1)/<a href="postalias.1.html">&<\/a>/
+ s/[<bB>]*postcat[</bB>]*(1)/<a href="postcat.1.html">&<\/a>/
+ s/[<bB>]*postconf[</bB>]*(1)/<a href="postconf.1.html">&<\/a>/
+ s/[<bB>]*postdrop[</bB>]*(1)/<a href="postdrop.1.html">&<\/a>/
+ s/[<bB>]*postfix[</bB>]*(1)/<a href="postfix.1.html">&<\/a>/
+ s/[<bB>]*postkick[</bB>]*(1)/<a href="postkick.1.html">&<\/a>/
+ s/[<bB>]*postlock[</bB>]*(1)/<a href="postlock.1.html">&<\/a>/
+ s/[<bB>]*postlog[</bB>]*(1)/<a href="postlog.1.html">&<\/a>/
+ s/[<bB>]*postmap[</bB>]*(1)/<a href="postmap.1.html">&<\/a>/
+ s/[<bB>]*send[-</bB>]*\n*[ <bB>]*mail[</bB>]*(1)/<a href="sendmail.1.html">&<\/a>/
+ s/[<bB>]*access[</bB>]*(5)/<a href="access.5.html">&<\/a>/
+ s/[<bB>]*aliases[</bB>]*(5)/<a href="aliases.5.html">&<\/a>/
+ s/[<bB>]*canonical[</bB>]*(5)/<a href="canonical.5.html">&<\/a>/
+ s/[<bB>]*etrn[</bB>]*(5)/<a href="etrn.5.html">&<\/a>/
+ s/[<bB>]*pcre[</bBiI>]*_[</iIbB>]*table[</bB>]*(5)/<a href="pcre_table.5.html">&<\/a>/
+ s/[<bB>]*regexp[</bBiI>]*_[</iIbB>]*table[</bB>]*(5)/<a href="regexp_table.5.html">&<\/a>/
+ s/[<bB>]*relocated[</bB>]*(5)/<a href="relocated.5.html">&<\/a>/
+ s/[<bB>]*trans[-</bB>]*\n*[ <bB>]*port[</bB>]*(5)/<a href="transport.5.html">&<\/a>/
+ s/[<bB>]*virtual[</bB>]*(5)/<a href="virtual.5.html">&<\/a>/
+ s/RFC *\([0-9]*\)/<a href="http:\/\/www.faqs.org\/rfcs\/rfc\1.html">&<\/a>/
+' "$@"
* 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
#include <mail_copy.h>
#include <bounce.h>
+#include <defer.h>
#include <sent.h>
#include <mail_params.h>
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);
myfree(curdir);
myfree(tmpfile);
myfree(newfile);
- return (0);
+ return (status);
}
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);
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