From: Wietse Venema Date: Thu, 12 Dec 2002 05:00:00 +0000 (-0500) Subject: postfix-1.1.12-20021212 X-Git-Tag: v2.0.0~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=230884f7d844372d1a0fc50d01924593f2b12027;p=thirdparty%2Fpostfix.git postfix-1.1.12-20021212 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 4b8c886e6..9203896ac 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -7348,7 +7348,7 @@ Apologies for any names omitted. only one of the results has a malformed name or address. File: dns/dns_lookup.c. -200201208 +20021208 Cleanup: with the preliminary address domain classification concept as implemented by the trivial-rewrite address @@ -7362,6 +7362,9 @@ Apologies for any names omitted. and virtual_xx_domains, and with local_recipient_maps and the local delivery agent. File: smtpd/smtpd_check.c. + Cleanup: removed support for obsolete #number domain forms. + File: smtpd/smtpd_check.c. + 20021209 The Postfix installation procedure no longer sets the @@ -7379,6 +7382,25 @@ Apologies for any names omitted. suddenly lose all their mail because local_recipient_maps is now turned on by default. +20021211 + + Performance: doubled the default process limit (50->100) + and default queue manager active queue message/recipient + limits (10k->20k). File: global/mail_params.h. + +20021212 + + Cleanup: allow transport map lookups to override error + mailer results (to avoid breaking existing installations), + and do transport map lookups before relocated map lookups. + Files: trivial-rewrite/resolve.c, trivial-rewrite/transport.c. + + Admin friendliness: the SMTP server now reports "User + unknown in {local recipient | virtual alias | virtual + mailbox | relay recipient} table". This will make trouble + shooting a little easier. Files: smtpd/smtpd_check.c, + trivial-rewrite/resolve.c. + Open problems: Low: after successful delivery, per-queue window += 1/window, diff --git a/postfix/INSTALL b/postfix/INSTALL index 5ff2c83c1..53a2d6b57 100644 --- a/postfix/INSTALL +++ b/postfix/INSTALL @@ -50,6 +50,7 @@ If your system is supported, it is one of AIX 4.1.x AIX 4.2.0 AIX 4.3.x + AIX 5.2 BSD/OS 2.x BSD/OS 3.x BSD/OS 4.x diff --git a/postfix/README_FILES/RELEASE_NOTES b/postfix/README_FILES/RELEASE_NOTES new file mode 120000 index 000000000..577eefe81 --- /dev/null +++ b/postfix/README_FILES/RELEASE_NOTES @@ -0,0 +1 @@ +../RELEASE_NOTES \ No newline at end of file diff --git a/postfix/README_FILES/VIRTUAL_README b/postfix/README_FILES/VIRTUAL_README index ac4809854..fd833bc0a 100644 --- a/postfix/README_FILES/VIRTUAL_README +++ b/postfix/README_FILES/VIRTUAL_README @@ -8,9 +8,13 @@ Purpose of this software You can use the virtual delivery agent for mailbox delivery of some or all domains that are handled by a machine. -This mechanism is different from simulated virtual domains that -are implemented by translating each virtual address into a real -local user. For that, see the virtual(5) manual page. +This mechanism is different from simulated virtual domains. Those +are implemented by translating every recipient address into a +different address. For that, see the virtual(5) manual page. + +With the virtual delivery agent, every recipient adress can have +its own mailbox. There is no translation from recipient addresses +into different addresses. This is what Andrew McNamara wrote when he made the virtual delivery agent available. diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 3defcc3c4..102edaf42 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -19,11 +19,15 @@ This release adds a new "relay" service to the Postfix master.cf file. If your Postfix is unable to connect to the "relay" service then you have not properly followed the installation procedure. -The Postfix SMTP server now rejects mail for local recipients that -it does not know about. For this to work correctly, you need to -review the section titled "REJECTING UNKNOWN LOCAL USERS" in -conf/main.cf if one of the following is true: - +The Postfix SMTP server now rejects mail for $mydestination domain +recipients that it does not know about. For this to work correctly, +you need to review the section titled "REJECTING UNKNOWN LOCAL +USERS" in conf/main.cf if one of the following is true: + +- You define $mydestination domain recipients in files other than + /etc/passwd, /etc/aliases, or the $virtual_alias_maps files. + For example, you define $mydestination domain recipients in the + $virtual_mailbox_maps files. - You run the Postfix SMTP server chrooted (see master.cf). - You redefined the local delivery agent in master.cf. - You redefined the "local_transport" setting in main.cf. @@ -62,12 +66,15 @@ The "check_relay_domains" restriction is going away. The SMTP server logs a warning and suggests using "reject_unauth_destination" instead. +The Postfix SMTP client no longer expands CNAMEs in MAIL FROM or +RCPT TO addresses (as permitted by RFC 2821). + The Postfix installation procedure no longer sets the "chattr +S" bit on Linux queue directories. Wietse has gotten too annoyed with naive reviewers who complain about performance without having a clue of what they are comparing. -Major changes with Postfix snapshot 1.1.11-20021209 +Major changes with Postfix snapshot 1.1.12-20021209 =================================================== This release introduces separation of lookup tables for addresses diff --git a/postfix/conf/main.cf b/postfix/conf/main.cf index 1883e4738..f8e17b766 100644 --- a/postfix/conf/main.cf +++ b/postfix/conf/main.cf @@ -153,8 +153,8 @@ mail_owner = postfix # REJECTING UNKNOWN LOCAL USERS # # The local_recipient_maps parameter specifies optional lookup tables -# with all names (not addresses) of users that are local with respect -# to $mydestination and $inet_interfaces. +# with all names or addresses of users that are local with respect +# to $mydestination and $inet_interfaces. # # If this parameter is defined, then the SMTP server will reject # mail for unknown local users. This parameter is defined by default. @@ -163,6 +163,11 @@ mail_owner = postfix # delivery agent for local delivery. You need to update the # local_recipient_maps setting if: # +# - You define $mydestination domain recipients in files other than +# /etc/passwd, /etc/aliases, or the $virtual_alias_maps files. +# For example, you define $mydestination domain recipients in +# the $virtual_mailbox_maps files. +# # - You redefined the local delivery agent in master.cf. # # - You redefined the "local_transport" setting in main.cf. @@ -221,15 +226,14 @@ local_recipient_maps = unix:passwd.byname $alias_maps #mynetworks = $config_directory/mynetworks #mynetworks = hash:/etc/postfix/network_table -# The relay_domains parameter restricts what clients this mail system -# will relay mail from, or what destinations this system will relay -# mail to. See the smtpd_recipient_restrictions restriction in the +# The relay_domains parameter restricts what destinations this system will +# relay mail to. See the smtpd_recipient_restrictions restriction in the # file sample-smtpd.cf for detailed information. # # By default, Postfix relays mail # - from "trusted" clients whose IP address matches $mynetworks, -# - from untrusted clients to destinations that match $relay_domains -# or subdomains thereof, except addresses with sender-specified routing. +# - from any client to destinations that match $relay_domains or +# subdomains thereof, except addresses with sender-specified routing. # The default relay_domains value is $mydestination. # # In addition to the above, the Postfix SMTP server by default accepts mail diff --git a/postfix/conf/postfix-files b/postfix/conf/postfix-files index 3616c652d..1f924f06c 100644 --- a/postfix/conf/postfix-files +++ b/postfix/conf/postfix-files @@ -177,11 +177,13 @@ $readme_directory/LDAP_README:f:root:-:644 $readme_directory/LINUX_README:f:root:-:644 $readme_directory/LMTP_README:f:root:-:644 $readme_directory/MACOSX_README:f:root:-:644 +$readme_directory/MAILDROP_README:f:root:-:644 $readme_directory/MYSQL_README:f:root:-:644 $readme_directory/NFS_README:f:root:-:644 $readme_directory/PACKAGE_README:f:root:-:644 $readme_directory/PCRE_README:f:root:-:644 $readme_directory/QMQP_README:f:root:-:644 +$readme_directory/RELEASE_NOTES:f:root:-:644 $readme_directory/RESTRICTION_CLASS_README:f:root:-:644 $readme_directory/SASL_README:f:root:-:644 $readme_directory/ULTRIX_README:f:root:-:644 diff --git a/postfix/conf/postfix-script b/postfix/conf/postfix-script index e1558eb93..aa9661e8c 100644 --- a/postfix/conf/postfix-script +++ b/postfix/conf/postfix-script @@ -170,7 +170,7 @@ check) } find `ls -d $queue_directory/* | \ - egrep '/(incoming|active|defer|deferred|bounce|saved|corrupt|public|private|flush)$'` \ + egrep '/(incoming|active|defer|deferred|bounce|hold|corrupt|public|private|flush)$'` \ ! \( -type p -o -type s \) ! -user $mail_owner \ -exec $WARN not owned by $mail_owner: {} \; diff --git a/postfix/conf/sample-smtpd.cf b/postfix/conf/sample-smtpd.cf index 673b7a59a..9a82c179e 100644 --- a/postfix/conf/sample-smtpd.cf +++ b/postfix/conf/sample-smtpd.cf @@ -401,18 +401,16 @@ smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination # allow_untrusted_routing = no -# The relay_domains parameter restricts what client hostname domains -# (and subdomains thereof) this mail system will relay mail from, -# and restricts what destination domains (and subdomains thereof) -# this system will relay mail to. +# The relay_domains parameter restricts what destination domains (and +# subdomains thereof) this system will relay mail to. # # These domains are routed to the delivery agent specified with the # relay_transport parameter setting. # # By default, Postfix relays mail # - from trusted clients whose IP address matches $mynetworks, -# - from untrusted clients to destinations that match $relay_domains -# or subdomains thereof, except addresses with sender-specified routing. +# - from any client to destinations that match $relay_domains or +# subdomains thereof, except addresses with sender-specified routing. # The default relay_domains value is $mydestination. # # In addition to the above, the Postfix SMTP server by default accepts mail diff --git a/postfix/conf/transport b/postfix/conf/transport index becab48af..2b36e7c4d 100644 --- a/postfix/conf/transport +++ b/postfix/conf/transport @@ -216,11 +216,11 @@ # # virtual_transport # The default mail delivery transport when the desti- -# nation matches virtual_mailbox_domains. +# nation matches $virtual_mailbox_domains. # # relay_transport # The default mail delivery transport when the desti- -# nation matches relay_domains. +# nation matches $relay_domains. # # default_transport # The default mail delivery transport when the desti- @@ -233,8 +233,8 @@ # # relayhost # The default host for destinations that do not match -# $mydestination, $inet_interfaces, vir- -# tual_alias_domains or virtual_mailbox_domains. +# $mydestination, $inet_interfaces, $vir- +# tual_alias_domains or $virtual_mailbox_domains. # # SEE ALSO # postmap(1) create mapping table diff --git a/postfix/conf/virtual b/postfix/conf/virtual index c04f06c31..6fa76dfe1 100644 --- a/postfix/conf/virtual +++ b/postfix/conf/virtual @@ -24,6 +24,10 @@ # o To simulate virtual domains where all virtual # addresses are aliased to non-virtual addresses. # +# Simulated virtual domains are not to be confused +# with the true virtual domains that are implemented +# with the Postfix virtual(8) mail delivery agent. +# # Virtual aliasing is applied only to recipient envelope # addresses, and does not affect message headers. Think # Sendmail rule set S0, if you like. Use canonical(5) map- diff --git a/postfix/html/rate.html b/postfix/html/rate.html index f5b3b2a89..2ef8ec042 100644 --- a/postfix/html/rate.html +++ b/postfix/html/rate.html @@ -70,7 +70,7 @@ command.

