From: Wietse Venema Date: Fri, 5 Sep 2003 05:00:00 +0000 (-0500) Subject: postfix-2.0.15 X-Git-Tag: v2.0.15^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a09f1d32af5eedfcae375613033c155b4a7c1dd;p=thirdparty%2Fpostfix.git postfix-2.0.15 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 390a0860a..87eef918a 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -7865,6 +7865,13 @@ Apologies for any names omitted. formatted numerical port. Files: util/find_inet.c, smtp/smtp_connect.c, lmtp/lmtp_connect.c. +20030905 + + Workaround: Solaris 8 select() claims that a non-blocking + socket is readable and then read() fails with EAGAIN. Files: + util/timed_read.c and as precautionary measure, + util/timed_write.c. + Open problems: Doc: mention the proxy_interfaces parameter everywhere the diff --git a/postfix/conf/main.cf b/postfix/conf/main.cf index fd7a99836..032c10ed4 100644 --- a/postfix/conf/main.cf +++ b/postfix/conf/main.cf @@ -147,6 +147,9 @@ mail_owner = postfix # a name matches a lookup key (the right-hand side is ignored). # Continue long lines by starting the next line with whitespace. # +# DO NOT LIST RELAY DESTINATIONS IN MYDESTINATION. +# SPECIFY RELAY DESTINATIONS IN RELAY_DOMAINS. +# # See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS". # #mydestination = $myhostname, localhost.$mydomain diff --git a/postfix/conf/sample-pcre-access.cf b/postfix/conf/sample-pcre-access.cf index 83df35673..36f610b1f 100644 --- a/postfix/conf/sample-pcre-access.cf +++ b/postfix/conf/sample-pcre-access.cf @@ -9,9 +9,6 @@ # the forward slash is used). The regular expression can contain # whitespace. # -# When the regular expression is prefixed by `!', the pattern -# succeeds when it does not match. -# # By default, matching is case-INsensitive, although following # the second slash with an 'i' will reverse this. Other flags are # supported, but the only other useful one is 'U', which makes diff --git a/postfix/conf/sample-pcre-body.cf b/postfix/conf/sample-pcre-body.cf index 2e5a0122e..1374f74f6 100644 --- a/postfix/conf/sample-pcre-body.cf +++ b/postfix/conf/sample-pcre-body.cf @@ -11,9 +11,6 @@ # the forward slash is used). The regular expression can contain # whitespace. # -# When the regular expression is prefixed by `!', the pattern -# succeeds when it does not match. -# # By default, matching is case-INsensitive, although following # the second slash with an 'i' will reverse this. Other flags are # supported, but the only other useful one is 'U', which makes diff --git a/postfix/conf/sample-pcre-header.cf b/postfix/conf/sample-pcre-header.cf index 0d9f2a3e5..6becd9269 100644 --- a/postfix/conf/sample-pcre-header.cf +++ b/postfix/conf/sample-pcre-header.cf @@ -12,9 +12,6 @@ # the forward slash is used). The regular expression can contain # whitespace. # -# When the regular expression is prefixed by `!', the pattern -# succeeds when it does not match. -# # By default, matching is case-INsensitive, although following # the second slash with an 'i' will reverse this. Other flags are # supported, but the only other useful one is 'U', which makes diff --git a/postfix/html/faq.html b/postfix/html/faq.html index f88124f4e..8892637f0 100644 --- a/postfix/html/faq.html +++ b/postfix/html/faq.html @@ -1441,7 +1441,20 @@ the address does resolve to a name.

You run the Postfix SMTP server inside a chroot jail for -extra security, but some configuration files are missing. In order +extra security, but some configuration files are missing or have +incorrect information. The command "postfix check" will report +what files may have incorrect information. For example: + +

+
+warning: /var/spool/postfix/etc/resolv.conf and /etc/resolv.conf differ
+warning: /var/spool/postfix/etc/localtime and /etc/localtime differ
+
+
+ +

+ +In order to run inside a chroot jail, the Postfix SMTP client and server need copies of system configuration files inside the Postfix queue directory. The exact list of files is very system dependent, but @@ -1776,7 +1789,8 @@ for the /etc/resolv.conf file. Check out your Postfix master.cf file. If the SMTP client runs chrooted, then it needs a bunch of files inside the Postfix queue directory. Examples are in the source distribution in the -examples subdirectory. +examples subdirectory. See also the other FAQ entry on +name service trouble. diff --git a/postfix/html/uce.html b/postfix/html/uce.html index e78b933f4..b039002ca 100644 --- a/postfix/html/uce.html +++ b/postfix/html/uce.html @@ -348,8 +348,8 @@ reject_rbl_client relays.mail-abuse.org (paid service)

