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
# 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
# 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
# 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
# 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
<p>
You run the Postfix SMTP server inside a <b>chroot</b> 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:
+
+<blockquote>
+<pre>
+warning: /var/spool/postfix/etc/resolv.conf and /etc/resolv.conf differ
+warning: /var/spool/postfix/etc/localtime and /etc/localtime differ
+</pre>
+</blockquote>
+
+<p>
+
+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
Check out your Postfix <b>master.cf</b> 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
-<b>examples</b> subdirectory.
+<b>examples</b> subdirectory. See also the other FAQ entry on
+<a href="#numerical_log">name service trouble</a>.
</ul>
<dd> <b>smtpd_client_restrictions = hash:/etc/postfix/access,
reject_rbl_client relays.ordb.org</b> (free service)
-<dd> <b>smtpd_client_restrictions = hash:/etc/postfix/access,
-reject_rhsbl_client dsn.rfc-ignorant.org</b> (free service)
+<dd> <b>smtpd_sender_restrictions = hash:/etc/postfix/access,
+reject_rhsbl_sender dsn.rfc-ignorant.org</b> (free service)
<dd> <b>smtpd_client_restrictions = permit_mynetworks,
reject_unknown_client</b>
<table border="1">
-<tr><th>Recipient domain matches <th>Recipient lookup table
+<tr><th>Recipient domain matches</th> <th>Recipient lookup table</th>
-<tr><td><a href="basic.html#mydestination"> $mydestination</a> or
-<a href="basic.html#inet_interfaces">$inet_interfaces</a>
-<td>$local_recipient_maps
+</tr><tr><td><a href="basic.html#mydestination"> $mydestination</a> or
+<a href="basic.html#inet_interfaces">$inet_interfaces</a></td>
+<td>$local_recipient_maps</td>
-<tr><td>$virtual_alias_domains <td>$virtual_alias_maps
+</tr><tr><td>$virtual_alias_domains</td> <td>$virtual_alias_maps</td>
-<tr><td>$virtual_mailbox_domains <td>$virtual_mailbox_maps
+</tr><tr><td>$virtual_mailbox_domains</td> <td>$virtual_mailbox_maps</td>
-<tr><td>$relay_domains <td>$relay_recipient_maps
+</tr><tr><td>$relay_domains</td> <td>$relay_recipient_maps</td>
-</table>
+</tr></table>
</blockquote>
* 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;
/*
#include <sys_defs.h>
#include <unistd.h>
+#include <errno.h>
/* Utility library. */
-#include "iostuff.h"
+#include <msg.h>
+#include <iostuff.h>
/* 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);
+ }
+ }
}
#include <sys_defs.h>
#include <unistd.h>
+#include <errno.h>
/* Utility library. */
-#include "iostuff.h"
+#include <msg.h>
+#include <iostuff.h>
/* 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);
+ }
+ }
}