Process limits

-The default_process_limit parameter (default: 50) gives +The default_process_limit parameter (default: 100) gives direct control over inbound and outbound delivery rates. This parameter controls the number of concurrent processes that implement a Postfix service (smtp client, smtp server, local delivery, etc.). @@ -319,7 +319,7 @@ failure.

-

qmgr_message_recipient_limit (default: 1000)
The +
qmgr_message_recipient_limit (default: 20000)
The size of many in-memory queue manager data structures. Among others, this parameter limits the size of the short-term, in-memory "dead" list. Destinations that don't fit the list are not added. diff --git a/postfix/html/resource.html b/postfix/html/resource.html index 234b49362..e37c78a0a 100644 --- a/postfix/html/resource.html +++ b/postfix/html/resource.html @@ -139,7 +139,7 @@ of in-memory object instances.
-
qmgr_message_recipient_limit (default: 10000) +
qmgr_message_recipient_limit (default: 20000)
An upper bound on the number of queue manager in-memory recipient address data structures. This @@ -149,7 +149,7 @@ href="rate.html#backoff">delivery rate control documentation.

-

qmgr_message_active_limit (default: 1000) +
qmgr_message_active_limit (default: 20000)
An upper limit on the number of messages in the active queue. For an introduction to the Postfix queue organization see diff --git a/postfix/html/rewrite.html b/postfix/html/rewrite.html index 5f839fa6c..b007757be 100644 --- a/postfix/html/rewrite.html +++ b/postfix/html/rewrite.html @@ -55,11 +55,11 @@ All mail:

-

  • Relocated users table +
  • Mail transport switch

    -

  • Mail transport switch +
  • Relocated users table @@ -307,7 +307,7 @@ individual machines. After applying the canonical and masquerade mappings, the cleanup daemon uses the virtual table to redirect mail for all +href="virtual.5.html">virtual alias table to redirect mail for all recipients, local or remote. The mapping affects only envelope recipients; it has no effect on message headers or envelope senders. Virtual alias lookups are useful to redirect mail for simulated @@ -336,39 +336,48 @@ Addresses found in virtual alias maps are subjected to another iteration of virtual aliasing, but are not subjected to canonical mapping, in order to avoid loops. -

    Relocated users table

    +

    Mail transport switch

    -Next, the queue manager runs each recipient name through the -
    relocated database. This table -provides information on how to reach users that no longer have an -account, or what to do with mail for entire domains that no longer -exist. When mail is sent to an address that is listed in this -table, the message is bounced with an informative message. +Once the address rewriting and resolving daemon has established +the destination of a message, it determines the default delivery +method for that destination. Postfix distinguishes four major +address classes, each with its own default delivery method. -

    +

    -Lookups of relocated users are disabled by default. To enable, edit -the relocated_maps parameter in the main.cf -file and specify one or more lookup tables, separated by whitespace -or commas. For example: + -
    +
    Destination matchesDefault delivery agent Controlling parameter -
    relocated_maps = hash:/etc/postfix/relocated +
    $mydestination or +$inet_interfaces +local +$local_transport - +
    $virtual_mailbox_domains +virtual +$virtual_transport -

    Mail transport switch

    +
    $relay_domains +relay (clone of smtp) +$relay_transport + +
    none +smtp +$default_transport -Once the queue manager has established the destination of a message, -the optional transport table controls -how the message will be delivered (this table is used by the address -rewriting and resolving daemon). By default, everything is sent -via the smtp transport. The transport -table can be used to send mail to specific sites via UUCP, -or to send mail to a really broken mail system that can handle only -one SMTP connection at a time (yes, such systems exist and people -used to pay real money for them). +
    + +
    + +The optional transport table overrides +the default message delivery method (this table is used by the +address rewriting and resolving daemon). + +The transport table can be used to send mail to specific sites via +UUCP, or to send mail to a really broken mail system that +can handle only one SMTP connection at a time (yes, such systems +exist and people used to pay real money for them).

    @@ -383,6 +392,28 @@ commas. For example:

  • +

    Relocated users table

    + +Next, the address rewriting and resolving daemon runs each recipient +name through the
    relocated database. +This table provides information on how to reach users that no longer +have an account, or what to do with mail for entire domains that +no longer exist. When mail is sent to an address that is listed +in this table, the message is bounced with an informative message. + +

    + +Lookups of relocated users are disabled by default. To enable, edit +the relocated_maps parameter in the main.cf +file and specify one or more lookup tables, separated by whitespace +or commas. For example: + +

    + +
    relocated_maps = hash:/etc/postfix/relocated + +
    +

    Alias database

    When mail is to be delivered locally, the
    local diff --git a/postfix/html/sendmail.1.html b/postfix/html/sendmail.1.html index 1eb206f72..ba691f1eb 100644 --- a/postfix/html/sendmail.1.html +++ b/postfix/html/sendmail.1.html @@ -62,7 +62,7 @@ SENDMAIL(1) SENDMAIL(1) -Ac (ignored) Postfix sendmail uses the same configuration file regardless of whether or not a message is an ini- - tial sumbission. + tial submission. -B body_type The message body MIME type: 7BIT or 8BITMIME. diff --git a/postfix/html/transport.5.html b/postfix/html/transport.5.html index 1a8b4c093..613240673 100644 --- a/postfix/html/transport.5.html +++ b/postfix/html/transport.5.html @@ -217,11 +217,11 @@ TRANSPORT(5) TRANSPORT(5) virtual_transport The default mail delivery transport when the desti- - nation matches virtual_mailbox_domains. + nation matches $virtual_mailbox_domains. relay_transport The default mail delivery transport when the desti- - nation matches relay_domains. + nation matches $relay_domains. default_transport The default mail delivery transport when the desti- @@ -234,8 +234,8 @@ TRANSPORT(5) TRANSPORT(5) relayhost The default host for destinations that do not match - $mydestination, $inet_interfaces, vir- - tual_alias_domains or virtual_mailbox_domains. + $mydestination, $inet_interfaces, $vir- + tual_alias_domains or $virtual_mailbox_domains. SEE ALSO postmap(1) create mapping table diff --git a/postfix/html/virtual.5.html b/postfix/html/virtual.5.html index 3c2df2719..fd7fe1b66 100644 --- a/postfix/html/virtual.5.html +++ b/postfix/html/virtual.5.html @@ -25,6 +25,10 @@ VIRTUAL(5) VIRTUAL(5) o To simulate virtual domains where all virtual addresses are aliased to non-virtual addresses. + Simulated virtual domains are not to be confused + with the true virtual domains that are implemented + with the Postfix virtual(8) mail delivery agent. + Virtual aliasing is applied only to recipient envelope addresses, and does not affect message headers. Think Sendmail rule set S0, if you like. Use canonical(5) map- diff --git a/postfix/man/man1/sendmail.1 b/postfix/man/man1/sendmail.1 index 94dffaf4e..44a714b47 100644 --- a/postfix/man/man1/sendmail.1 +++ b/postfix/man/man1/sendmail.1 @@ -58,7 +58,7 @@ The following options are recognized: .IP "\fB-Am\fR (ignored)" .IP "\fB-Ac\fR (ignored)" Postfix sendmail uses the same configuration file regardless of -whether or not a message is an initial sumbission. +whether or not a message is an initial submission. .IP "\fB-B \fIbody_type\fR" The message body MIME type: \fB7BIT\fR or \fB8BITMIME\fR. .IP "\fB-C \fIconfig_file\fR (ignored :-)" diff --git a/postfix/man/man5/transport.5 b/postfix/man/man5/transport.5 index dc4ce468d..24e9487c3 100644 --- a/postfix/man/man5/transport.5 +++ b/postfix/man/man5/transport.5 @@ -223,10 +223,10 @@ The default mail delivery transport when the destination matches \fB$mydestination\fR or \fB$inet_interfaces\fR. .IP \fBvirtual_transport\fR The default mail delivery transport when the destination matches -\fBvirtual_mailbox_domains\fR. +\fB$virtual_mailbox_domains\fR. .IP \fBrelay_transport\fR The default mail delivery transport when the destination matches -\fBrelay_domains\fR. +\fB$relay_domains\fR. .IP \fBdefault_transport\fR The default mail delivery transport when the destination does not match a local, virtual or relay destination. @@ -236,7 +236,7 @@ by default. .IP \fBrelayhost\fR The default host for destinations that do not match \fB$mydestination\fR, \fB$inet_interfaces\fR, -\fBvirtual_alias_domains\fR or \fBvirtual_mailbox_domains\fR. +\fB$virtual_alias_domains\fR or \fB$virtual_mailbox_domains\fR. .SH SEE ALSO .na .nf diff --git a/postfix/man/man5/virtual.5 b/postfix/man/man5/virtual.5 index a51e79426..98d61140b 100644 --- a/postfix/man/man5/virtual.5 +++ b/postfix/man/man5/virtual.5 @@ -26,6 +26,10 @@ To redirect mail from one address to one or more other addresses. .IP \(bu To simulate virtual domains where all virtual addresses are aliased to non-virtual addresses. +.sp +Simulated virtual domains are not to be confused with the true virtual +domains that are implemented with the Postfix \fBvirtual\fR(8) mail +delivery agent. .PP Virtual aliasing is applied only to recipient envelope addresses, and does not affect message headers. diff --git a/postfix/proto/transport b/postfix/proto/transport index 24de9edae..0ebd73bbf 100644 --- a/postfix/proto/transport +++ b/postfix/proto/transport @@ -207,10 +207,10 @@ # \fB$mydestination\fR or \fB$inet_interfaces\fR. # .IP \fBvirtual_transport\fR # The default mail delivery transport when the destination matches -# \fBvirtual_mailbox_domains\fR. +# \fB$virtual_mailbox_domains\fR. # .IP \fBrelay_transport\fR # The default mail delivery transport when the destination matches -# \fBrelay_domains\fR. +# \fB$relay_domains\fR. # .IP \fBdefault_transport\fR # The default mail delivery transport when the destination does not # match a local, virtual or relay destination. @@ -220,7 +220,7 @@ # .IP \fBrelayhost\fR # The default host for destinations that do not match # \fB$mydestination\fR, \fB$inet_interfaces\fR, -# \fBvirtual_alias_domains\fR or \fBvirtual_mailbox_domains\fR. +# \fB$virtual_alias_domains\fR or \fB$virtual_mailbox_domains\fR. # SEE ALSO # postmap(1) create mapping table # trivial-rewrite(8) rewrite and resolve addresses diff --git a/postfix/proto/virtual b/postfix/proto/virtual index bfbd13103..0b5eaf374 100644 --- a/postfix/proto/virtual +++ b/postfix/proto/virtual @@ -20,6 +20,10 @@ # .IP \(bu # To simulate virtual domains where all virtual addresses are aliased # to non-virtual addresses. +# .sp +# Simulated virtual domains are not to be confused with the true virtual +# domains that are implemented with the Postfix \fBvirtual\fR(8) mail +# delivery agent. # .PP # Virtual aliasing is applied only to recipient # envelope addresses, and does not affect message headers. diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h index 178d82a0d..e9f43b83a 100644 --- a/postfix/src/global/mail_params.h +++ b/postfix/src/global/mail_params.h @@ -509,11 +509,11 @@ extern int var_delay_warn_time; * Queue manager: various in-core message and recipient limits. */ #define VAR_QMGR_ACT_LIMIT "qmgr_message_active_limit" -#define DEF_QMGR_ACT_LIMIT 10000 +#define DEF_QMGR_ACT_LIMIT 20000 extern int var_qmgr_active_limit; #define VAR_QMGR_RCPT_LIMIT "qmgr_message_recipient_limit" -#define DEF_QMGR_RCPT_LIMIT 10000 +#define DEF_QMGR_RCPT_LIMIT 20000 extern int var_qmgr_rcpt_limit; #define VAR_QMGR_MSG_RCPT_LIMIT "qmgr_message_recipient_minimum" @@ -611,7 +611,7 @@ extern int var_qmgr_clog_warn_time; * Master: default process count limit per mail subsystem. */ #define VAR_PROC_LIMIT "default_process_limit" -#define DEF_PROC_LIMIT 50 +#define DEF_PROC_LIMIT 100 extern int var_proc_limit; /* diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 7af1eb35c..e9cd06f5c 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * 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 "20021209" +#define MAIL_RELEASE_DATE "20021212" #define VAR_MAIL_VERSION "mail_version" #define DEF_MAIL_VERSION "1.1.12-" MAIL_RELEASE_DATE diff --git a/postfix/src/sendmail/sendmail.c b/postfix/src/sendmail/sendmail.c index e3a67d974..f2fa7218d 100644 --- a/postfix/src/sendmail/sendmail.c +++ b/postfix/src/sendmail/sendmail.c @@ -52,7 +52,7 @@ /* .IP "\fB-Am\fR (ignored)" /* .IP "\fB-Ac\fR (ignored)" /* Postfix sendmail uses the same configuration file regardless of -/* whether or not a message is an initial sumbission. +/* whether or not a message is an initial submission. /* .IP "\fB-B \fIbody_type\fR" /* The message body MIME type: \fB7BIT\fR or \fB8BITMIME\fR. /* .IP "\fB-C \fIconfig_file\fR (ignored :-)" diff --git a/postfix/src/smtpd/smtpd.c b/postfix/src/smtpd/smtpd.c index d11151466..e08a2f3d3 100644 --- a/postfix/src/smtpd/smtpd.c +++ b/postfix/src/smtpd/smtpd.c @@ -397,7 +397,6 @@ char *var_canonical_maps; char *var_rcpt_canon_maps; char *var_virt_alias_maps; char *var_virt_mailbox_maps; -char *var_virt_mailbox_doms; char *var_alias_maps; char *var_local_rcpt_maps; bool var_allow_untrust_route; @@ -1655,7 +1654,6 @@ int main(int argc, char **argv) VAR_RCPT_CANON_MAPS, DEF_RCPT_CANON_MAPS, &var_rcpt_canon_maps, 0, 0, VAR_VIRT_ALIAS_MAPS, DEF_VIRT_ALIAS_MAPS, &var_virt_alias_maps, 0, 0, VAR_VIRT_MAILBOX_MAPS, DEF_VIRT_MAILBOX_MAPS, &var_virt_mailbox_maps, 0, 0, - VAR_VIRT_MAILBOX_DOMS, DEF_VIRT_MAILBOX_DOMS, &var_virt_mailbox_doms, 0, 0, VAR_ALIAS_MAPS, DEF_ALIAS_MAPS, &var_alias_maps, 0, 0, VAR_LOCAL_RCPT_MAPS, DEF_LOCAL_RCPT_MAPS, &var_local_rcpt_maps, 0, 0, VAR_SMTPD_SASL_OPTS, DEF_SMTPD_SASL_OPTS, &var_smtpd_sasl_opts, 0, 0, diff --git a/postfix/src/smtpd/smtpd_check.c b/postfix/src/smtpd/smtpd_check.c index 6f126746f..346eb70e4 100644 --- a/postfix/src/smtpd/smtpd_check.c +++ b/postfix/src/smtpd/smtpd_check.c @@ -3175,7 +3175,8 @@ char *smtpd_check_rcptmap(SMTPD_STATE *state, char *recipient) #endif && NOMATCH(local_rcpt_maps, CONST_STR(reply->recipient))) { (void) smtpd_check_reject(state, MAIL_ERROR_BOUNCE, - "%d <%s>: User unknown", 550, recipient); + "%d <%s>: User unknown in local recipient table", + 550, recipient); SMTPD_CHECK_RCPT_RETURN(STR(error_text)); } @@ -3188,7 +3189,8 @@ char *smtpd_check_rcptmap(SMTPD_STATE *state, char *recipient) #endif && NOMATCHV8(virt_mailbox_maps, CONST_STR(reply->recipient))) { (void) smtpd_check_reject(state, MAIL_ERROR_BOUNCE, - "%d <%s>: User unknown", 550, recipient); + "%d <%s>: User unknown in virtual mailbox table", + 550, recipient); SMTPD_CHECK_RCPT_RETURN(STR(error_text)); } @@ -3202,7 +3204,8 @@ char *smtpd_check_rcptmap(SMTPD_STATE *state, char *recipient) #endif && NOMATCH(relay_rcpt_maps, CONST_STR(reply->recipient))) { (void) smtpd_check_reject(state, MAIL_ERROR_BOUNCE, - "%d <%s>: User unknown", 550, recipient); + "%d <%s>: User unknown in relay recipient table", + 550, recipient); SMTPD_CHECK_RCPT_RETURN(STR(error_text)); } @@ -3375,6 +3378,9 @@ typedef struct { char **target; } STRING_TABLE; +#undef DEF_LOCAL_RCPT_MAPS +#define DEF_LOCAL_RCPT_MAPS "" + #undef DEF_VIRT_ALIAS_MAPS #define DEF_VIRT_ALIAS_MAPS "" @@ -3781,7 +3787,7 @@ int main(int argc, char **argv) } if (strcasecmp(args->argv[0], "relay_recipient_maps") == 0) { UPDATE_STRING(var_relay_rcpt_maps, args->argv[1]); - UPDATE_MAPS(relay_rcpt_maps, VAR_LOCAL_RCPT_MAPS, + UPDATE_MAPS(relay_rcpt_maps, VAR_RELAY_RCPT_MAPS, var_relay_rcpt_maps, DICT_FLAG_LOCK); resp = 0; break; diff --git a/postfix/src/smtpd/smtpd_check.in b/postfix/src/smtpd/smtpd_check.in index 256b22853..1e0b2969a 100644 --- a/postfix/src/smtpd/smtpd_check.in +++ b/postfix/src/smtpd/smtpd_check.in @@ -6,7 +6,7 @@ smtpd_delay_reject 0 mynetworks 127.0.0.0/8,168.100.189.0/28 relay_domains porcupine.org -maps_rbl_domains blackholes.mail-abuse.org +maps_rbl_domains socks.relays.osirusoft.com # # Test the client restrictions. # diff --git a/postfix/src/smtpd/smtpd_check.in2 b/postfix/src/smtpd/smtpd_check.in2 index 2b9000267..886ffb9ef 100644 --- a/postfix/src/smtpd/smtpd_check.in2 +++ b/postfix/src/smtpd/smtpd_check.in2 @@ -6,7 +6,7 @@ smtpd_delay_reject 0 mynetworks 127.0.0.0/8,168.100.189.0/28 relay_domains porcupine.org -maps_rbl_domains blackholes.mail-abuse.org +maps_rbl_domains socks.relays.osirusoft.com # # Test the client restrictions. # diff --git a/postfix/src/smtpd/smtpd_check.ref b/postfix/src/smtpd/smtpd_check.ref index 451790f7d..6d77f6417 100644 --- a/postfix/src/smtpd/smtpd_check.ref +++ b/postfix/src/smtpd/smtpd_check.ref @@ -9,7 +9,7 @@ OK OK >>> relay_domains porcupine.org OK ->>> maps_rbl_domains blackholes.mail-abuse.org +>>> maps_rbl_domains socks.relays.osirusoft.com OK >>> # >>> # Test the client restrictions. @@ -186,8 +186,8 @@ OK ./smtpd_check: warning: restriction reject_maps_rbl is going away. Please use reject_rbl_client instead OK >>> client foo 127.0.0.2 -./smtpd_check: : reject: CONNECT from foo[127.0.0.2]: 554 Service unavailable; Client host [127.0.0.2] blocked using blackholes.mail-abuse.org; Blackholed - see ; from= proto=SMTP helo=<123.123.123.123> -554 Service unavailable; Client host [127.0.0.2] blocked using blackholes.mail-abuse.org; Blackholed - see +./smtpd_check: : reject: CONNECT from foo[127.0.0.2]: 554 Service unavailable; Client host [127.0.0.2] blocked using socks.relays.osirusoft.com; Proxy List Test; from= proto=SMTP helo=<123.123.123.123> +554 Service unavailable; Client host [127.0.0.2] blocked using socks.relays.osirusoft.com; Proxy List Test >>> # >>> # Hybrids >>> # diff --git a/postfix/src/smtpd/smtpd_check.ref2 b/postfix/src/smtpd/smtpd_check.ref2 index e8b92345e..26d31fe84 100644 --- a/postfix/src/smtpd/smtpd_check.ref2 +++ b/postfix/src/smtpd/smtpd_check.ref2 @@ -9,7 +9,7 @@ OK OK >>> relay_domains porcupine.org OK ->>> maps_rbl_domains blackholes.mail-abuse.org +>>> maps_rbl_domains socks.relays.osirusoft.com OK >>> # >>> # Test the client restrictions. @@ -176,8 +176,8 @@ OK ./smtpd_check: warning: restriction reject_maps_rbl is going away. Please use reject_rbl_client instead OK >>> client foo 127.0.0.2 -./smtpd_check: : reject: CONNECT from foo[127.0.0.2]: 554 Service unavailable; Client host [127.0.0.2] blocked using blackholes.mail-abuse.org; Blackholed - see ; from= proto=SMTP helo= -554 Service unavailable; Client host [127.0.0.2] blocked using blackholes.mail-abuse.org; Blackholed - see +./smtpd_check: : reject: CONNECT from foo[127.0.0.2]: 554 Service unavailable; Client host [127.0.0.2] blocked using socks.relays.osirusoft.com; Proxy List Test; from= proto=SMTP helo= +554 Service unavailable; Client host [127.0.0.2] blocked using socks.relays.osirusoft.com; Proxy List Test >>> # >>> # unknown sender/recipient domain >>> # diff --git a/postfix/src/smtpd/smtpd_exp.in b/postfix/src/smtpd/smtpd_exp.in index 6045757fe..b1f7135be 100644 --- a/postfix/src/smtpd/smtpd_exp.in +++ b/postfix/src/smtpd/smtpd_exp.in @@ -6,7 +6,7 @@ smtpd_delay_reject 0 mynetworks 127.0.0.0/8,168.100.189.0/28 relay_domains porcupine.org -maps_rbl_domains blackholes.mail-abuse.org +maps_rbl_domains socks.relays.osirusoft.com rbl_reply_maps hash:smtpd_check_access helo foobar # @@ -19,7 +19,7 @@ rcpt rname@rdomain client foo 127.0.0.2 rcpt rname@rdomain # -recipient_restrictions reject_rbl_client,blackholes.mail-abuse.org +recipient_restrictions reject_rbl_client,socks.relays.osirusoft.com client spike.porcupine.org 168.100.189.2 rcpt rname@rdomain client foo 127.0.0.2 diff --git a/postfix/src/smtpd/smtpd_exp.ref b/postfix/src/smtpd/smtpd_exp.ref index ea9e9a2f3..b6de0d9da 100644 --- a/postfix/src/smtpd/smtpd_exp.ref +++ b/postfix/src/smtpd/smtpd_exp.ref @@ -9,7 +9,7 @@ OK OK >>> relay_domains porcupine.org OK ->>> maps_rbl_domains blackholes.mail-abuse.org +>>> maps_rbl_domains socks.relays.osirusoft.com OK >>> rbl_reply_maps hash:smtpd_check_access OK @@ -30,10 +30,10 @@ OK >>> client foo 127.0.0.2 OK >>> rcpt rname@rdomain -./smtpd_check: : reject: RCPT from foo[127.0.0.2]: 554 client=foo[127.0.0.2] client_address=127.0.0.2 client_name=foo helo_name=foobar sender=sname@sdomain sender_name=sname sender_domain=sdomain recipient=rname@rdomain recipient_name=rname recipient_domain=rdomain rbl_code=554 rbl_domain=blackholes.mail-abuse.org rbl_txt=Blackholed - see rbl_what=127.0.0.2 rbl_class=Client host; from= to= proto=SMTP helo= -554 client=foo[127.0.0.2] client_address=127.0.0.2 client_name=foo helo_name=foobar sender=sname@sdomain sender_name=sname sender_domain=sdomain recipient=rname@rdomain recipient_name=rname recipient_domain=rdomain rbl_code=554 rbl_domain=blackholes.mail-abuse.org rbl_txt=Blackholed - see rbl_what=127.0.0.2 rbl_class=Client host +./smtpd_check: : reject: RCPT from foo[127.0.0.2]: 554 Service unavailable; Client host [127.0.0.2] blocked using socks.relays.osirusoft.com; Proxy List Test; from= to= proto=SMTP helo= +554 Service unavailable; Client host [127.0.0.2] blocked using socks.relays.osirusoft.com; Proxy List Test >>> # ->>> recipient_restrictions reject_rbl_client,blackholes.mail-abuse.org +>>> recipient_restrictions reject_rbl_client,socks.relays.osirusoft.com OK >>> client spike.porcupine.org 168.100.189.2 OK @@ -42,8 +42,8 @@ OK >>> client foo 127.0.0.2 OK >>> rcpt rname@rdomain -./smtpd_check: : reject: RCPT from foo[127.0.0.2]: 554 client=foo[127.0.0.2] client_address=127.0.0.2 client_name=foo helo_name=foobar sender=sname@sdomain sender_name=sname sender_domain=sdomain recipient=rname@rdomain recipient_name=rname recipient_domain=rdomain rbl_code=554 rbl_domain=blackholes.mail-abuse.org rbl_txt=Blackholed - see rbl_what=127.0.0.2 rbl_class=Client host; from= to= proto=SMTP helo= -554 client=foo[127.0.0.2] client_address=127.0.0.2 client_name=foo helo_name=foobar sender=sname@sdomain sender_name=sname sender_domain=sdomain recipient=rname@rdomain recipient_name=rname recipient_domain=rdomain rbl_code=554 rbl_domain=blackholes.mail-abuse.org rbl_txt=Blackholed - see rbl_what=127.0.0.2 rbl_class=Client host +./smtpd_check: : reject: RCPT from foo[127.0.0.2]: 554 Service unavailable; Client host [127.0.0.2] blocked using socks.relays.osirusoft.com; Proxy List Test; from= to= proto=SMTP helo= +554 Service unavailable; Client host [127.0.0.2] blocked using socks.relays.osirusoft.com; Proxy List Test >>> # >>> # RHSBL sender domain name >>> # diff --git a/postfix/src/trivial-rewrite/resolve.c b/postfix/src/trivial-rewrite/resolve.c index 8b11cf78d..11872996d 100644 --- a/postfix/src/trivial-rewrite/resolve.c +++ b/postfix/src/trivial-rewrite/resolve.c @@ -247,7 +247,7 @@ void resolve_addr(char *addr, VSTRING *channel, VSTRING *nexthop, msg_warn("do not list domain %s in BOTH %s and %s", STR(nexthop), VAR_VIRT_ALIAS_DOMS, VAR_VIRT_MAILBOX_DOMS); vstring_strcpy(channel, var_error_transport); - vstring_strcpy(nexthop, "User unknown"); + vstring_strcpy(nexthop, "User unknown in virtual alias table"); blame = VAR_ERROR_TRANSPORT; *flags |= RESOLVE_CLASS_ALIAS; } else if (dict_errno != 0) { @@ -326,17 +326,26 @@ void resolve_addr(char *addr, VSTRING *channel, VSTRING *nexthop, } /* - * Bounce recipients that have moved. We do it here instead of in the - * local delivery agent. The benefit is that we can bounce mail for - * virtual addresses, not just local addresses only, and that there is no - * need to run a local delivery agent just for the sake of relocation - * notices. The downside is that this table has no effect on local alias - * expansion results, so that mail will have to make almost an entire - * iteration through the mail system. + * The transport map overrides any transport and next-hop host info that + * is set up above. + */ + if ((*flags & RESOLVE_FLAG_FAIL) == 0 && *var_transport_maps) { + if (transport_lookup(STR(nextrcpt), channel, nexthop) == 0 + && dict_errno != 0) { + msg_warn("%s lookup failure", VAR_TRANSPORT_MAPS); + *flags |= RESOLVE_FLAG_FAIL; + } + } + + /* + * Bounce recipients that have moved, regardless of domain address class. + * The downside of doing this here is that this table has no effect on + * local alias expansion results. Such mail will have to make almost an + * entire iteration through the mail system. */ #define IGNORE_ADDR_EXTENSION ((char **) 0) - if ((*flags & RESOLVE_FLAG_FAIL) == 0 && relocated_maps != 0) { + if ((*flags & RESOLVE_FLAG_FAIL) == 0 && *var_relocated_maps != 0) { const char *newloc; if ((newloc = mail_addr_find(relocated_maps, STR(nextrcpt), @@ -349,22 +358,6 @@ void resolve_addr(char *addr, VSTRING *channel, VSTRING *nexthop, } } - /* - * The transport map overrides any transport and next-hop host info that - * is set up above. - * - * XXX Don't override the error transport :-( - */ - if ((*flags & RESOLVE_FLAG_FAIL) == 0 - && *var_transport_maps - && strcmp(STR(channel), var_error_transport) != 0) { - if (transport_lookup(STR(nextrcpt), channel, nexthop) == 0 - && dict_errno != 0) { - msg_warn("%s lookup failure", VAR_TRANSPORT_MAPS); - *flags |= RESOLVE_FLAG_FAIL; - } - } - /* * Clean up. */ diff --git a/postfix/src/trivial-rewrite/transport.c b/postfix/src/trivial-rewrite/transport.c index 77e1129b0..e67d9818c 100644 --- a/postfix/src/trivial-rewrite/transport.c +++ b/postfix/src/trivial-rewrite/transport.c @@ -90,7 +90,8 @@ void transport_init(void) /* find_transport_entry - look up and parse transport table entry */ static int find_transport_entry(const char *key, int flags, - VSTRING *channel, VSTRING *nexthop) + VSTRING *channel, VSTRING *nexthop, + const char *def_nexthop) { char *saved_value; const char *host; @@ -131,7 +132,8 @@ static int find_transport_entry(const char *key, int flags, } else #endif vstring_strcpy(nexthop, host); - } + } else if (def_nexthop != 0) + vstring_strcpy(nexthop, def_nexthop); if (*saved_value != 0) vstring_strcpy(channel, saved_value); myfree(saved_value); @@ -150,7 +152,7 @@ void transport_wildcard_init(void) #define FULL 0 #define PARTIAL DICT_FLAG_FIXED - if (find_transport_entry(WILDCARD, FULL, channel, nexthop)) { + if (find_transport_entry(WILDCARD, FULL, channel, nexthop, (char *) 0)) { wildcard_channel = channel; wildcard_nexthop = nexthop; if (msg_verbose) @@ -172,6 +174,7 @@ int transport_lookup(const char *addr, VSTRING *channel, VSTRING *nexthop) const char *name; const char *next; int found; + const char *def_nexthop = 0; #define STREQ(x,y) (strcmp((x), (y)) == 0) #define DISCARD_EXTENSION ((char **) 0) @@ -190,7 +193,7 @@ int transport_lookup(const char *addr, VSTRING *channel, VSTRING *nexthop) * string. Specify the FULL flag to include regexp maps in the query. */ if (STREQ(full_addr, var_xport_null_key)) { - if (find_transport_entry(full_addr, FULL, channel, nexthop)) + if (find_transport_entry(full_addr, FULL, channel, nexthop, def_nexthop)) RETURN_FREE(FOUND); RETURN_FREE(NOTFOUND); } @@ -199,10 +202,12 @@ int transport_lookup(const char *addr, VSTRING *channel, VSTRING *nexthop) * Look up the full address with the FULL flag to include regexp maps in * the query. */ - if ((ratsign = strrchr(full_addr, '@')) == 0) + if ((ratsign = strrchr(full_addr, '@')) == 0 || ratsign[1] == 0) msg_panic("transport_lookup: bad address: \"%s\"", full_addr); - if (find_transport_entry(full_addr, FULL, channel, nexthop)) + def_nexthop = ratsign + 1; + + if (find_transport_entry(full_addr, FULL, channel, nexthop, def_nexthop)) RETURN_FREE(FOUND); /* @@ -212,7 +217,8 @@ int transport_lookup(const char *addr, VSTRING *channel, VSTRING *nexthop) */ if ((stripped_addr = strip_addr(full_addr, DISCARD_EXTENSION, *var_rcpt_delim)) != 0) { - if (find_transport_entry(stripped_addr, PARTIAL, channel, nexthop)) { + if (find_transport_entry(stripped_addr, PARTIAL, channel, nexthop, + def_nexthop)) { myfree(stripped_addr); RETURN_FREE(FOUND); } else { @@ -237,7 +243,7 @@ int transport_lookup(const char *addr, VSTRING *channel, VSTRING *nexthop) * with regular expressions. */ for (found = 0, name = ratsign + 1; /* void */ ; name = next) { - if (find_transport_entry(name, PARTIAL, channel, nexthop)) + if (find_transport_entry(name, PARTIAL, channel, nexthop, def_nexthop)) RETURN_FREE(FOUND); if ((next = strchr(name + 1, '.')) == 0) break;