smtpd_client_restrictions = hash:/etc/postfix/access, reject_rbl_client relays.ordb.org (free service) -
smtpd_client_restrictions = hash:/etc/postfix/access, -reject_rhsbl_client dsn.rfc-ignorant.org (free service) +
smtpd_sender_restrictions = hash:/etc/postfix/access, +reject_rhsbl_sender dsn.rfc-ignorant.org (free service)
smtpd_client_restrictions = permit_mynetworks, reject_unknown_client @@ -934,19 +934,19 @@ lookup tables: - - + - - - -
Recipient domain matches Recipient lookup table +
Recipient domain matches Recipient lookup table
$mydestination or -$inet_interfaces -$local_recipient_maps +
$mydestination or +$inet_interfaces$local_recipient_maps
$virtual_alias_domains $virtual_alias_maps +
$virtual_alias_domains $virtual_alias_maps
$virtual_mailbox_domains $virtual_mailbox_maps +
$virtual_mailbox_domains $virtual_mailbox_maps
$relay_domains $relay_recipient_maps +
$relay_domains $relay_recipient_maps
+ diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index c8a3edc0e..e98fbe4b3 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,10 +20,10 @@ * 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 "20030812" +#define MAIL_RELEASE_DATE "20030905" #define VAR_MAIL_VERSION "mail_version" -#define DEF_MAIL_VERSION "2.0.14" +#define DEF_MAIL_VERSION "2.0.15" extern char *var_mail_version; /* diff --git a/postfix/src/util/timed_read.c b/postfix/src/util/timed_read.c index 1a29a69f9..509004ba3 100644 --- a/postfix/src/util/timed_read.c +++ b/postfix/src/util/timed_read.c @@ -48,23 +48,36 @@ #include #include +#include /* Utility library. */ -#include "iostuff.h" +#include +#include /* timed_read - read with deadline */ int timed_read(int fd, void *buf, unsigned len, int timeout, void *unused_context) { + int ret; /* * Wait for a limited amount of time for something to happen. If nothing * happens, report an ETIMEDOUT error. + * + * XXX Solaris 8 read() fails with EAGAIN after read-select() returns + * success. */ - if (timeout > 0 && read_wait(fd, timeout) < 0) - return (-1); - else - return (read(fd, buf, len)); + for (;;) { + if (timeout > 0 && read_wait(fd, timeout) < 0) + return (-1); + if ((ret = read(fd, buf, len)) < 0 && timeout > 0 && errno == EAGAIN) { + msg_warn("read() returns EAGAIN on a readable file descriptor!"); + msg_warn("pausing to avoid going into a tight select/read loop!"); + sleep(1); + } else { + return (ret); + } + } } diff --git a/postfix/src/util/timed_write.c b/postfix/src/util/timed_write.c index 723bf036d..3089a8390 100644 --- a/postfix/src/util/timed_write.c +++ b/postfix/src/util/timed_write.c @@ -48,23 +48,42 @@ #include #include +#include /* Utility library. */ -#include "iostuff.h" +#include +#include /* timed_write - write with deadline */ int timed_write(int fd, void *buf, unsigned len, int timeout, void *unused_context) { + int ret; /* * Wait for a limited amount of time for something to happen. If nothing * happens, report an ETIMEDOUT error. + * + * XXX Solaris 8 read() fails with EAGAIN after read-select() returns + * success. The code below exists just in case their write implementation + * is equally broken. + * + * This condition may also be found on systems where select() returns + * success on pipes with less than PIPE_BUF bytes of space, and with + * badly designed software where multiple writers are fighting for access + * to the same resource. */ - if (timeout > 0 && write_wait(fd, timeout) < 0) - return (-1); - else - return (write(fd, buf, len)); + for (;;) { + if (timeout > 0 && write_wait(fd, timeout) < 0) + return (-1); + if ((ret = write(fd, buf, len)) < 0 && timeout > 0 && errno == EAGAIN) { + msg_warn("write() returns EAGAIN on a writable file descriptor!"); + msg_warn("pausing to avoid going into a tight select/write loop!"); + sleep(1); + } else { + return (ret); + } + } }