mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-30 13:48:06 +00:00
postfix-2.3-RC4
This commit is contained in:
committed by
Viktor Dukhovni
parent
bf46e2a2f9
commit
c79abe8c8c
@@ -10,39 +10,24 @@ Of course Postfix still produces the same "informal" error descriptions
|
|||||||
that it produced before (for example, the error text that appears
|
that it produced before (for example, the error text that appears
|
||||||
in the first section of a bounce report).
|
in the first section of a bounce report).
|
||||||
|
|
||||||
The Postfix LMTP/SMTP clients also report locally generated SMTP-style
|
Other error reports are not in the form of SMTP-style replies.
|
||||||
Diagnostic-Code: text (such as "420 conversation timed out") while
|
|
||||||
taking care NOT to present these as if they are replies from the
|
|
||||||
remote MTA (Sendmail appears to violate RFC 3464 here).
|
|
||||||
|
|
||||||
That was the easy part. The remainder of Postfix is still somewhat
|
- The Postfix LMTP/SMTP client generates Diagnostic-Type: X-Postfix
|
||||||
inconsistent in the way that it creates the formal Diagnostic-Type:
|
for locally generated errors (host not found, connection timed out
|
||||||
and Diagnostic-Code: information.
|
etc.). It generates Diagnostic-Type: SMTP only for replies from
|
||||||
|
an SMTP server.
|
||||||
|
|
||||||
- The queue manager attempts to produce standard SMTP Diagnostic-Type:
|
- The queue manager generates Diagnostic-Type: X-Postfix for errors
|
||||||
and Diagnostic-Code: information for errors that it detects. It
|
that it detects. It also receives error information from delivery
|
||||||
also receives error information from delivery agents and reports
|
agents and reports that information unmodified when it decides to
|
||||||
that information unmodified when it decides to "temporarily suspend"
|
"temporarily suspend" a delivery channel.
|
||||||
a delivery channel.
|
|
||||||
|
|
||||||
- The "pipe to command" code in local(8) and pipe(8) produces
|
- The "pipe to command" code in local(8) and pipe(8) produces
|
||||||
Diagnostic-Type: X-UNIX, and Diagnostic-Code: text that is taken
|
Diagnostic-Type: X-UNIX, and Diagnostic-Code: text that is taken
|
||||||
from /usr/include/sysexits.h or from the command output. This could
|
from /usr/include/sysexits.h or from the command output.
|
||||||
be morphed into SMTP-style information, by mapping a sysexits error
|
|
||||||
code to an SMTP error code, and combining that SMTP code with the
|
|
||||||
sysexits.h text or command output. The advantage of this would be
|
|
||||||
more useful Diagnostic-Code: information.
|
|
||||||
|
|
||||||
- The code that delivers to mailbox produces Diagnostic-Type:
|
- The code that delivers to mailbox produces Diagnostic-Type:
|
||||||
X-Postfix and Diagnostic-Code: text that is the same good old Postfix
|
X-Postfix and Diagnostic-Code: text that is the same good old
|
||||||
error message that we are already familiar with. Typically these
|
Postfix error message that we are already familiar with. Typically
|
||||||
are errno-style reports about locking a file or appending a file.
|
these are errno-style reports about locking a file or appending a
|
||||||
This information could be morphed into SMTP-style information, by
|
file.
|
||||||
mapping an errno error code into an SMTP error code, and combining
|
|
||||||
that SMTP code with the Postfix-style text that we already have
|
|
||||||
(such as text that says unable to lock mailbox, or mailbox file
|
|
||||||
size limit exceeded).
|
|
||||||
|
|
||||||
I'm not (yet) religious about banning X-UNIX and X-Postfix from the
|
|
||||||
formal part of a delivery status report, but all these non-standard
|
|
||||||
diagnostic codes aren't really very useful.
|
|
||||||
|
@@ -12436,6 +12436,15 @@ Apologies for any names omitted.
|
|||||||
errors while processing milter message modification requests.
|
errors while processing milter message modification requests.
|
||||||
Files: cleanup/cleanup_milter.c, milter/milter8.c.
|
Files: cleanup/cleanup_milter.c, milter/milter8.c.
|
||||||
|
|
||||||
|
20060703
|
||||||
|
|
||||||
|
Debugging: the Postfix milter client gives more context
|
||||||
|
when it experiences trouble while talking to an uncooperative
|
||||||
|
Milter application. File: milter/milter8.c.
|
||||||
|
|
||||||
|
Compatibility: with OpenBSD 2.7 and later, the alias file
|
||||||
|
is now in /etc/mail/aliases.
|
||||||
|
|
||||||
Wish list:
|
Wish list:
|
||||||
|
|
||||||
In the SMTPD policy client (encode or strip) non-printable
|
In the SMTPD policy client (encode or strip) non-printable
|
||||||
|
@@ -66,14 +66,17 @@ Note: Do not use the postfix user as the maildrop user.
|
|||||||
|
|
||||||
/etc/postfix/master.cf:
|
/etc/postfix/master.cf:
|
||||||
maildrop unix - n n - - pipe
|
maildrop unix - n n - - pipe
|
||||||
flags=DRhu user=vmail argv=/path/to/maildrop -d ${recipient}
|
flags=ODRhu user=vmail argv=/path/to/maildrop -d ${recipient}
|
||||||
|
|
||||||
|
The pipe(8) manual page gives a detailed description of the above command line
|
||||||
|
arguments, and more.
|
||||||
|
|
||||||
If you want to support user+extension@domain style addresses, use the following
|
If you want to support user+extension@domain style addresses, use the following
|
||||||
instead:
|
instead:
|
||||||
|
|
||||||
/etc/postfix/master.cf:
|
/etc/postfix/master.cf:
|
||||||
maildrop unix - n n - - pipe
|
maildrop unix - n n - - pipe
|
||||||
flags=DRhu user=vmail argv=/path/to/maildrop
|
flags=ODRhu user=vmail argv=/path/to/maildrop
|
||||||
-d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop}
|
-d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop}
|
||||||
|
|
||||||
The mail is delivered to ${user}@${nexthop} (match key for maildrop userdb
|
The mail is delivered to ${user}@${nexthop} (match key for maildrop userdb
|
||||||
|
@@ -45,7 +45,7 @@ and for someother.domain. </p>
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
1 /etc/postfix/main.cf:
|
1 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
|
||||||
2 maildrop_destination_recipient_limit = 1
|
2 maildrop_destination_recipient_limit = 1
|
||||||
3 <a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a> = some.domain someother.domain
|
3 <a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a> = some.domain someother.domain
|
||||||
4 <a href="postconf.5.html#virtual_transport">virtual_transport</a> = maildrop
|
4 <a href="postconf.5.html#virtual_transport">virtual_transport</a> = maildrop
|
||||||
@@ -70,7 +70,7 @@ at a time to the maildrop delivery agent. </p>
|
|||||||
|
|
||||||
<li> <p> Line 3 informs Postfix that some.domain and someother.domain
|
<li> <p> Line 3 informs Postfix that some.domain and someother.domain
|
||||||
are so-called <a href="ADDRESS_CLASS_README.html#virtual_mailbox_class">virtual mailbox domains</a>.
|
are so-called <a href="ADDRESS_CLASS_README.html#virtual_mailbox_class">virtual mailbox domains</a>.
|
||||||
Instead of listing the names in main.cf you can also
|
Instead of listing the names in <a href="postconf.5.html">main.cf</a> you can also
|
||||||
list them in a file; see the <a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a> documentation for
|
list them in a file; see the <a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a> documentation for
|
||||||
details. </p>
|
details. </p>
|
||||||
|
|
||||||
@@ -98,20 +98,23 @@ to deliver the mail. </p>
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
/etc/postfix/master.cf:
|
/etc/postfix/<a href="master.5.html">master.cf</a>:
|
||||||
maildrop unix - n n - - pipe
|
maildrop unix - n n - - pipe
|
||||||
flags=DRhu user=vmail argv=/path/to/maildrop -d ${recipient}
|
flags=ODRhu user=vmail argv=/path/to/maildrop -d ${recipient}
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
|
<p> The <a href="pipe.8.html">pipe(8)</a> manual page gives a detailed description of the
|
||||||
|
above command line arguments, and more. </p>
|
||||||
|
|
||||||
<p> If you want to support user+extension@domain style addresses,
|
<p> If you want to support user+extension@domain style addresses,
|
||||||
use the following instead: </p>
|
use the following instead: </p>
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
/etc/postfix/master.cf:
|
/etc/postfix/<a href="master.5.html">master.cf</a>:
|
||||||
maildrop unix - n n - - pipe
|
maildrop unix - n n - - pipe
|
||||||
flags=DRhu user=vmail argv=/path/to/maildrop
|
flags=ODRhu user=vmail argv=/path/to/maildrop
|
||||||
-d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop}
|
-d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop}
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
@@ -119,7 +122,7 @@ use the following instead: </p>
|
|||||||
<p> The mail is delivered to ${user}@${nexthop} (match key for
|
<p> The mail is delivered to ${user}@${nexthop} (match key for
|
||||||
maildrop userdb lookup). The ${extension} and the other address
|
maildrop userdb lookup). The ${extension} and the other address
|
||||||
components are available to maildrop rules as $1, $2, $3, ... and
|
components are available to maildrop rules as $1, $2, $3, ... and
|
||||||
can be omitted from master.cf or ignored by maildrop when not
|
can be omitted from <a href="master.5.html">master.cf</a> or ignored by maildrop when not
|
||||||
needed. </p>
|
needed. </p>
|
||||||
|
|
||||||
<h2><a name="indirect">Indirect delivery via the local delivery agent</a></h2>
|
<h2><a name="indirect">Indirect delivery via the local delivery agent</a></h2>
|
||||||
@@ -135,7 +138,7 @@ You would typically use this for domains that are listed in
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
/etc/postfix/main.cf:
|
/etc/postfix/<a href="postconf.5.html">main.cf</a>:
|
||||||
<a href="postconf.5.html#mailbox_command">mailbox_command</a> = /path/to/maildrop -d ${USER}
|
<a href="postconf.5.html#mailbox_command">mailbox_command</a> = /path/to/maildrop -d ${USER}
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
@@ -148,7 +151,7 @@ use the Postfix <a href="local.8.html">local(8)</a> delivery agent's <a href="po
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
/etc/postfix/main.cf:
|
/etc/postfix/<a href="postconf.5.html">main.cf</a>:
|
||||||
<a href="postconf.5.html#mailbox_command_maps">mailbox_command_maps</a> = hash:/etc/postfix/mailbox_commands
|
<a href="postconf.5.html#mailbox_command_maps">mailbox_command_maps</a> = hash:/etc/postfix/mailbox_commands
|
||||||
|
|
||||||
/etc/postfix/mailbox_commands:
|
/etc/postfix/mailbox_commands:
|
||||||
|
@@ -399,7 +399,7 @@ ${WARN='-Wall -Wno-comment -Wformat -Wimplicit -Wmissing-prototypes \
|
|||||||
export SYSTYPE AR ARFL RANLIB SYSLIBS CC OPT DEBUG AWK OPTS
|
export SYSTYPE AR ARFL RANLIB SYSLIBS CC OPT DEBUG AWK OPTS
|
||||||
|
|
||||||
# Snapshot only.
|
# Snapshot only.
|
||||||
CCARGS="$CCARGS -DSNAPSHOT"
|
#CCARGS="$CCARGS -DSNAPSHOT"
|
||||||
|
|
||||||
# Non-production: needs thorough testing, or major changes are still
|
# Non-production: needs thorough testing, or major changes are still
|
||||||
# needed before the code stabilizes.
|
# needed before the code stabilizes.
|
||||||
|
@@ -100,10 +100,13 @@ to deliver the mail. </p>
|
|||||||
<pre>
|
<pre>
|
||||||
/etc/postfix/master.cf:
|
/etc/postfix/master.cf:
|
||||||
maildrop unix - n n - - pipe
|
maildrop unix - n n - - pipe
|
||||||
flags=DRhu user=vmail argv=/path/to/maildrop -d ${recipient}
|
flags=ODRhu user=vmail argv=/path/to/maildrop -d ${recipient}
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
|
<p> The pipe(8) manual page gives a detailed description of the
|
||||||
|
above command line arguments, and more. </p>
|
||||||
|
|
||||||
<p> If you want to support user+extension@domain style addresses,
|
<p> If you want to support user+extension@domain style addresses,
|
||||||
use the following instead: </p>
|
use the following instead: </p>
|
||||||
|
|
||||||
@@ -111,7 +114,7 @@ use the following instead: </p>
|
|||||||
<pre>
|
<pre>
|
||||||
/etc/postfix/master.cf:
|
/etc/postfix/master.cf:
|
||||||
maildrop unix - n n - - pipe
|
maildrop unix - n n - - pipe
|
||||||
flags=DRhu user=vmail argv=/path/to/maildrop
|
flags=ODRhu user=vmail argv=/path/to/maildrop
|
||||||
-d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop}
|
-d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop}
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
@@ -1414,15 +1414,12 @@ extern char *var_smtp_sasl_type;
|
|||||||
#define DEF_LMTP_SASL_TLS_OPTS "$" VAR_LMTP_SASL_OPTS
|
#define DEF_LMTP_SASL_TLS_OPTS "$" VAR_LMTP_SASL_OPTS
|
||||||
extern char *var_smtp_sasl_tls_opts;
|
extern char *var_smtp_sasl_tls_opts;
|
||||||
|
|
||||||
#ifdef SNAPSHOT /* XXX: Not yet */
|
|
||||||
#define VAR_SMTP_SASL_TLSV_OPTS "smtp_sasl_tls_verified_security_options"
|
#define VAR_SMTP_SASL_TLSV_OPTS "smtp_sasl_tls_verified_security_options"
|
||||||
#define DEF_SMTP_SASL_TLSV_OPTS "$" VAR_SMTP_SASL_TLS_OPTS
|
#define DEF_SMTP_SASL_TLSV_OPTS "$" VAR_SMTP_SASL_TLS_OPTS
|
||||||
#define VAR_LMTP_SASL_TLSV_OPTS "lmtp_sasl_tls_verified_security_options"
|
#define VAR_LMTP_SASL_TLSV_OPTS "lmtp_sasl_tls_verified_security_options"
|
||||||
#define DEF_LMTP_SASL_TLSV_OPTS "$" VAR_LMTP_SASL_TLS_OPTS
|
#define DEF_LMTP_SASL_TLSV_OPTS "$" VAR_LMTP_SASL_TLS_OPTS
|
||||||
extern char *var_smtp_sasl_tlsv_opts;
|
extern char *var_smtp_sasl_tlsv_opts;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LMTP server. The soft error limit determines how many errors an LMTP
|
* LMTP server. The soft error limit determines how many errors an LMTP
|
||||||
* client may make before we start to slow down; the hard error limit
|
* client may make before we start to slow down; the hard error limit
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||||
* patchlevel; they change the release date only.
|
* patchlevel; they change the release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20060702"
|
#define MAIL_RELEASE_DATE "20060703"
|
||||||
#define MAIL_VERSION_NUMBER "2.3-RC3"
|
#define MAIL_VERSION_NUMBER "2.3-RC4"
|
||||||
|
|
||||||
#define VAR_MAIL_VERSION "mail_version"
|
#define VAR_MAIL_VERSION "mail_version"
|
||||||
#define DEF_MAIL_VERSION MAIL_VERSION_NUMBER
|
#define DEF_MAIL_VERSION MAIL_VERSION_NUMBER
|
||||||
|
@@ -485,13 +485,14 @@ static void milter8_close_stream(MILTER8 *milter)
|
|||||||
milter->state = MILTER8_STAT_CLOSED;
|
milter->state = MILTER8_STAT_CLOSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* milter8_read_cmd - receive command code now, receive data later */
|
/* milter8_read_resp - receive command code now, receive data later */
|
||||||
|
|
||||||
static int milter8_read_cmd(MILTER8 *milter, unsigned char *command,
|
static int milter8_read_resp(MILTER8 *milter, int event, unsigned char *command,
|
||||||
ssize_t *data_len)
|
ssize_t *data_len)
|
||||||
{
|
{
|
||||||
UINT32_TYPE len;
|
UINT32_TYPE len;
|
||||||
ssize_t pkt_len;
|
ssize_t pkt_len;
|
||||||
|
const char *smfic_name;
|
||||||
int cmd;
|
int cmd;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -499,7 +500,10 @@ static int milter8_read_cmd(MILTER8 *milter, unsigned char *command,
|
|||||||
*/
|
*/
|
||||||
if ((vstream_fread(milter->fp, (char *) &len, UINT32_SIZE))
|
if ((vstream_fread(milter->fp, (char *) &len, UINT32_SIZE))
|
||||||
!= UINT32_SIZE) {
|
!= UINT32_SIZE) {
|
||||||
msg_warn("milter %s: can't read packet header: %m", milter->m.name);
|
smfic_name = str_name_code(smfic_table, event);
|
||||||
|
msg_warn("milter %s: can't read %s reply packet header: %m",
|
||||||
|
milter->m.name, smfic_name != 0 ?
|
||||||
|
smfic_name : "(unknown MTA event)");
|
||||||
return (milter8_comm_error(milter));
|
return (milter8_comm_error(milter));
|
||||||
} else if ((pkt_len = ntohl(len)) < 1) {
|
} else if ((pkt_len = ntohl(len)) < 1) {
|
||||||
msg_warn("milter %s: bad packet length: %ld",
|
msg_warn("milter %s: bad packet length: %ld",
|
||||||
@@ -959,7 +963,7 @@ static const char *milter8_event(MILTER8 *milter, int event,
|
|||||||
#define IN_CONNECT_EVENT(e) ((e) == SMFIC_CONNECT || (e) == SMFIC_HELO)
|
#define IN_CONNECT_EVENT(e) ((e) == SMFIC_CONNECT || (e) == SMFIC_HELO)
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (milter8_read_cmd(milter, &cmd, &data_size) != 0)
|
if (milter8_read_resp(milter, event, &cmd, &data_size) != 0)
|
||||||
return (milter->def_reply);
|
return (milter->def_reply);
|
||||||
if (msg_verbose)
|
if (msg_verbose)
|
||||||
msg_info("reply: %s data %ld bytes",
|
msg_info("reply: %s data %ld bytes",
|
||||||
@@ -1464,9 +1468,9 @@ static void milter8_connect(MILTER8 *milter)
|
|||||||
/*
|
/*
|
||||||
* Receive the filter's response and verify that we are compatible.
|
* Receive the filter's response and verify that we are compatible.
|
||||||
*/
|
*/
|
||||||
else if (milter8_read_cmd(milter, &cmd, &data_len) != 0) {
|
else if (milter8_read_resp(milter, SMFIC_OPTNEG, &cmd, &data_len) != 0) {
|
||||||
msg_warn("milter %s: read error in initial handshake", milter->m.name);
|
msg_warn("milter %s: read error in initial handshake", milter->m.name);
|
||||||
/* milter8_read_cmd() called milter8_comm_error() */
|
/* milter8_read_resp() called milter8_comm_error() */
|
||||||
} else if (cmd != SMFIC_OPTNEG) {
|
} else if (cmd != SMFIC_OPTNEG) {
|
||||||
msg_warn("milter %s: unexpected reply \"%c\" in initial handshake",
|
msg_warn("milter %s: unexpected reply \"%c\" in initial handshake",
|
||||||
milter->m.name, cmd);
|
milter->m.name, cmd);
|
||||||
|
@@ -47,6 +47,9 @@
|
|||||||
#if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000)
|
#if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000)
|
||||||
#define ALIAS_DB_MAP "hash:/etc/mail/aliases" /* sendmail 8.10 */
|
#define ALIAS_DB_MAP "hash:/etc/mail/aliases" /* sendmail 8.10 */
|
||||||
#endif
|
#endif
|
||||||
|
#if (defined(OpenBSD) && OpenBSD >= 200006)
|
||||||
|
#define ALIAS_DB_MAP "hash:/etc/mail/aliases" /* OpenBSD 2.7 */
|
||||||
|
#endif
|
||||||
#ifndef ALIAS_DB_MAP
|
#ifndef ALIAS_DB_MAP
|
||||||
#define ALIAS_DB_MAP "hash:/etc/aliases"
|
#define ALIAS_DB_MAP "hash:/etc/aliases"
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user