From 1eed3b4cde6522216830302e13a69c1b0e5a1f62 Mon Sep 17 00:00:00 2001 From: Wietse Venema Date: Sat, 4 Jan 2003 00:00:00 -0500 Subject: [PATCH] postfix-2.0.0-20030104 --- postfix/HISTORY | 26 ++- postfix/RELEASE_NOTES | 31 +++ postfix/conf/main.cf | 10 +- postfix/conf/sample-local.cf | 4 + postfix/conf/sample-misc.cf | 2 +- postfix/conf/sample-smtpd.cf | 59 ++++++ postfix/html/faq.html | 41 ++-- postfix/html/postconf.1.html | 2 +- postfix/html/proxymap.8.html | 80 +++++--- postfix/html/trivial-rewrite.8.html | 94 ++++----- postfix/man/man8/proxymap.8 | 61 +++--- postfix/man/man8/trivial-rewrite.8 | 21 +- postfix/mantools/postlink | 2 +- postfix/src/global/clnt_stream.c | 16 +- postfix/src/global/dict_proxy.c | 67 ++++--- postfix/src/global/dict_proxy.h | 9 +- postfix/src/global/mail_params.h | 6 +- postfix/src/global/mail_version.h | 2 +- postfix/src/global/resolve_clnt.c | 22 +-- postfix/src/global/rewrite_clnt.c | 17 +- postfix/src/global/verify_clnt.c | 43 ++-- postfix/src/global/virtual8_maps.c | 6 +- postfix/src/global/virtual8_maps.h | 3 +- postfix/src/local/local.c | 4 +- postfix/src/proxymap/proxymap.c | 187 +++++++++++------- postfix/src/trivial-rewrite/trivial-rewrite.c | 19 +- postfix/src/util/dict.h | 3 +- postfix/src/util/dict_open.c | 5 + postfix/src/util/vstream.c | 7 +- postfix/src/virtual/virtual.c | 6 +- 30 files changed, 529 insertions(+), 326 deletions(-) diff --git a/postfix/HISTORY b/postfix/HISTORY index 9f25df299..581117f68 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -7630,11 +7630,8 @@ Apologies for any names omitted. 20030102 - Workaround: use different client instances when the same - map is opened with different flags. This silences warnings - from maps_append() when the same map is opened by - virtual_alias_maps and by virtual_mailbox_maps. File: - global/maps.c. + Cleanup: use different client instances when the same map + is opened with different flags. File: global/maps.c. Feature: proxymap server for Postfix table lookups. This helps to consolidate the number of open lookup tables (such @@ -7649,6 +7646,25 @@ Apologies for any names omitted. after the limit is reached. Based on a patch by Victor Duchovni, Morgan Stanley. File: master/multi_server.c. +20030103 + + Cleanup: client stream endpoints not only have an idle time + limit ($ipc_idle) before a connection is closed, they now + also have a time to live ($ipc_ttl) to prevent connections + from becoming too persistent. This allows multi-servers + such as trivial-rewrite or the proxymap server to refresh + more frequently on busy systems. File: global/clnt_stream.c. + +20030104 + + Cleanup: avoid warnings about flag mismatches when the same + lookup table is listed under both virtual_alias_maps and + virtual_mailbox_maps. Files: global/virtual8.h, virtual/virtual.c. + + Bugfix: an obscure memory leak that puzzled me for more + than a year until I found out how to reproduce it. File: + util/vstream.c. + Open problems: Med: do not postpone rejected "MAIL FROM" size information, diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 24526a461..68ae6f7a0 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -22,6 +22,37 @@ snapshot release). Patches change the patchlevel and the release date. Snapshots change only the release date, unless they include the same bugfixes as a patch release. +Incompatible changes with Postfix snapshot 2.0.0-20030104 +========================================================= + +This release adds the new proxymap service (table lookup via a +proxy process) to the the master.cf file. If you get warnings about +problems connecting to the proxymap service, then you did not +properly upgrade Postfix. + +Major changes with Postfix snapshot 2.0.0-20030104 +================================================== + +This release introduces the proxymap service for Postfix lookup +table access. This can be used to overcome chroot restrictions in +the Postfix SMTP server (specify proxy:unix:passwd.byname for +password file lookup through the proxymap server) and can be used +to consolidate the number of open tables by sharing one open table +among multiple processes (specify proxy:mysql:/file/name to avoid +"too many connections" conditions). The proxy_read_maps parameter +specifies what maps are approved for access via the proxy service +(only map references starting with "proxy:" are considered approved). + +Multi-server daemons (servers that accept simultaneous connections +from multiple clients) will now stop accepting new connections +after serving $max_use clients. This allows multi-server daemons +to automatically restart even on busy mail systems. + +Clients of multi-server daemons such as trivial-rewrite and the +new proxymap service now automatically disconnect after $ipc_ttl +seconds of activity (default: 1000s). This allows multi-server +daemons to automatically restart even on busy mail mail systems. + Incompatible changes with Postfix snapshot 1.1.11-trace-20021119 ================================================================ diff --git a/postfix/conf/main.cf b/postfix/conf/main.cf index c5ebc9987..f088bd1c9 100644 --- a/postfix/conf/main.cf +++ b/postfix/conf/main.cf @@ -175,18 +175,20 @@ mail_owner = postfix # For example, you define $mydestination domain recipients in # the $virtual_mailbox_maps files. # -# - You redefined the local delivery agent in master.cf. +# - You redefine the local delivery agent in master.cf. # -# - You redefined the "local_transport" setting in main.cf. +# - You redefine the "local_transport" setting in main.cf. # # - You use the "luser_relay", "mailbox_transport", or "fallback_transport" # feature of the Postfix local delivery agent (see sample-local.cf). # # Beware: if the Postfix SMTP server runs chrooted, you probably have -# to copy the passwd (not shadow) database into the jail, and perhaps -# other files. This is system dependent. +# to access the passwd file via the proxymap service, in order to +# overcome chroot restrictions. The alternative, having a copy of +# the system passwd file in the chroot jail is just not practical. # #local_recipient_maps = unix:passwd.byname $alias_maps +#local_recipient_maps = proxy:passwd.byname $alias_maps #local_recipient_maps = # The unknown_local_recipient_reject_code specifies the SMTP server diff --git a/postfix/conf/sample-local.cf b/postfix/conf/sample-local.cf index c901c0b24..e15bff232 100644 --- a/postfix/conf/sample-local.cf +++ b/postfix/conf/sample-local.cf @@ -11,6 +11,10 @@ # precedence, from highest to lowest priority: mailbox_transport, # mailbox_command_maps, mailbox_command, home_mailbox. +# +# MISCELLANEOUS PARAMETERS +# + # The biff parameter specifies whether or not to contact the biff # server. This server sends "new mail" notifications to users who # have requested new mail notification with "biff y". diff --git a/postfix/conf/sample-misc.cf b/postfix/conf/sample-misc.cf index 18792e312..2c83b8a34 100644 --- a/postfix/conf/sample-misc.cf +++ b/postfix/conf/sample-misc.cf @@ -236,7 +236,7 @@ max_use = 100 # a name matches a lookup key. Continue long lines by starting the # next line with whitespace. # -# See sample-local.cf for a description of the local_recipient_maps +# See sample-smtpd.cf for a description of the local_recipient_maps # and unknown_local_recipient_reject_code parameters. By default, # the SMTP server rejects mail for recipients not listed with the # local_recipient_maps parameter. diff --git a/postfix/conf/sample-smtpd.cf b/postfix/conf/sample-smtpd.cf index 4fd7c08cc..ac9b17bef 100644 --- a/postfix/conf/sample-smtpd.cf +++ b/postfix/conf/sample-smtpd.cf @@ -4,6 +4,65 @@ # This file contains example settings of Postfix configuration parameters # that control the SMTP server program. +# REJECTING MAIL FOR UNKNOWN LOCAL USERS +# +# The local_recipient_maps parameter specifies optional lookup tables +# 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. +# +# To turn off local recipient checking in the SMTP server, specify +# local_recipient_maps = (i.e. empty). +# +# The default setting assumes that you use the default Postfix local +# 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 redefine the local delivery agent in master.cf. +# +# - You redefine the "local_transport" setting in main.cf. +# +# - You use the "luser_relay", "mailbox_transport", or "fallback_transport" +# feature of the Postfix local delivery agent (see sample-local.cf). +# +# Beware: if the Postfix SMTP server runs chrooted, you probably have +# to access the passwd file via the proxymap service, in order to +# overcome chroot restrictions. The alternative, having a copy of +# the system passwd file in the chroot jail is just not practical. +# +#local_recipient_maps = +#local_recipient_maps = unix:passwd.byname $alias_maps +local_recipient_maps = proxy:passwd.byname $alias_maps + +# The unknown_local_recipient_reject_code specifies the SMTP server +# response code when a recipient domain matches $mydestination or +# $inet_interfaces, while $local_recipient_maps is non-empty and the +# recipient address or address local-part is not found. +# +# The default setting is 550 (reject mail) but it is safer to start +# with 450 (try again later) until you are certain that your +# local_recipient_maps settings are OK. +# +#unknown_local_recipient_reject_code = 450 +unknown_local_recipient_reject_code = 550 + +# REJECTING UNKNOWN RELAY USERS +# +# The relay_recipient_maps parameter specifies optional lookup tables +# with all addresses in the domains that match $relay_domains. +# +# If this parameter is defined, then the SMTP server will reject +# mail for unknown relay users. This feature is off by default. +# +#relay_recipient_maps = hash:/etc/postfix/relay_recipients + # # SENDER ANTI-SPOOFING # diff --git a/postfix/html/faq.html b/postfix/html/faq.html index 587d0e283..31ef4b176 100644 --- a/postfix/html/faq.html +++ b/postfix/html/faq.html @@ -674,7 +674,7 @@ to send mail only to user@domain.com. Specify what recipients exist (so that your queue does not fill up with undeliverable mail from spammers). - Specify local_recipient_maps = if maintaining recipient information is not practical. @@ -2090,7 +2090,7 @@ you use the default Postfix local delivery agent:
     /etc/postfix/main.cf:
-        local_recipient_maps = $alias_maps, unix:passwd.byname
+        local_recipient_maps = $alias_maps, proxy:unix:passwd.byname
 

@@ -2107,10 +2107,12 @@ To stop Postfix from rejecting local mail incorrectly: