From c79abe8c8cc1b9f4d3079abb4315142dff776488 Mon Sep 17 00:00:00 2001
From: Wietse Venema
+- 1 /etc/postfix/main.cf: + 1 /etc/postfix/main.cf: 2 maildrop_destination_recipient_limit = 1 3 virtual_mailbox_domains = some.domain someother.domain 4 virtual_transport = maildrop @@ -70,7 +70,7 @@ at a time to the maildrop delivery agent.Line 3 informs Postfix that some.domain and someother.domain are so-called virtual mailbox domains. -Instead of listing the names in main.cf you can also +Instead of listing the names in main.cf you can also list them in a file; see the virtual_mailbox_domains documentation for details.
@@ -98,20 +98,23 @@ to deliver the mail.+-/etc/postfix/master.cf: +/etc/postfix/master.cf: 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 instead:
@@ -119,7 +122,7 @@ use the following instead:-/etc/postfix/master.cf: +/etc/postfix/master.cf: 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}The mail is delivered to ${user}@${nexthop} (match key for maildrop userdb lookup). The ${extension} and the other address 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 master.cf or ignored by maildrop when not needed.
Indirect delivery via the local delivery agent
@@ -135,7 +138,7 @@ You would typically use this for domains that are listed in@@ -148,7 +151,7 @@ use the Postfix local(8) delivery agent's main.cf: mailbox_command_maps = hash:/etc/postfix/mailbox_commands /etc/postfix/mailbox_commands: diff --git a/postfix/makedefs b/postfix/makedefs index 70cbc5700..02db2f623 100644 --- a/postfix/makedefs +++ b/postfix/makedefs @@ -399,7 +399,7 @@ ${WARN='-Wall -Wno-comment -Wformat -Wimplicit -Wmissing-prototypes \ export SYSTYPE AR ARFL RANLIB SYSLIBS CC OPT DEBUG AWK OPTS # Snapshot only. -CCARGS="$CCARGS -DSNAPSHOT" +#CCARGS="$CCARGS -DSNAPSHOT" # Non-production: needs thorough testing, or major changes are still # needed before the code stabilizes. diff --git a/postfix/proto/MAILDROP_README.html b/postfix/proto/MAILDROP_README.html index e41e127f5..aaaac162c 100644 --- a/postfix/proto/MAILDROP_README.html +++ b/postfix/proto/MAILDROP_README.html @@ -100,10 +100,13 @@ to deliver the mail.-/etc/postfix/main.cf: +/etc/postfix/main.cf: mailbox_command = /path/to/maildrop -d ${USER}/etc/postfix/master.cf: 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 instead:
@@ -111,7 +114,7 @@ use the following instead:/etc/postfix/master.cf: 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}diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h index 443fe52e9..96d94dfe6 100644 --- a/postfix/src/global/mail_params.h +++ b/postfix/src/global/mail_params.h @@ -1414,15 +1414,12 @@ extern char *var_smtp_sasl_type; #define DEF_LMTP_SASL_TLS_OPTS "$" VAR_LMTP_SASL_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 DEF_SMTP_SASL_TLSV_OPTS "$" VAR_SMTP_SASL_TLS_OPTS #define VAR_LMTP_SASL_TLSV_OPTS "lmtp_sasl_tls_verified_security_options" #define DEF_LMTP_SASL_TLSV_OPTS "$" VAR_LMTP_SASL_TLS_OPTS extern char *var_smtp_sasl_tlsv_opts; -#endif - /* * 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 diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index ad6f60c84..889481b48 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,8 +20,8 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20060702" -#define MAIL_VERSION_NUMBER "2.3-RC3" +#define MAIL_RELEASE_DATE "20060703" +#define MAIL_VERSION_NUMBER "2.3-RC4" #define VAR_MAIL_VERSION "mail_version" #define DEF_MAIL_VERSION MAIL_VERSION_NUMBER diff --git a/postfix/src/milter/milter8.c b/postfix/src/milter/milter8.c index e926ac2d1..45f67f459 100644 --- a/postfix/src/milter/milter8.c +++ b/postfix/src/milter/milter8.c @@ -485,13 +485,14 @@ static void milter8_close_stream(MILTER8 *milter) 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) { UINT32_TYPE len; ssize_t pkt_len; + const char *smfic_name; 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)) != 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)); } else if ((pkt_len = ntohl(len)) < 1) { 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) for (;;) { - if (milter8_read_cmd(milter, &cmd, &data_size) != 0) + if (milter8_read_resp(milter, event, &cmd, &data_size) != 0) return (milter->def_reply); if (msg_verbose) 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. */ - 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); - /* milter8_read_cmd() called milter8_comm_error() */ + /* milter8_read_resp() called milter8_comm_error() */ } else if (cmd != SMFIC_OPTNEG) { msg_warn("milter %s: unexpected reply \"%c\" in initial handshake", milter->m.name, cmd); diff --git a/postfix/src/util/sys_defs.h b/postfix/src/util/sys_defs.h index 56fcdabea..efb0b3b02 100644 --- a/postfix/src/util/sys_defs.h +++ b/postfix/src/util/sys_defs.h @@ -47,6 +47,9 @@ #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000) #define ALIAS_DB_MAP "hash:/etc/mail/aliases" /* sendmail 8.10 */ #endif +#if (defined(OpenBSD) && OpenBSD >= 200006) +#define ALIAS_DB_MAP "hash:/etc/mail/aliases" /* OpenBSD 2.7 */ +#endif #ifndef ALIAS_DB_MAP #define ALIAS_DB_MAP "hash:/etc/aliases" #endif