diff --git a/postfix/HISTORY b/postfix/HISTORY
index 214b50711..29ce6f50f 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -16326,6 +16326,10 @@ Apologies for any names omitted.
stress-dependent. Files: global/mail_params.h,
proto/postconf.proto.
+ Compatibility: postscreen_discard_ehlo_keyword(s|maps)
+ support for compatibility with smtpd_discard_ehlo_keyword(s|maps).
+ Files: postscreen/postscreen_smtpd.c.
+
20110102
Feature: STARTTLS support for the postscreen(8) daemon.
@@ -16353,7 +16357,7 @@ Apologies for any names omitted.
20110104
Feature: add contact information to each SMTP server reject
- message. For example, "smtpd_reject_contact_information =
+ message. For example, "smtpd_reject_footer =
call 800-555-0101 for assistance", with macro expansion and
with multi-line support. Files: global/mail_params.h,
mantools/postlink, proto/postconf.proto, smtpd/smtpd.c,
@@ -16370,3 +16374,35 @@ Apologies for any names omitted.
Seen from outside, Postfix works just as if it has TLS
support built into in smtpd(8). Files: smtpd/smtpd.c,
tls/tls_proxy*.[hc], tlsproxy/tlsproxy.c, util/vstream.[hc].
+
+ Bugfix (introduced with the Postfix TLS patch): discard
+ plaintext following the STARTTLS command or response. This
+ matters only for the minority of SMTP clients that actually
+ verify server certificates. Files: smtpd/smtpd.c,
+ smtp/smtp_proto.c.
+
+20110106:
+
+ Non-production: cleaned up the tlsproxy support in the
+ Postfix SMTP server for stress testing of the tlsproxy
+ daemon (still #ifdef TLSPROXY). File: smtpd/smtpd.c.
+
+20110107
+
+ Cleanup: smtpd_reject_contact_information is renamed to
+ smtpd_reject_footer, because it can be used for non-contact
+ information.
+
+ Compatibility: postscreen_reject_footer support for
+ compatibility with smtpd_reject_footer. Files:
+ global/smtp_reply_footer.[hc], global/mail_conf.[hc],
+ postscreen/postscreen_expand.c, postscreen/postscreen_send.c,
+ postscreen/postscreen.c, smtpd/smtpd_chat.c.
+
+ Compatibility: postscreen_command_filter support for
+ compatibility with smtpd_command_filter. Files:
+ postscreen/postscreen_dict.c, postscreen/postscreen_smtpd.c
+
+ Cleanup: postscreen(8) now displays control characters in
+ PREGREET responses as C-style \letter escapes, instead of
+ "?". File: postscreen/postscreen_early.c.
diff --git a/postfix/README_FILES/POSTSCREEN_README b/postfix/README_FILES/POSTSCREEN_README
index 52ae2a09b..aa7943119 100644
--- a/postfix/README_FILES/POSTSCREEN_README
+++ b/postfix/README_FILES/POSTSCREEN_README
@@ -197,7 +197,8 @@ elapsed, postscreen(8) logs this as:
Translation: the client at [address]:port sent count bytes before its turn to
speak. This happened time seconds after the postscreen_greet_wait timer was
started. The text is what the client sent (truncated to 100 bytes, and with
-non-printable characters replaced with "?").
+non-printable characters replaced with C-style escapes such as \r for carriage-
+return and \n for newline).
The postscreen_greet_action parameter specifies the action that is taken next.
See "When tests fail before the 220 SMTP server greeting" below.
diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES
index 59f0445f8..bb8ba6de5 100644
--- a/postfix/RELEASE_NOTES
+++ b/postfix/RELEASE_NOTES
@@ -43,7 +43,7 @@ aren't logged to the maillog file, such as responses to syntax
errors, or unsupported commands.
Example:
- smtpd_reject_contact_information = For assistance, call 800-555-0101.
+ smtpd_reject_footer = For assistance, call 800-555-0101.
Server response:
550-5.5.1
The postscreen_greet_action parameter specifies the action that is taken next. See "When tests fail diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html index 3e7b683e6..817fbe3da 100644 --- a/postfix/html/postconf.5.html +++ b/postfix/html/postconf.5.html @@ -6811,6 +6811,17 @@ and error commands.
This feature is available in Postfix 2.8.
+ + +A mechanism to transform commands from remote SMTP clients. +See smtpd_command_filter for further details.
+ +This feature is available in Postfix 2.8 and later.
+ +List of characters that are permitted in postscreen_reject_footer +attribute expansions. See smtpd_expansion_filter for further +details.
+ +This feature is available in Postfix 2.8 and later.
+ +This feature is available in Postfix 2.8.
+ + +Optional information that is appended after a 4XX or 5XX server +response. See smtpd_reject_footer for further details.
+ +This feature is available in Postfix 2.8 and later.
+ +Optional contact information that is appended after each SMTP -server 4XX or 5XX response.
+Optional information that is appended after each SMTP server +4XX or 5XX response.
Example:
/etc/postfix/main.cf: - smtpd_reject_contact_information = For assistance, call 800-555-0101. + smtpd_reject_footer = For assistance, call 800-555-0101. Please provide the following information in your problem report: - time ($localtime) and client address ($client_address). + time ($localtime), client ($client_address) and server + ($server_name).
Server response:
-550-5.5.1 <user@example> Recipient address rejected: User unknown -550 5.5.1 For assistance, call 800-555-0101. Please provide the -following information in your problem report: time (Jan 4 15:42:00) -and client address (192.168.1.248). + 550-5.5.1 <user@example> Recipient address rejected: User unknown + 550 5.5.1 For assistance, call 800-555-0101. Please provide the + following information in your problem report: time (Jan 4 15:42:00), + client (192.168.1.248) and server (mail1.example.com).-
Note: this text is meant to make it easier to find the Postfix -logfile records for a failed SMTP session. The text itself is not -logged to the Postfix server's maillog file.
+Note: the above text is meant to make it easier to find the +Postfix logfile records for a failed SMTP session. The text itself +is not logged to the Postfix SMTP server's maillog file.
Be sure to keep the text as short as possible. Long text may -be truncated before it is logged in the senders maillog file, or -before it is returned to the sender in a delivery status notification. -
+be truncated before it is logged in the Postfix SMTP server's maillog +file, or before it is returned to the sender in a delivery status +notification.This feature supports a limited number of $name attributes in -the contact text. These are replaced by their current value for the +the footer text. These are replaced by their current value for the SMTP session:
For safety reasons, text that does not match $smtpd_expansion_filter -is censored.
+Notes:
-This feature supports \n as a request for a line break in the -contact text. Postfix automatically inserts after each line break -the three-digit SMTP reply code (and optional enhanced status code) -from the original Postfix reject message.
+NOT SUPPORTED are other attributes such as sender, recipient, +or main.cf parameters.
+ +For safety reasons, text that does not match +$smtpd_expansion_filter is censored.
+ +This feature supports the two-character sequence \n as a request +for a line break in the footer text. Postfix automatically inserts +after each line break the three-digit SMTP reply code (and optional +enhanced status code) from the original Postfix reject message. +
This feature is available in Postfix 2.8 and later.
diff --git a/postfix/html/postscreen.8.html b/postfix/html/postscreen.8.html index 4f7250d7e..41499a6cc 100644 --- a/postfix/html/postscreen.8.html +++ b/postfix/html/postscreen.8.html @@ -106,55 +106,59 @@ POSTSCREEN(8) POSTSCREEN(8) ter value is the empty string. COMPATIBILITY CONTROLS + postscreen_command_filter ($smtpd_command_filter) + A mechanism to transform commands from remote SMTP + clients. + postscreen_discard_ehlo_keyword_address_maps ($smtpd_dis- card_ehlo_keyword_address_maps) - Lookup tables, indexed by the remote SMTP client - address, with case insensitive lists of EHLO key- - words (pipelining, starttls, auth, etc.) that the - postscreen(8) server will not send in the EHLO + Lookup tables, indexed by the remote SMTP client + address, with case insensitive lists of EHLO key- + words (pipelining, starttls, auth, etc.) that the + postscreen(8) server will not send in the EHLO response to a remote SMTP client. postscreen_discard_ehlo_keywords ($smtpd_discard_ehlo_key- words) - A case insensitive list of EHLO keywords (pipelin- - ing, starttls, auth, etc.) that the postscreen(8) - server will not send in the EHLO response to a + A case insensitive list of EHLO keywords (pipelin- + ing, starttls, auth, etc.) that the postscreen(8) + server will not send in the EHLO response to a remote SMTP client. TRIAGE PARAMETERS postscreen_bare_newline_action (ignore) - The action that postscreen(8) takes when an SMTP - client sends a bare newline character, that is, a + The action that postscreen(8) takes when an SMTP + client sends a bare newline character, that is, a newline not preceded by carriage return. postscreen_bare_newline_enable (no) - Enable "bare newline" SMTP protocol tests in the + Enable "bare newline" SMTP protocol tests in the postscreen(8) server. postscreen_blacklist_action (ignore) - The action that postscreen(8) takes when an SMTP - client is permanently blacklisted with the + The action that postscreen(8) takes when an SMTP + client is permanently blacklisted with the postscreen_blacklist_networks parameter. postscreen_blacklist_networks (empty) Network addresses that are permanently blacklisted; - see the postscreen_blacklist_action parameter for + see the postscreen_blacklist_action parameter for possible actions. postscreen_disable_vrfy_command ($disable_vrfy_command) - Disable the SMTP VRFY command in the postscreen(8) + Disable the SMTP VRFY command in the postscreen(8) daemon. postscreen_dnsbl_action (ignore) - The action that postscreen(8) takes when an SMTP + The action that postscreen(8) takes when an SMTP client's combined DNSBL score is equal to or - greater than a threshold (as defined with the + greater than a threshold (as defined with the postscreen_dnsbl_sites and postscreen_dnsbl_thresh- old parameters). postscreen_dnsbl_reply_map (empty) - A mapping from actual DNSBL domain name which - includes a secret password, to the DNSBL domain + A mapping from actual DNSBL domain name which + includes a secret password, to the DNSBL domain name that postscreen will reply with when it rejects mail. @@ -163,16 +167,16 @@ POSTSCREEN(8) POSTSCREEN(8) weight factors. postscreen_dnsbl_threshold (1) - The inclusive lower bound for blocking an SMTP + The inclusive lower bound for blocking an SMTP client, based on its combined DNSBL score as - defined with the postscreen_dnsbl_sites parameter. + defined with the postscreen_dnsbl_sites parameter. postscreen_forbidden_commands ($smtpd_forbidden_commands) List of commands that the postscreen(8) server con- siders in violation of the SMTP protocol. postscreen_greet_action (ignore) - The action that postscreen(8) takes when an SMTP + The action that postscreen(8) takes when an SMTP client speaks before its turn within the time spec- ified with the postscreen_greet_wait parameter. @@ -180,157 +184,162 @@ POSTSCREEN(8) POSTSCREEN(8) The text in the optional "220-text..." server response that postscreen(8) sends ahead of the real Postfix SMTP server's "220 text..." response, in an - attempt to confuse bad SMTP clients so that they + attempt to confuse bad SMTP clients so that they speak before their turn (pre-greet). postscreen_greet_wait (${stress?2}${stress:6}s) The amount of time that postscreen(8) will wait for - an SMTP client to send a command before its turn, - and for DNS blocklist lookup results to arrive - (default: up to 2 seconds under stress, up to 6 + an SMTP client to send a command before its turn, + and for DNS blocklist lookup results to arrive + (default: up to 2 seconds under stress, up to 6 seconds otherwise). postscreen_helo_required ($smtpd_helo_required) - Require that a remote SMTP client sends HELO or + Require that a remote SMTP client sends HELO or EHLO before commencing a MAIL transaction. postscreen_non_smtp_command_action (drop) - The action that postscreen(8) takes when an SMTP - client sends non-SMTP commands as specified with + The action that postscreen(8) takes when an SMTP + client sends non-SMTP commands as specified with the postscreen_forbidden_commands parameter. postscreen_non_smtp_command_enable (no) - Enable "non-SMTP command" tests in the + Enable "non-SMTP command" tests in the postscreen(8) server. postscreen_pipelining_action (enforce) - The action that postscreen(8) takes when an SMTP - client sends multiple commands instead of sending - one command and waiting for the server to respond. + The action that postscreen(8) takes when an SMTP + client sends multiple commands instead of sending + one command and waiting for the server to respond. postscreen_pipelining_enable (no) - Enable "pipelining" SMTP protocol tests in the + Enable "pipelining" SMTP protocol tests in the postscreen(8) server. postscreen_whitelist_networks ($mynetworks) Network addresses that are permanently whitelisted, - and that will not be subjected to postscreen(8) + and that will not be subjected to postscreen(8) checks. smtpd_service_name (smtpd) - The internal service that postscreen(8) forwards + The internal service that postscreen(8) forwards allowed connections to. CACHE CONTROLS postscreen_cache_cleanup_interval (12h) - The amount of time between postscreen(8) cache + The amount of time between postscreen(8) cache cleanup runs. postscreen_cache_map (btree:$data_directory/ps_cache) - Persistent storage for the postscreen(8) server + Persistent storage for the postscreen(8) server decisions. postscreen_cache_retention_time (7d) The amount of time that postscreen(8) will cache an - expired temporary whitelist entry before it is + expired temporary whitelist entry before it is removed. postscreen_bare_newline_ttl (30d) - The amount of time that postscreen(8) will cache - results from a successful "bare newline" SMTP pro- + The amount of time that postscreen(8) will cache + results from a successful "bare newline" SMTP pro- tocol test. postscreen_dnsbl_ttl (1h) - The amount of time that postscreen(8) will cache + The amount of time that postscreen(8) will cache results from a successful DNS blocklist test. postscreen_greet_ttl (1d) - The amount of time that postscreen(8) will cache + The amount of time that postscreen(8) will cache results from a successful PREGREET test. postscreen_non_smtp_command_ttl (30d) - The amount of time that postscreen(8) will cache - results from a successful "non_smtp_command" SMTP + The amount of time that postscreen(8) will cache + results from a successful "non_smtp_command" SMTP protocol test. postscreen_pipelining_ttl (30d) - The amount of time that postscreen(8) will cache - results from a successful "pipelining" SMTP proto- + The amount of time that postscreen(8) will cache + results from a successful "pipelining" SMTP proto- col test. RESOURCE CONTROLS line_length_limit (2048) - Upon input, long lines are chopped up into pieces - of at most this length; upon delivery, long lines + Upon input, long lines are chopped up into pieces + of at most this length; upon delivery, long lines are reconstructed. postscreen_client_connection_count_limit ($smtpd_client_connection_count_limit) - How many simultaneous connections any client is + How many simultaneous connections any client is allowed to have with the postscreen(8) daemon. postscreen_command_count_limit (20) - The limit on the total number of commands per SMTP - session for postscreen(8)'s built-in SMTP protocol + The limit on the total number of commands per SMTP + session for postscreen(8)'s built-in SMTP protocol engine. postscreen_command_time_limit (${stress?10}${stress:300}s) - The command "read" time limit for postscreen(8)'s + The command "read" time limit for postscreen(8)'s built-in SMTP protocol engine. postscreen_post_queue_limit ($default_process_limit) - The number of clients that can be waiting for ser- + The number of clients that can be waiting for ser- vice from a real SMTP server process. postscreen_pre_queue_limit ($default_process_limit) - The number of non-whitelisted clients that can be - waiting for a decision whether they will receive + The number of non-whitelisted clients that can be + waiting for a decision whether they will receive service from a real SMTP server process. postscreen_watchdog_timeout (10s) - How much time a postscreen(8) process may take to - respond to an SMTP client command or to perform a + How much time a postscreen(8) process may take to + respond to an SMTP client command or to perform a cache operation before it is terminated by a built- in watchdog timer. STARTTLS CONTROLS postscreen_tls_security_level ($smtpd_tls_security_level) - The SMTP TLS security level for the postscreen(8) - server; when a non-empty value is specified, this + The SMTP TLS security level for the postscreen(8) + server; when a non-empty value is specified, this overrides the obsolete parameters postscreen_use_tls and postscreen_enforce_tls. OBSOLETE STARTTLS SUPPORT CONTROLS - These parameters are supported for compatibility with + These parameters are supported for compatibility with smtpd(8) legacy parameters. postscreen_use_tls ($smtpd_use_tls) - Opportunistic TLS: announce STARTTLS support to - SMTP clients, but do not require that clients use + Opportunistic TLS: announce STARTTLS support to + SMTP clients, but do not require that clients use TLS encryption. postscreen_enforce_tls ($smtpd_enforce_tls) - Mandatory TLS: announce STARTTLS support to SMTP - clients, and require that clients use TLS encryp- + Mandatory TLS: announce STARTTLS support to SMTP + clients, and require that clients use TLS encryp- tion. +TROUBLE SHOOTING CONTROLS + postscreen_expansion_filter (see 'postconf -d' output) + List of characters that are permitted in + postscreen_reject_footer attribute expansions. + + postscreen_reject_footer ($smtpd_reject_footer) + Optional information that is appended after a 4XX + or 5XX server response. + MISCELLANEOUS CONTROLS config_directory (see 'postconf -d' output) - The default location of the Postfix main.cf and + The default location of the Postfix main.cf and master.cf configuration files. delay_logging_resolution_limit (2) - The maximal number of digits after the decimal + The maximal number of digits after the decimal point when logging sub-second delay values. command_directory (see 'postconf -d' output) - The location of all postfix administrative com- + The location of all postfix administrative com- mands. - ipc_timeout (3600s) - The time limit for sending or receiving information - over an internal communication channel. - max_idle (100s) The maximum amount of time that an idle Postfix daemon process waits for an incoming connection diff --git a/postfix/html/smtpd.8.html b/postfix/html/smtpd.8.html index 841eb9cbe..a7aa8245f 100644 --- a/postfix/html/smtpd.8.html +++ b/postfix/html/smtpd.8.html @@ -647,9 +647,9 @@ SMTPD(8) SMTPD(8) The list of error classes that are reported to the postmaster. - smtpd_reject_contact_information (empty) - Optional contact information that is appended after - each SMTP server 4XX or 5XX response. + smtpd_reject_footer (empty) + Optional information that is appended after each + SMTP server 4XX or 5XX response. soft_bounce (no) Safety net to keep mail queued that would otherwise diff --git a/postfix/man/man5/postconf.5 b/postfix/man/man5/postconf.5 index 0258f573c..9fcc06c53 100644 --- a/postfix/man/man5/postconf.5 +++ b/postfix/man/man5/postconf.5 @@ -3835,6 +3835,11 @@ no need to enforce separate limits on the number of junk commands and error commands. .PP This feature is available in Postfix 2.8. +.SH postscreen_command_filter (default: $smtpd_command_filter) +A mechanism to transform commands from remote SMTP clients. +See smtpd_command_filter for further details. +.PP +This feature is available in Postfix 2.8 and later. .SH postscreen_command_time_limit (default: ${stress?10}${stress:300}s) The command "read" time limit for \fBpostscreen\fR(8)'s built-in SMTP protocol engine. This bounds the time to receive an entire command. @@ -3994,6 +3999,12 @@ for details. .PP This feature is available in Postfix 2.8 and later. Preferably, use postscreen_tls_security_level instead. +.SH postscreen_expansion_filter (default: see "postconf -d" output) +List of characters that are permitted in postscreen_reject_footer +attribute expansions. See smtpd_expansion_filter for further +details. +.PP +This feature is available in Postfix 2.8 and later. .SH postscreen_forbidden_commands (default: $smtpd_forbidden_commands) List of commands that the \fBpostscreen\fR(8) server considers in violation of the SMTP protocol. See smtpd_forbidden_commands for @@ -4149,6 +4160,11 @@ process. When this queue is full, all non-whitelisted clients will receive a 421 reponse. .PP This feature is available in Postfix 2.8. +.SH postscreen_reject_footer (default: $smtpd_reject_footer) +Optional information that is appended after a 4XX or 5XX server +response. See smtpd_reject_footer for further details. +.PP +This feature is available in Postfix 2.8 and later. .SH postscreen_tls_security_level (default: $smtpd_tls_security_level) The SMTP TLS security level for the \fBpostscreen\fR(8) server; when a non-empty value is specified, this overrides the obsolete parameters @@ -8094,9 +8110,9 @@ smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination .fi .ad .ft R -.SH smtpd_reject_contact_information (default: empty) -Optional contact information that is appended after each SMTP -server 4XX or 5XX response. +.SH smtpd_reject_footer (default: empty) +Optional information that is appended after each SMTP server +4XX or 5XX response. .PP Example: .PP @@ -8104,9 +8120,10 @@ Example: .na .ft C /etc/postfix/main.cf: - smtpd_reject_contact_information = For assistance, call 800-555-0101. + smtpd_reject_footer = For assistance, call 800-555-0101. Please provide the following information in your problem report: - time ($localtime) and client address ($client_address). + time ($localtime), client ($client_address) and server + ($server_name). .fi .ad .ft R @@ -8116,43 +8133,53 @@ Server response: .nf .na .ft C -550-5.5.1The postscreen_greet_action parameter specifies the action that is taken next. See "When tests fail diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto index c39a711cc..2885e9807 100644 --- a/postfix/proto/postconf.proto +++ b/postfix/proto/postconf.proto @@ -13822,62 +13822,99 @@ for further details.
This feature is available in Postfix 2.8 and later.
-%PARAM smtpd_reject_contact_information +%PARAM smtpd_reject_footer -Optional contact information that is appended after each SMTP -server 4XX or 5XX response.
+Optional information that is appended after each SMTP server +4XX or 5XX response.
Example:
/etc/postfix/main.cf: - smtpd_reject_contact_information = For assistance, call 800-555-0101. + smtpd_reject_footer = For assistance, call 800-555-0101. Please provide the following information in your problem report: - time ($localtime) and client address ($client_address). + time ($localtime), client ($client_address) and server + ($server_name).
Server response:
-550-5.5.1 <user@example> Recipient address rejected: User unknown -550 5.5.1 For assistance, call 800-555-0101. Please provide the -following information in your problem report: time (Jan 4 15:42:00) -and client address (192.168.1.248). + 550-5.5.1 <user@example> Recipient address rejected: User unknown + 550 5.5.1 For assistance, call 800-555-0101. Please provide the + following information in your problem report: time (Jan 4 15:42:00), + client (192.168.1.248) and server (mail1.example.com).-
Note: this text is meant to make it easier to find the Postfix -logfile records for a failed SMTP session. The text itself is not -logged to the Postfix server's maillog file.
+Note: the above text is meant to make it easier to find the +Postfix logfile records for a failed SMTP session. The text itself +is not logged to the Postfix SMTP server's maillog file.
Be sure to keep the text as short as possible. Long text may -be truncated before it is logged in the senders maillog file, or -before it is returned to the sender in a delivery status notification. -
+be truncated before it is logged in the Postfix SMTP server's maillog +file, or before it is returned to the sender in a delivery status +notification.This feature supports a limited number of $name attributes in -the contact text. These are replaced by their current value for the +the footer text. These are replaced by their current value for the SMTP session:
For safety reasons, text that does not match $smtpd_expansion_filter -is censored.
+Notes:
-This feature supports \n as a request for a line break in the -contact text. Postfix automatically inserts after each line break -the three-digit SMTP reply code (and optional enhanced status code) -from the original Postfix reject message.
+NOT SUPPORTED are other attributes such as sender, recipient, +or main.cf parameters.
+ +For safety reasons, text that does not match +$smtpd_expansion_filter is censored.
+ +This feature supports the two-character sequence \n as a request +for a line break in the footer text. Postfix automatically inserts +after each line break the three-digit SMTP reply code (and optional +enhanced status code) from the original Postfix reject message. +
+ +This feature is available in Postfix 2.8 and later.
+ +%PARAM postscreen_expansion_filter see "postconf -d" output + +List of characters that are permitted in postscreen_reject_footer +attribute expansions. See smtpd_expansion_filter for further +details.
+ +This feature is available in Postfix 2.8 and later.
+ +%PARAM postscreen_reject_footer $smtpd_reject_footer + +Optional information that is appended after a 4XX or 5XX server +response. See smtpd_reject_footer for further details.
+ +This feature is available in Postfix 2.8 and later.
+ +%PARAM postscreen_command_filter $smtpd_command_filter + +A mechanism to transform commands from remote SMTP clients. +See smtpd_command_filter for further details.
This feature is available in Postfix 2.8 and later.
diff --git a/postfix/src/global/Makefile.in b/postfix/src/global/Makefile.in index 47ab4d16a..4ee8d8677 100644 --- a/postfix/src/global/Makefile.in +++ b/postfix/src/global/Makefile.in @@ -29,7 +29,8 @@ SRCS = abounce.c anvil_clnt.c been_here.c bounce.c bounce_log.c \ user_acl.c valid_mailhost_addr.c verify.c verify_clnt.c \ verp_sender.c wildcard_inet_addr.c xtext.c delivered_hdr.c \ fold_addr.c header_body_checks.c mkmap_proxy.c data_redirect.c \ - match_service.c mail_conf_nint.c addr_match_list.c mail_conf_nbool.c + match_service.c mail_conf_nint.c addr_match_list.c mail_conf_nbool.c \ + smtp_reply_footer.c OBJS = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \ canon_addr.o cfg_parser.o cleanup_strerror.o cleanup_strflags.o \ clnt_stream.o conv_time.o db_common.o debug_peer.o debug_process.o \ @@ -60,7 +61,8 @@ OBJS = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \ user_acl.o valid_mailhost_addr.o verify.o verify_clnt.o \ verp_sender.o wildcard_inet_addr.o xtext.o delivered_hdr.o \ fold_addr.o header_body_checks.o mkmap_proxy.o data_redirect.o \ - match_service.o mail_conf_nint.o addr_match_list.o mail_conf_nbool.o + match_service.o mail_conf_nint.o addr_match_list.o mail_conf_nbool.o \ + smtp_reply_footer.o HDRS = abounce.h anvil_clnt.h been_here.h bounce.h bounce_log.h \ canon_addr.h cfg_parser.h cleanup_user.h clnt_stream.h config.h \ conv_time.h db_common.h debug_peer.h debug_process.h defer.h \ @@ -85,7 +87,7 @@ HDRS = abounce.h anvil_clnt.h been_here.h bounce.h bounce_log.h \ trace.h user_acl.h valid_mailhost_addr.h verify.h verify_clnt.h \ verp_sender.h wildcard_inet_addr.h xtext.h delivered_hdr.h \ fold_addr.h header_body_checks.h data_redirect.h match_service.h \ - addr_match_list.h + addr_match_list.h smtp_reply_footer.h TESTSRC = rec2stream.c stream2rec.c recdump.c DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE) CFLAGS = $(DEBUG) $(OPT) $(DEFS) @@ -795,25 +797,8 @@ delivered_hdr.o: quote_822_local.h delivered_hdr.o: quote_flags.h delivered_hdr.o: rec_type.h delivered_hdr.o: record.h -dict_ldap.o: ../../include/argv.h -dict_ldap.o: ../../include/binhash.h -dict_ldap.o: ../../include/dict.h -dict_ldap.o: ../../include/match_list.h -dict_ldap.o: ../../include/match_ops.h -dict_ldap.o: ../../include/msg.h -dict_ldap.o: ../../include/mymalloc.h -dict_ldap.o: ../../include/name_code.h -dict_ldap.o: ../../include/stringops.h dict_ldap.o: ../../include/sys_defs.h -dict_ldap.o: ../../include/vbuf.h -dict_ldap.o: ../../include/vstream.h -dict_ldap.o: ../../include/vstring.h -dict_ldap.o: cfg_parser.h -dict_ldap.o: db_common.h dict_ldap.o: dict_ldap.c -dict_ldap.o: dict_ldap.h -dict_ldap.o: mail_conf.h -dict_ldap.o: string_list.h dict_mysql.o: ../../include/sys_defs.h dict_mysql.o: dict_mysql.c dict_pgsql.o: ../../include/sys_defs.h @@ -1444,15 +1429,7 @@ mime_state.o: mail_params.h mime_state.o: mime_state.c mime_state.o: mime_state.h mime_state.o: rec_type.h -mkmap_cdb.o: ../../include/argv.h -mkmap_cdb.o: ../../include/dict.h -mkmap_cdb.o: ../../include/dict_cdb.h -mkmap_cdb.o: ../../include/mymalloc.h mkmap_cdb.o: ../../include/sys_defs.h -mkmap_cdb.o: ../../include/vbuf.h -mkmap_cdb.o: ../../include/vstream.h -mkmap_cdb.o: ../../include/vstring.h -mkmap_cdb.o: mkmap.h mkmap_cdb.o: mkmap_cdb.c mkmap_db.o: ../../include/argv.h mkmap_db.o: ../../include/dict.h @@ -1829,6 +1806,15 @@ sent.o: sent.c sent.o: sent.h sent.o: trace.h sent.o: verify.h +smtp_reply_footer.o: ../../include/mac_expand.h +smtp_reply_footer.o: ../../include/mac_parse.h +smtp_reply_footer.o: ../../include/msg.h +smtp_reply_footer.o: ../../include/sys_defs.h +smtp_reply_footer.o: ../../include/vbuf.h +smtp_reply_footer.o: ../../include/vstring.h +smtp_reply_footer.o: dsn_util.h +smtp_reply_footer.o: smtp_reply_footer.c +smtp_reply_footer.o: smtp_reply_footer.h smtp_stream.o: ../../include/iostuff.h smtp_stream.o: ../../include/msg.h smtp_stream.o: ../../include/sys_defs.h diff --git a/postfix/src/global/mail_conf.c b/postfix/src/global/mail_conf.c index c5d3d4321..1fc7847fc 100644 --- a/postfix/src/global/mail_conf.c +++ b/postfix/src/global/mail_conf.c @@ -22,6 +22,9 @@ /* const char *mail_conf_eval(string) /* const char *string; /* +/* const char *mail_conf_eval_once(string) +/* const char *string; +/* /* const char *mail_conf_lookup_eval(name) /* const char *name; /* DESCRIPTION @@ -51,6 +54,11 @@ /* string argument. The result is volatile and should be copied /* if it is to be used for any appreciable amount of time. /* +/* mail_conf_eval_once() non-recursively expands any $parameters +/* in the string argument. The result is volatile and should +/* be copied if it is to be used for any appreciable amount +/* of time. +/* /* mail_conf_lookup_eval() looks up the named parameter, and expands any /* $parameters in the result. The result is volatile and should be /* copied if it is to be used for any appreciable amount of time. @@ -201,6 +209,15 @@ const char *mail_conf_eval(const char *string) return (dict_eval(CONFIG_DICT, string, RECURSIVE)); } +/* mail_conf_eval_once - expand one level of macros in string */ + +const char *mail_conf_eval_once(const char *string) +{ +#define NONRECURSIVE 0 + + return (dict_eval(CONFIG_DICT, string, NONRECURSIVE)); +} + /* mail_conf_lookup - lookup named variable */ const char *mail_conf_lookup(const char *name) diff --git a/postfix/src/global/mail_conf.h b/postfix/src/global/mail_conf.h index 5c0509214..ea6e8bd25 100644 --- a/postfix/src/global/mail_conf.h +++ b/postfix/src/global/mail_conf.h @@ -40,6 +40,7 @@ extern void mail_conf_flush(void); extern void mail_conf_update(const char *, const char *); extern const char *mail_conf_lookup(const char *); extern const char *mail_conf_eval(const char *); +extern const char *mail_conf_eval_once(const char *); extern const char *mail_conf_lookup_eval(const char *); /* diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h index c5644526b..fa01c5293 100644 --- a/postfix/src/global/mail_params.h +++ b/postfix/src/global/mail_params.h @@ -3423,6 +3423,18 @@ extern bool var_psc_disable_vrfy; #define DEF_PSC_CCONN_LIMIT "$" VAR_SMTPD_CCONN_LIMIT extern int var_psc_cconn_limit; +#define VAR_PSC_REJ_FOOTER "postscreen_reject_footer" +#define DEF_PSC_REJ_FOOTER "$" VAR_SMTPD_REJ_FOOTER +extern char *var_psc_rej_footer; + +#define VAR_PSC_EXP_FILTER "postscreen_expansion_filter" +#define DEF_PSC_EXP_FILTER "$" VAR_SMTPD_EXP_FILTER +extern char *var_psc_exp_filter; + +#define VAR_PSC_CMD_FILTER "postscreen_command_filter" +#define DEF_PSC_CMD_FILTER "" +extern char *var_psc_cmd_filter; + #define VAR_DNSBLOG_DELAY "dnsblog_reply_delay" #define DEF_DNSBLOG_DELAY "0s" extern int var_dnsblog_delay; @@ -3557,9 +3569,9 @@ extern bool var_tlsp_tls_set_sessid; /* * SMTPD "reject" contact info. */ -#define VAR_SMTPD_REJ_CONTACT "smtpd_reject_contact_information" -#define DEF_SMTPD_REJ_CONTACT "" -extern char *var_smtpd_rej_contact; +#define VAR_SMTPD_REJ_FOOTER "smtpd_reject_footer" +#define DEF_SMTPD_REJ_FOOTER "" +extern char *var_smtpd_rej_footer; /* LICENSE /* .ad diff --git a/postfix/src/global/mail_proto.h b/postfix/src/global/mail_proto.h index 84e825473..d33f0ccb4 100644 --- a/postfix/src/global/mail_proto.h +++ b/postfix/src/global/mail_proto.h @@ -254,6 +254,11 @@ extern char *mail_pathname(const char *, const char *); #define MAIL_ATTR_CIPHER_USEBITS "cipher_usebits" #define MAIL_ATTR_CIPHER_ALGBITS "cipher_algbits" + /* + * SMTP reply footer support. + */ +#define MAIL_ATTR_SERVER_NAME "server_name" + /* LICENSE /* .ad /* .fi diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index ffb3e0e7e..e92f57391 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20110105" +#define MAIL_RELEASE_DATE "20110108" #define MAIL_VERSION_NUMBER "2.8" #ifdef SNAPSHOT diff --git a/postfix/src/global/smtp_reply_footer.c b/postfix/src/global/smtp_reply_footer.c new file mode 100644 index 000000000..5018a4706 --- /dev/null +++ b/postfix/src/global/smtp_reply_footer.c @@ -0,0 +1,166 @@ +/*++ +/* NAME +/* smtp_reply_footer 3 +/* SUMMARY +/* SMTP reply footer text support +/* SYNOPSIS +/* #include