From fef0910080eb4d8ec30b284b53a032d4a91a2ce3 Mon Sep 17 00:00:00 2001
From: Wietse Venema
The "instance" attribute value can be used to correlate - different requests regarding the same message delivery.
+ different requests regarding the same message delivery. These + requests are sent over the same policy connection (unless the + policy daemon terminates the connection). Once Postfix sends + a query with a different instance attribute over that same + policy connection, the previous message delivery is either + completed or aborted.The "size" attribute value specifies the message size that the client specified in the MAIL FROM command (zero if diff --git a/postfix/html/bounce.5.html b/postfix/html/bounce.5.html index 54214f5a4..2c0e46eee 100644 --- a/postfix/html/bounce.5.html +++ b/postfix/html/bounce.5.html @@ -109,10 +109,10 @@ BOUNCE(5) BOUNCE(5) TEMPLATE HEADER FORMAT The first portion of a bounce template consists of - optional template headers. These either become message - headers in the delivery status notification, or control - the formatting of the notification. Headers not specified - in a template will be left at their default value. + optional template headers. Some become message headers in + the delivery status notification; some control the format- + ting of that notification. Headers not specified in a tem- + plate will be left at their default value. The following headers are supported: @@ -126,63 +126,63 @@ BOUNCE(5) BOUNCE(5) Subject: The subject in the message header of the delivery - status notification. + status notification that is returned to the sender. Postmaster-Subject: - The subject that will be used in Postmaster copies - of undeliverable or delayed mail notifications. - These copies are sent under control of the + The subject that will be used in Postmaster copies + of undeliverable or delayed mail notifications. + These copies are sent under control of the notify_classes configuration parameter. The usage and specification of template message headers is subject to the following restrictions: - o Template message header names can be specified in - upper case, lower case or mixed case. Postfix + o Template message header names can be specified in + upper case, lower case or mixed case. Postfix always produces bounce message header labels of the form "From:" and "Subject:". - o Template message headers must not span multiple + o Template message headers must not span multiple lines. - o Template message headers do not support $parameter + o Template message headers do not support $parameter expansions. o Template message headers must contain ASCII charac- - ters only, and must not contain ASCII null charac- + ters only, and must not contain ASCII null charac- ters. TEMPLATE MESSAGE TEXT FORMAT - The second portion of a bounce template consists of mes- - sage text. As the above example shows, template message - text may contain main.cf $parameters. Besides the parame- + The second portion of a bounce template consists of mes- + sage text. As the above example shows, template message + text may contain main.cf $parameters. Besides the parame- ters that are defined in main.cf, the following parameters - are treated specially depending on the suffix that is + are treated specially depending on the suffix that is appended to their name. delay_warning_time_suffix - Expands into the value of the delay_warning_time - parameter, expressed in the time unit specified by - suffix, which is one of seconds, minutes, hours, + Expands into the value of the delay_warning_time + parameter, expressed in the time unit specified by + suffix, which is one of seconds, minutes, hours, days, or weeks. maximal_queue_lifetime_suffix - Expands into the value of the maximal_queue_life- - time parameter, expressed in the time unit speci- + Expands into the value of the maximal_queue_life- + time parameter, expressed in the time unit speci- fied by suffix. See above under delay_warning_time for possible suffix values. - The usage and specification of template message text is + The usage and specification of template message text is subject to the following restrictions: o The template message text is not sent in Postmaster copies of delivery status notifications. - o If the template message text contains non-ASCII + o If the template message text contains non-ASCII characters, Postfix requires that the Charset: tem- - plate header is updated. Specify an appropriate + plate header is updated. Specify an appropriate superset of US-ASCII. A superset is needed because - Postfix appends ASCII text after the message tem- + Postfix appends ASCII text after the message tem- plate when it sends a delivery status notification. SEE ALSO @@ -190,11 +190,11 @@ BOUNCE(5) BOUNCE(5) postconf(5), configuration parameters LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. HISTORY - The Postfix bounce template format was originally devel- + The Postfix bounce template format was originally devel- oped by Nicolas Riendeau. AUTHOR(S) diff --git a/postfix/html/postmap.1.html b/postfix/html/postmap.1.html index 253bd7d69..50a36ff78 100644 --- a/postfix/html/postmap.1.html +++ b/postfix/html/postmap.1.html @@ -67,168 +67,167 @@ POSTMAP(1) POSTMAP(1) mat. Each line of body content becomes one lookup key. - By default, this processing of body content starts - at the first non-header line, and continues until - the end of the message is reached. + By default, the -b option starts generating lookup + keys at the first non-header line, and stops when + the end of the message is reached. To simulate + body_checks(5) processing, enable MIME parsing with + -m. With this, the -b option generates no body- + style lookup keys for attachment MIME headers and + for attached message/* headers. - To simulate body_checks(5) processing, enable MIME - parsing with -m. With this, the -b option generates - no body-style lookup keys from attachment MIME - headers and from attached message/* headers. - - This feature is available in Postfix version 2.6 + This feature is available in Postfix version 2.6 and later. -c config_dir - Read the main.cf configuration file in the named + Read the main.cf configuration file in the named directory instead of the default configuration directory. - -d key Search the specified maps for key and remove one - entry per map. The exit status is zero when the + -d key Search the specified maps for key and remove one + entry per map. The exit status is zero when the requested information was found. If a key value of - is specified, the program reads key values from the standard input stream. The exit - status is zero when at least one of the requested + status is zero when at least one of the requested keys was found. -f Do not fold the lookup key to lower case while cre- ating or querying a table. With Postfix version 2.3 and later, this option has - no effect for regular expression tables. There, + no effect for regular expression tables. There, case folding is controlled by appending a flag to a pattern. - -h Enable message header query mode. When reading + -h Enable message header query mode. When reading lookup keys from standard input with "-q -", - process the input as if it is an email message in - RFC 2822 format. Each logical header line becomes - one lookup key. A multi-line header becomes one - string with embedded newline characters. + process the input as if it is an email message in + RFC 2822 format. Each logical header line becomes + one lookup key. A multi-line header becomes one + lookup key with one or more embedded newline char- + acters. - By default, this processing of header content ends - at the first non-header line. + By default, the -h option generates lookup keys + until the first non-header line is reached. To + simulate header_checks(5) processing, enable MIME + parsing with -m. With this, the -h option also gen- + erates header-style lookup keys for attachment MIME + headers and for attached message/* headers. - To simulate header_checks(5) processing, enable - MIME parsing with -m. With this, the -h option also - generates header-style lookup keys from attachment - MIME headers and from attached message/* headers. - - This feature is available in Postfix version 2.6 + This feature is available in Postfix version 2.6 and later. - -i Incremental mode. Read entries from standard input + -i Incremental mode. Read entries from standard input and do not truncate an existing database. By default, postmap(1) creates a new database from the entries in file_name. - -m Enable MIME mode mode with "-b" and "-h". + -m Enable MIME parsing with "-b" and "-h". - This feature is available in Postfix version 2.6 + This feature is available in Postfix version 2.6 and later. - -N Include the terminating null character that termi- - nates lookup keys and values. By default, - postmap(1) does whatever is the default for the - host operating system. - - -n Don't include the terminating null character that - terminates lookup keys and values. By default, + -N Include the terminating null character that termi- + nates lookup keys and values. By default, postmap(1) does whatever is the default for the host operating system. - -o Do not release root privileges when processing a - non-root input file. By default, postmap(1) drops - root privileges and runs as the source file owner + -n Don't include the terminating null character that + terminates lookup keys and values. By default, + postmap(1) does whatever is the default for the + host operating system. + + -o Do not release root privileges when processing a + non-root input file. By default, postmap(1) drops + root privileges and runs as the source file owner instead. -p Do not inherit the file access permissions from the input file when creating a new file. Instead, cre- - ate a new file with default access permissions + ate a new file with default access permissions (mode 0644). - -q key Search the specified maps for key and write the - first value found to the standard output stream. + -q key Search the specified maps for key and write the + first value found to the standard output stream. The exit status is zero when the requested informa- tion was found. If a key value of - is specified, the program reads - key values from the standard input stream and - writes one line of key value output for each key - that was found. The exit status is zero when at + key values from the standard input stream and + writes one line of key value output for each key + that was found. The exit status is zero when at least one of the requested keys was found. -r When updating a table, do not complain about attempts to update existing entries, and make those updates anyway. - -s Retrieve all database elements, and write one line - of key value output for each element. The elements - are printed in database order, which is not neces- + -s Retrieve all database elements, and write one line + of key value output for each element. The elements + are printed in database order, which is not neces- sarily the same as the original input order. - This feature is available in Postfix version 2.2 - and later, and is not available for all database + This feature is available in Postfix version 2.2 + and later, and is not available for all database types. -v Enable verbose logging for debugging purposes. Mul- - tiple -v options make the software increasingly + tiple -v options make the software increasingly verbose. -w When updating a table, do not complain about - attempts to update existing entries, and ignore + attempts to update existing entries, and ignore those attempts. Arguments: file_type - The database type. To find out what types are sup- + The database type. To find out what types are sup- ported, use the "postconf -m" command. The postmap(1) command can query any supported file - type, but it can create only the following file + type, but it can create only the following file types: - btree The output file is a btree file, named - file_name.db. This is available on systems + btree The output file is a btree file, named + file_name.db. This is available on systems with support for db databases. cdb The output consists of one file, named file_name.cdb. This is available on systems with support for cdb databases. - dbm The output consists of two files, named - file_name.pag and file_name.dir. This is - available on systems with support for dbm + dbm The output consists of two files, named + file_name.pag and file_name.dir. This is + available on systems with support for dbm databases. - hash The output file is a hashed file, named - file_name.db. This is available on systems + hash The output file is a hashed file, named + file_name.db. This is available on systems with support for db databases. - sdbm The output consists of two files, named - file_name.pag and file_name.dir. This is - available on systems with support for sdbm + sdbm The output consists of two files, named + file_name.pag and file_name.dir. This is + available on systems with support for sdbm databases. - When no file_type is specified, the software uses - the database type specified via the default_data- + When no file_type is specified, the software uses + the database type specified via the default_data- base_type configuration parameter. file_name - The name of the lookup table source file when + The name of the lookup table source file when rebuilding a database. DIAGNOSTICS - Problems are logged to the standard error stream and to - syslogd(8). No output means that no problems were - detected. Duplicate entries are skipped and are flagged + Problems are logged to the standard error stream and to + syslogd(8). No output means that no problems were + detected. Duplicate entries are skipped and are flagged with a warning. - postmap(1) terminates with zero exit status in case of - success (including successful "postmap -q" lookup) and + postmap(1) terminates with zero exit status in case of + success (including successful "postmap -q" lookup) and terminates with non-zero exit status in case of failure. ENVIRONMENT @@ -239,21 +238,21 @@ POSTMAP(1) POSTMAP(1) Enable verbose logging for debugging purposes. CONFIGURATION PARAMETERS - The following main.cf parameters are especially relevant + The following main.cf parameters are especially relevant to this program. The text below provides only a parameter - summary. See postconf(5) for more details including exam- + summary. See postconf(5) for more details including exam- ples. berkeley_db_create_buffer_size (16777216) - The per-table I/O buffer size for programs that + The per-table I/O buffer size for programs that create Berkeley DB hash or btree tables. berkeley_db_read_buffer_size (131072) - The per-table I/O buffer size for programs that + The per-table I/O buffer size for programs that read Berkeley DB hash or btree tables. 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. default_database_type (see 'postconf -d' output) @@ -264,8 +263,8 @@ POSTMAP(1) POSTMAP(1) The syslog facility of Postfix logging. syslog_name (postfix) - The mail system name that is prepended to the - process name in syslog records, so that "smtpd" + The mail system name that is prepended to the + process name in syslog records, so that "smtpd" becomes, for example, "postfix/smtpd". SEE ALSO @@ -278,7 +277,7 @@ POSTMAP(1) POSTMAP(1) DATABASE_README, Postfix lookup table overview LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) diff --git a/postfix/man/man1/postmap.1 b/postfix/man/man1/postmap.1 index dad48ab02..9189c28a2 100644 --- a/postfix/man/man1/postmap.1 +++ b/postfix/man/man1/postmap.1 @@ -73,14 +73,13 @@ from standard input with "\fB-q -\fR", process the input as if it is an email message in RFC 2822 format. Each line of body content becomes one lookup key. .sp -By default, this processing of body content starts at the -first non-header line, and continues until the end of the -message is reached. -.sp +By default, the \fB-b\fR option starts generating lookup +keys at the first non-header line, and stops when the end +of the message is reached. To simulate \fBbody_checks\fR(5) processing, enable MIME parsing with \fB-m\fR. With this, the \fB-b\fR option -generates no body-style lookup keys from attachment MIME -headers and from attached message/* headers. +generates no body-style lookup keys for attachment MIME +headers and for attached message/* headers. .sp This feature is available in Postfix version 2.6 and later. .IP "\fB-c \fIconfig_dir\fR" @@ -105,15 +104,15 @@ Enable message header query mode. When reading lookup keys from standard input with "\fB-q -\fR", process the input as if it is an email message in RFC 2822 format. Each logical header line becomes one lookup key. A multi-line -header becomes one string with embedded newline characters. -.sp -By default, this processing of header content ends at the -first non-header line. +header becomes one lookup key with one or more embedded +newline characters. .sp +By default, the \fB-h\fR option generates lookup keys until +the first non-header line is reached. To simulate \fBheader_checks\fR(5) processing, enable MIME parsing with \fB-m\fR. With this, the \fB-h\fR option also -generates header-style lookup keys from attachment MIME -headers and from attached message/* headers. +generates header-style lookup keys for attachment MIME +headers and for attached message/* headers. .sp This feature is available in Postfix version 2.6 and later. .IP \fB-i\fR @@ -121,7 +120,7 @@ Incremental mode. Read entries from standard input and do not truncate an existing database. By default, \fBpostmap\fR(1) creates a new database from the entries in \fBfile_name\fR. .IP \fB-m\fR -Enable MIME mode mode with "\fB-b\fR" and "\fB-h\fR". +Enable MIME parsing with "\fB-b\fR" and "\fB-h\fR". .sp This feature is available in Postfix version 2.6 and later. .IP \fB-N\fR diff --git a/postfix/man/man5/bounce.5 b/postfix/man/man5/bounce.5 index 2fddcac5e..f039f1810 100644 --- a/postfix/man/man5/bounce.5 +++ b/postfix/man/man5/bounce.5 @@ -122,9 +122,9 @@ directory. .ad .fi The first portion of a bounce template consists of optional -template headers. These either become message headers in -the delivery status notification, or control the formatting -of the notification. Headers not specified in a template +template headers. Some become message headers in the +delivery status notification; some control the formatting +of that notification. Headers not specified in a template will be left at their default value. The following headers are supported: @@ -136,7 +136,7 @@ The sender address in the message header of the delivery status notification. .IP \fBSubject:\fR The subject in the message header of the delivery status -notification. +notification that is returned to the sender. .IP \fBPostmaster-Subject:\fR The subject that will be used in Postmaster copies of undeliverable or delayed mail notifications. These copies diff --git a/postfix/proto/SMTPD_POLICY_README.html b/postfix/proto/SMTPD_POLICY_README.html index 639b5ddf0..bdf797097 100644 --- a/postfix/proto/SMTPD_POLICY_README.html +++ b/postfix/proto/SMTPD_POLICY_README.html @@ -149,7 +149,12 @@ stress= and an attribute value must not contain null or newline.
The "instance" attribute value can be used to correlate - different requests regarding the same message delivery.
+ different requests regarding the same message delivery. These + requests are sent over the same policy connection (unless the + policy daemon terminates the connection). Once Postfix sends + a query with a different instance attribute over that same + policy connection, the previous message delivery is either + completed or aborted.The "size" attribute value specifies the message size that the client specified in the MAIL FROM command (zero if diff --git a/postfix/proto/bounce b/postfix/proto/bounce index 98e96d4cf..a76da97c7 100644 --- a/postfix/proto/bounce +++ b/postfix/proto/bounce @@ -110,9 +110,9 @@ # .ad # .fi # The first portion of a bounce template consists of optional -# template headers. These either become message headers in -# the delivery status notification, or control the formatting -# of the notification. Headers not specified in a template +# template headers. Some become message headers in the +# delivery status notification; some control the formatting +# of that notification. Headers not specified in a template # will be left at their default value. # # The following headers are supported: @@ -124,7 +124,7 @@ # status notification. # .IP \fBSubject:\fR # The subject in the message header of the delivery status -# notification. +# notification that is returned to the sender. # .IP \fBPostmaster-Subject:\fR # The subject that will be used in Postmaster copies of # undeliverable or delayed mail notifications. These copies diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 2286261ab..21523a4d4 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 "20080324" +#define MAIL_RELEASE_DATE "20080411" #define MAIL_VERSION_NUMBER "2.6" #ifdef SNAPSHOT diff --git a/postfix/src/oqmgr/qmgr_message.c b/postfix/src/oqmgr/qmgr_message.c index a68cc9ea0..4334d8684 100644 --- a/postfix/src/oqmgr/qmgr_message.c +++ b/postfix/src/oqmgr/qmgr_message.c @@ -311,6 +311,7 @@ static int qmgr_message_read(QMGR_MESSAGE *message) int dsn_notify = 0; char *dsn_orcpt = 0; int n; + int have_log_client_attr = 0; /* * Initialize. No early returns or we have a memory leak. @@ -612,18 +613,24 @@ static int qmgr_message_read(QMGR_MESSAGE *message) * client information. To support old queue files, we accept both * names for the purpose of logging; the new name overrides the * old one. + * + * XXX Do not use the "legacy" client_name etc. attribute values for + * initializing the logging attributes, when this file already + * contains the "modern" log_client_name etc. logging attributes. + * Otherwise, logging attributes that are not present in the + * queue file would be set with information from the real client. */ else if (strcmp(name, MAIL_ATTR_ACT_CLIENT_NAME) == 0) { - if (message->client_name == 0) + if (have_log_client_attr == 0 && message->client_name == 0) message->client_name = mystrdup(value); } else if (strcmp(name, MAIL_ATTR_ACT_CLIENT_ADDR) == 0) { - if (message->client_addr == 0) + if (have_log_client_attr == 0 && message->client_addr == 0) message->client_addr = mystrdup(value); } else if (strcmp(name, MAIL_ATTR_ACT_PROTO_NAME) == 0) { - if (message->client_proto == 0) + if (have_log_client_attr == 0 && message->client_proto == 0) message->client_proto = mystrdup(value); } else if (strcmp(name, MAIL_ATTR_ACT_HELO_NAME) == 0) { - if (message->client_helo == 0) + if (have_log_client_attr == 0 && message->client_helo == 0) message->client_helo = mystrdup(value); } /* Original client attributes. */ @@ -631,22 +638,27 @@ static int qmgr_message_read(QMGR_MESSAGE *message) if (message->client_name != 0) myfree(message->client_name); message->client_name = mystrdup(value); + have_log_client_attr = 1; } else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_ADDR) == 0) { if (message->client_addr != 0) myfree(message->client_addr); message->client_addr = mystrdup(value); + have_log_client_attr = 1; } else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_PORT) == 0) { if (message->client_port != 0) myfree(message->client_port); message->client_port = mystrdup(value); + have_log_client_attr = 1; } else if (strcmp(name, MAIL_ATTR_LOG_PROTO_NAME) == 0) { if (message->client_proto != 0) myfree(message->client_proto); message->client_proto = mystrdup(value); + have_log_client_attr = 1; } else if (strcmp(name, MAIL_ATTR_LOG_HELO_NAME) == 0) { if (message->client_helo != 0) myfree(message->client_helo); message->client_helo = mystrdup(value); + have_log_client_attr = 1; } else if (strcmp(name, MAIL_ATTR_SASL_METHOD) == 0) { if (message->sasl_method == 0) message->sasl_method = mystrdup(value); diff --git a/postfix/src/postmap/postmap.c b/postfix/src/postmap/postmap.c index 3138c9942..be414e70f 100644 --- a/postfix/src/postmap/postmap.c +++ b/postfix/src/postmap/postmap.c @@ -63,14 +63,13 @@ /* as if it is an email message in RFC 2822 format. Each line /* of body content becomes one lookup key. /* .sp -/* By default, this processing of body content starts at the -/* first non-header line, and continues until the end of the -/* message is reached. -/* .sp +/* By default, the \fB-b\fR option starts generating lookup +/* keys at the first non-header line, and stops when the end +/* of the message is reached. /* To simulate \fBbody_checks\fR(5) processing, enable MIME /* parsing with \fB-m\fR. With this, the \fB-b\fR option -/* generates no body-style lookup keys from attachment MIME -/* headers and from attached message/* headers. +/* generates no body-style lookup keys for attachment MIME +/* headers and for attached message/* headers. /* .sp /* This feature is available in Postfix version 2.6 and later. /* .IP "\fB-c \fIconfig_dir\fR" @@ -95,15 +94,15 @@ /* from standard input with "\fB-q -\fR", process the input /* as if it is an email message in RFC 2822 format. Each /* logical header line becomes one lookup key. A multi-line -/* header becomes one string with embedded newline characters. -/* .sp -/* By default, this processing of header content ends at the -/* first non-header line. +/* header becomes one lookup key with one or more embedded +/* newline characters. /* .sp +/* By default, the \fB-h\fR option generates lookup keys until +/* the first non-header line is reached. /* To simulate \fBheader_checks\fR(5) processing, enable MIME /* parsing with \fB-m\fR. With this, the \fB-h\fR option also -/* generates header-style lookup keys from attachment MIME -/* headers and from attached message/* headers. +/* generates header-style lookup keys for attachment MIME +/* headers and for attached message/* headers. /* .sp /* This feature is available in Postfix version 2.6 and later. /* .IP \fB-i\fR @@ -111,7 +110,7 @@ /* truncate an existing database. By default, \fBpostmap\fR(1) creates /* a new database from the entries in \fBfile_name\fR. /* .IP \fB-m\fR -/* Enable MIME mode mode with "\fB-b\fR" and "\fB-h\fR". +/* Enable MIME parsing with "\fB-b\fR" and "\fB-h\fR". /* .sp /* This feature is available in Postfix version 2.6 and later. /* .IP \fB-N\fR diff --git a/postfix/src/qmgr/qmgr_message.c b/postfix/src/qmgr/qmgr_message.c index f2ad51e7b..f683fe0aa 100644 --- a/postfix/src/qmgr/qmgr_message.c +++ b/postfix/src/qmgr/qmgr_message.c @@ -334,6 +334,7 @@ static int qmgr_message_read(QMGR_MESSAGE *message) int dsn_notify = 0; char *dsn_orcpt = 0; int n; + int have_log_client_attr = 0; /* * Initialize. No early returns or we have a memory leak. @@ -653,18 +654,24 @@ static int qmgr_message_read(QMGR_MESSAGE *message) * client information. To support old queue files we accept both * names for the purpose of logging; the new name overrides the * old one. + * + * XXX Do not use the "legacy" client_name etc. attribute values for + * initializing the logging attributes, when this file already + * contains the "modern" log_client_name etc. logging attributes. + * Otherwise, logging attributes that are not present in the + * queue file would be set with information from the real client. */ else if (strcmp(name, MAIL_ATTR_ACT_CLIENT_NAME) == 0) { - if (message->client_name == 0) + if (have_log_client_attr == 0 && message->client_name == 0) message->client_name = mystrdup(value); } else if (strcmp(name, MAIL_ATTR_ACT_CLIENT_ADDR) == 0) { - if (message->client_addr == 0) + if (have_log_client_attr == 0 && message->client_addr == 0) message->client_addr = mystrdup(value); } else if (strcmp(name, MAIL_ATTR_ACT_PROTO_NAME) == 0) { - if (message->client_proto == 0) + if (have_log_client_attr == 0 && message->client_proto == 0) message->client_proto = mystrdup(value); } else if (strcmp(name, MAIL_ATTR_ACT_HELO_NAME) == 0) { - if (message->client_helo == 0) + if (have_log_client_attr == 0 && message->client_helo == 0) message->client_helo = mystrdup(value); } /* Original client attributes. */ @@ -672,22 +679,27 @@ static int qmgr_message_read(QMGR_MESSAGE *message) if (message->client_name != 0) myfree(message->client_name); message->client_name = mystrdup(value); + have_log_client_attr = 1; } else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_ADDR) == 0) { if (message->client_addr != 0) myfree(message->client_addr); message->client_addr = mystrdup(value); + have_log_client_attr = 1; } else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_PORT) == 0) { if (message->client_port != 0) myfree(message->client_port); message->client_port = mystrdup(value); + have_log_client_attr = 1; } else if (strcmp(name, MAIL_ATTR_LOG_PROTO_NAME) == 0) { if (message->client_proto != 0) myfree(message->client_proto); message->client_proto = mystrdup(value); + have_log_client_attr = 1; } else if (strcmp(name, MAIL_ATTR_LOG_HELO_NAME) == 0) { if (message->client_helo != 0) myfree(message->client_helo); message->client_helo = mystrdup(value); + have_log_client_attr = 1; } else if (strcmp(name, MAIL_ATTR_SASL_METHOD) == 0) { if (message->sasl_method == 0) message->sasl_method = mystrdup(value); diff --git a/postfix/src/smtpd/smtpd_check.c b/postfix/src/smtpd/smtpd_check.c index 796e40a76..65c34e82d 100644 --- a/postfix/src/smtpd/smtpd_check.c +++ b/postfix/src/smtpd/smtpd_check.c @@ -4300,7 +4300,9 @@ static int check_recipient_rcpt_maps(SMTPD_STATE *state, const char *recipient) return (0); if (state->recipient_rcptmap_checked == 1) return (0); - state->recipient_rcptmap_checked = 1; + if (state->warn_if_reject == 0) + /* We really validate the recipient address. */ + state->recipient_rcptmap_checked = 1; return (check_rcpt_maps(state, recipient, SMTPD_NAME_RECIPIENT)); } @@ -4317,7 +4319,9 @@ static int check_sender_rcpt_maps(SMTPD_STATE *state, const char *sender) return (0); if (state->sender_rcptmap_checked == 1) return (0); - state->sender_rcptmap_checked = 1; + if (state->warn_if_reject == 0) + /* We really validate the sender address. */ + state->sender_rcptmap_checked = 1; return (check_rcpt_maps(state, sender, SMTPD_NAME_SENDER)); }