2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-30 13:48:06 +00:00

snapshot-20010130

This commit is contained in:
Wietse Venema
2001-01-30 00:00:00 -05:00
committed by Viktor Dukhovni
parent 3339e62c54
commit 3d8b9bd884
11 changed files with 140 additions and 19 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -1314,10 +1314,40 @@ by itself.
<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

View File

@@ -29,17 +29,15 @@ First of all, thank you for your interest in the Postfix project.
<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>

View File

@@ -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

18
postfix/mantools/man2html Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
# Crude script to convert formatted manual pages to HTML
echo '<html> <head> </head> <body> <pre>'
sed '
s/\([<>&]\)\1/\1/g
s/&/\&amp;/g
s/</\&lt;/g
s/>/\&gt;/g
s;_\(.\);<i>\1</i>;g
s;.\(.\);<b>\1</b>;g
s;</i><i>;;g
s;</b><b>;;g
' "$@"
echo '</pre> </body> </html>'

49
postfix/mantools/postlink Executable file
View File

@@ -0,0 +1,49 @@
#!/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>/
' "$@"

View File

@@ -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

View File

@@ -59,6 +59,7 @@
#include <mail_copy.h>
#include <bounce.h>
#include <defer.h>
#include <sent.h>
#include <mail_params.h>
@@ -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),
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);
}

View File

@@ -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);

View File

@@ -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