From 6c23bcd020da2946ff5d4631abab736062dce6e2 Mon Sep 17 00:00:00 2001 From: Wietse Venema Date: Mon, 20 Dec 1999 00:00:00 -0500 Subject: [PATCH] snapshot-19991220 --- postfix/HISTORY | 9 ++ postfix/conf/main.cf | 79 +++++------------ postfix/conf/sample-local.cf | 7 +- postfix/conf/sample-smtpd.cf | 41 ++++++--- postfix/conf/sample-transport.cf | 16 ++-- postfix/conf/sample-virtual.cf | 2 +- postfix/conf/virtual | 6 +- postfix/global/mail_params.h | 4 +- postfix/global/mail_version.h | 2 +- postfix/html/faq.html | 116 ++++++++++++++++--------- postfix/html/qmgr.8.html | 90 +++++++++++++++++--- postfix/html/smtpd.8.html | 104 +++++++++++------------ postfix/html/uce.html | 140 ++++++++++++++++++++++--------- postfix/html/virtual.5.html | 54 ++++++------ postfix/man/man5/virtual.5 | 6 +- postfix/man/man8/qmgr.8 | 13 +++ postfix/man/man8/smtpd.8 | 4 + postfix/smtpd/smtpd_check.c | 44 +++++++--- 18 files changed, 462 insertions(+), 275 deletions(-) diff --git a/postfix/HISTORY b/postfix/HISTORY index ab839d5dc..53f5976ad 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -3427,3 +3427,12 @@ Apologies for any names omitted. Cleanup: INSTALL.sh uses a configurable directory for scratch files, so that it can install from a file system that is not writable by the super-user. + +19991220 + + Cleanup: it is no longer necessary to list $virtual_maps + as part of the relay_domains definition. The SMTP server + now by default accepts mail for domains that match + $mydestination or $virtual_maps, or that resolve to a mail + delivery transport that is listed in $local_transport. + Files: smtpd/smtpd_check.c and lots of documentation. diff --git a/postfix/conf/main.cf b/postfix/conf/main.cf index 915380aa6..bd414eaa1 100644 --- a/postfix/conf/main.cf +++ b/postfix/conf/main.cf @@ -14,12 +14,6 @@ # queue_directory = /var/spool/postfix -# The program_directory parameter specifies the default location of -# Postfix support programs and daemons. This setting can be overruled -# with the command_directory and daemon_directory parameters. -# -program_directory = /some/where/postfix/bin - # The command_directory parameter specifies the location of all # postXXX commands. The default value is $program_directory. # @@ -90,7 +84,9 @@ mail_owner = postfix #inet_interfaces = $myhostname, localhost # The mydestination parameter specifies the list of domains that this -# machine considers itself the final destination for. +# machine considers itself the final destination for. That does not +# include domains that are hosted on this machine. Those domains are +# specified elsewhere (see sample-virtual.cf, and sample-transport.cf). # # The default is $myhostname + localhost.$mydomain. On a mail domain # gateway, you should also include $mydomain. Do not specify the @@ -131,34 +127,6 @@ mail_owner = postfix # #local_recipient_maps = $alias_maps unix:passwd.byname -# INTERNET VERSUS INTRANET -# -# The relayhost parameter specifies the default host to send mail to -# when no entry is matched in the optional transport(5) table. When -# no relayhost is given, mail is routed directly to the destination. -# -# On an intranet, specify the organizational domain name. If your -# internal DNS uses no MX records, specify the name of the intranet -# gateway host instead. -# -# Specify a domain, host, host:port, [address] or [address:port]. -# Use the form [destination] to turn off MX lookups. See also the -# default_transport parameter if you're connected via UUCP. -# -#relayhost = $mydomain -#relayhost = gateway.my.domain -#relayhost = uucphost -#relayhost = [mail.$mydomain:9999] - -# DEFAULT TRANSPORT -# -# The default_transport parameter specifies the default message -# delivery transport to use when no transport is explicitly given in -# the optional transport(5) table. -# -#default_transport = smtp -#default_transport = uucp - # ADDRESS REWRITING # # Insert text from sample-rewrite.cf if you need to do address @@ -211,18 +179,6 @@ mail_owner = postfix #alias_database = hash:/etc/aliases #alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases -# DELIVERED-TO -# -# The prepend_delivered_header controls when Postfix should prepend -# a Delivered-To: message header. -# -# By default, Postfix prepends a Delivered-To: header when forwarding -# mail and when delivering to file (mailbox) or command. Turning off -# the Delivered-To: header when forwarding mail is not recommended. -# -# prepend_delivered_header = command, file, forward -# prepend_delivered_header = forward - # ADDRESS EXTENSIONS (e.g., user+foo) # # The recipient_delimiter parameter specifies the separator between @@ -256,10 +212,6 @@ mail_owner = postfix # the recipient with proper HOME, SHELL and LOGNAME environment settings. # Exception: delivery for root is done as $default_user. # -# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE WITH, E.G., PROCMAIL, -# YOU MUST SET UP AN ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL -# USER. -# # Other environment variables of interest: USER (recipient username), # EXTENSION (address extension), DOMAIN (domain part of address), # and LOCAL (the address localpart). @@ -271,6 +223,9 @@ mail_owner = postfix # Avoid shell meta characters because they will force Postfix to run # an expensive shell process. Procmail alone is expensive enough. # +# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN +# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER. +# #mailbox_command = /some/where/procmail #mailbox_command = /some/where/procmail -a "$EXTENSION" @@ -317,14 +272,20 @@ mail_owner = postfix #header_checks = regexp:/etc/postfix/filename #header_checks = pcre:/etc/postfix/filename -# 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. See the smtpd_recipient_restrictions -# restriction in the file sample-smtpd.cf. +# 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 +# file sample-smtpd.cf. # -# By default, Postfix relays mail only from clients or to destinations -# in or below $mydestination, or in the optional virtual domain list. +# By default, Postfix relays mail from clients whose IP address +# matches $mynetworks, and from clients or to destination domains +# matching $relay_domains or subdomains thereof. The default +# relay_domains value is $mydestination. +# +# By default, the Postfix SMTP server accepts mail for domains listed +# in $mydestination and in $virtual_maps, and for destinations that +# resolve to a mail delivery transport listed in $local_transports. +# These destinations do not need to be listed in $relay_domains. # # Specify a list of hosts or domains, /file/name patterns or type:name # lookup tables, separated by commas and/or whitespace. Continue @@ -336,7 +297,7 @@ mail_owner = postfix # list this system as their primary or backup MX host. See the # permit_mx_backup restriction in the file sample-smtpd.cf. # -#relay_domains = $mydestination, $virtual_maps +#relay_domains = $mydestination # The mynetworks parameter specifies the list of networks that are # local to this machine. The list is used by the anti-UCE software diff --git a/postfix/conf/sample-local.cf b/postfix/conf/sample-local.cf index cb783e6ac..3041f8214 100644 --- a/postfix/conf/sample-local.cf +++ b/postfix/conf/sample-local.cf @@ -100,10 +100,6 @@ home_mailbox = # command to use instead of mailbox delivery. The command is run # as the recipient with proper HOME, SHELL and LOGNAME environment settings. # Exception: delivery for root is done as $default_user. -# -# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE WITH, E.G., PROCMAIL, -# YOU MUST SET UP AN ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL -# USER. # # Other environment variables of interest: USER (recipient username), # EXTENSION (address extension), DOMAIN (domain part of address), @@ -116,6 +112,9 @@ home_mailbox = # Avoid shell meta characters because they will force Postfix to run # an expensive shell process. Procmail alone is expensive enough. # +# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN +# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER. +# # mailbox_command = /some/where/procmail # mailbox_command = /some/where/procmail -a "$EXTENSION" mailbox_command = diff --git a/postfix/conf/sample-smtpd.cf b/postfix/conf/sample-smtpd.cf index 1f5b13618..8a0613207 100644 --- a/postfix/conf/sample-smtpd.cf +++ b/postfix/conf/sample-smtpd.cf @@ -185,22 +185,30 @@ smtpd_sender_restrictions = # The smtpd_recipient_restrictions parameter specifies restrictions on # recipient addresses that SMTP clients can send in RCPT TO commands. # -# The default is to permit any destination from clients that match -# $mynetworks, and to otherwise permit only mail from clients or to -# destinations that match $relay_domains or a subdomain thereof. +# By default, Postfix relays mail from clients whose IP address +# matches $mynetworks, and from clients or to destination domains +# matching $relay_domains or subdomains thereof. The default +# relay_domains value is $mydestination. # -# The following restrictions are available: +# By default, the Postfix SMTP server accepts mail for domains listed +# in $mydestination and in $virtual_maps, and for destinations that +# resolve to a mail delivery transport listed in $local_transports. +# These destinations do not need to be listed in $relay_domains. +# +# The following restrictions are available (* is part of default setting): # -# permit_mynetworks: permit if the client address matches $mynetworks. +# *permit_mynetworks: permit if the client address matches $mynetworks. # reject_unknown_client: reject the request if the client hostname is unknown. # reject_maps_rbl: reject if the client is listed under $maps_rbl_domains. # reject_invalid_hostname: reject HELO hostname with bad syntax. # reject_unknown_hostname: reject HELO hostname without DNS A or MX record. # reject_unknown_sender_domain: reject sender domain without A or MX record. -# check_relay_domains: permit only mail from clients/to domains matching -# $relay_domains, or to the local machine. -# permit_auth_destination: permit mail to self or to $relay_domains. -# reject_unauth_destination: reject mail not to self or to $relay_domains. +# *check_relay_domains: permit only mail from clients/to domains matching +# $relay_domains, or to $mydestination, $virtual_maps or $local_transports +# permit_auth_destination: permit mail to domains matching $relay_domains, +# or to $mydestination, $virtual_maps or $local_transports. +# reject_unauth_destination: reject mail not to $relay_domains or to +# $mydestination, $virtual_maps or $local_transports. # reject_unauth_pipelining: reject mail from improperly pipelining spamware # permit_mx_backup: accept mail for sites that list me as MX host. # reject_unknown_recipient_domain: reject domains without A or MX record. @@ -246,9 +254,16 @@ maps_rbl_domains = rbl.maps.vix.com # and restricts what destination domains (and subdomains thereof) # this system will relay mail to. # -# By default, Postfix relays mail only from clients or to destinations -# in or below $mydestination, or in the optional virtual domain list. -# +# By default, Postfix relays mail from clients whose IP address +# matches $mynetworks, and from clients or to destination domains +# matching $relay_domains or subdomains thereof. The default +# relay_domains value is $mydestination. +# +# By default, the Postfix SMTP server accepts mail for domains listed +# in $mydestination and in $virtual_maps, and for destinations that +# resolve to a mail delivery transport listed in $local_transports. +# These destinations do not need to be listed in $relay_domains. +# # Specify a list of hosts or domains, /file/name patterns or type:name # lookup tables, separated by commas and/or whitespace. Continue # long lines by starting the next line with whitespace. A file name @@ -260,7 +275,7 @@ maps_rbl_domains = rbl.maps.vix.com # permit_mx_backup restriction, in the description of the # smtpd_recipient_restrictions parameter. # -relay_domains = $mydestination, $virtual_maps +relay_domains = $mydestination # # RESPONSE CODES diff --git a/postfix/conf/sample-transport.cf b/postfix/conf/sample-transport.cf index ce582d294..0b6e94a7e 100644 --- a/postfix/conf/sample-transport.cf +++ b/postfix/conf/sample-transport.cf @@ -4,6 +4,14 @@ # This file contains example settings of Postfix configuration # parameters that control the optional transport table lookups. +# The local_transports parameter defines the name of the default +# transport for local mail delivery, plus zero or more names of +# additional transports that are known to deliver locally. By default, +# the SMTP server's UCE restrictions permit mail for any destination +# that resolves to a mail delivery transport in $local_transports. +# +local_transports = local,cyrus + # The transport_maps parameter specifies optional tables with domain # to (transport, nexthop) mappings. See transport(5) for syntax details. # @@ -16,11 +24,3 @@ # transport_maps = hash:/etc/postfix/transport, nis:transport # transport_maps = hash:/etc/postfix/transport, netinfo:/transport transport_maps = - -# The local_transports parameter defines the name of the default -# transport for local mail delivery, plus zero or more names of -# additional transports that are known to deliver locally. The SMTP -# server's UCE restrictions use this list to decide if an address -# would be forwarded or not. -# -local_transports = local diff --git a/postfix/conf/sample-virtual.cf b/postfix/conf/sample-virtual.cf index 3bebaab00..d660d6b79 100644 --- a/postfix/conf/sample-virtual.cf +++ b/postfix/conf/sample-virtual.cf @@ -13,7 +13,7 @@ # If you use this feature, run "postmap /etc/postfix/virtual" to # build the necessary DBM or DB file after change. # -# It will take a minute or so before the change becomes visible. +# It may take a minute or so before the change becomes visible. # Use "postfix reload" to eliminate the delay. # # virtual_maps = dbm:/etc/postfix/virtual diff --git a/postfix/conf/virtual b/postfix/conf/virtual index 8d8405af0..ef2e34934 100644 --- a/postfix/conf/virtual +++ b/postfix/conf/virtual @@ -31,10 +31,8 @@ # .fi # .in -4 # -# With this, the SMTP server accepts mail for \fIvirtual.domain\fR -# (provided that the \fBrelay_domains\fR parameter includes -# $\fBvirtual_maps\fR), and mail for \fIunknown\fR@\fIvirtual.domain\fR -# is bounced as undeliverable. +# With this, the SMTP server accepts mail for \fIvirtual.domain\fR and +# rejects mail for \fIunknown\fR@\fIvirtual.domain\fR as undeliverable. # # The format of the virtual table is as follows, mappings being # tried in the order as listed in this manual page: diff --git a/postfix/global/mail_params.h b/postfix/global/mail_params.h index 608843944..7b8efaa6c 100644 --- a/postfix/global/mail_params.h +++ b/postfix/global/mail_params.h @@ -84,7 +84,7 @@ extern char *var_mydomain; * Transports that deliver locally. Order matters. */ #define VAR_LOCAL_TRANSP "local_transports" -#define DEF_LOCAL_TRANSP "local" +#define DEF_LOCAL_TRANSP "local,cyrus" extern char *var_local_transports; /* @@ -717,7 +717,7 @@ extern int var_trigger_timeout; extern char *var_mynetworks; #define VAR_RELAY_DOMAINS "relay_domains" -#define DEF_RELAY_DOMAINS "$mydestination, $virtual_maps" +#define DEF_RELAY_DOMAINS "$mydestination" extern char *var_relay_domains; #define VAR_CLIENT_CHECKS "smtpd_client_restrictions" diff --git a/postfix/global/mail_version.h b/postfix/global/mail_version.h index 3fdd077ec..2f1c01900 100644 --- a/postfix/global/mail_version.h +++ b/postfix/global/mail_version.h @@ -15,7 +15,7 @@ * Version of this program. */ #define VAR_MAIL_VERSION "mail_version" -#define DEF_MAIL_VERSION "Snapshot-19991219" +#define DEF_MAIL_VERSION "Snapshot-19991220" extern char *var_mail_version; /* LICENSE diff --git a/postfix/html/faq.html b/postfix/html/faq.html index 24ac8b12c..631126b35 100644 --- a/postfix/html/faq.html +++ b/postfix/html/faq.html @@ -52,6 +52,8 @@