2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-31 22:25:24 +00:00

postfix-2.6-20080411

This commit is contained in:
Wietse Venema
2008-04-11 00:00:00 -05:00
committed by Viktor Dukhovni
parent 9bf0dc8741
commit fef0910080
15 changed files with 213 additions and 159 deletions

1
postfix/.indent.pro vendored
View File

@@ -217,6 +217,7 @@
-TSMTPD_DEFER -TSMTPD_DEFER
-TSMTPD_RBL_EXPAND_CONTEXT -TSMTPD_RBL_EXPAND_CONTEXT
-TSMTPD_RBL_STATE -TSMTPD_RBL_STATE
-TSMTPD_RCPTMAP_ST
-TSMTPD_STATE -TSMTPD_STATE
-TSMTPD_TOKEN -TSMTPD_TOKEN
-TSMTPD_XFORWARD_ATTR -TSMTPD_XFORWARD_ATTR

View File

@@ -14391,7 +14391,7 @@ Apologies for any names omitted.
mistake of indenting if/endif blocks. Files: util/dict_pcre.c, mistake of indenting if/endif blocks. Files: util/dict_pcre.c,
util/dict_regexp.c. util/dict_regexp.c.
20030824 20080324
Cleanup: the event_drain() function is now a proper event Cleanup: the event_drain() function is now a proper event
processing loop. File: util/events.c processing loop. File: util/events.c
@@ -14401,5 +14401,19 @@ Apologies for any names omitted.
message format. Specify -h or -b to use headers or body message format. Specify -h or -b to use headers or body
lines as lookup keys, and specify -hm or -bm to simulate lines as lookup keys, and specify -hm or -bm to simulate
header_checks or body_checks. The postmap -h option (without header_checks or body_checks. The postmap -h option (without
-m) will be compatible with a future postmap -h option. -m) will be compatible with a future postcat -h option.
File: postmap/postmap.c. File: postmap/postmap.c.
20040811
Bugfix (introduced Postfix 2.0): after "warn_if_reject
reject_unlisted_recipient/sender", the SMTP server mistakenly
remembered that recipient/sender validation was already
done. File: smtpd/smtpd_check.c.
Bugfix (introduced Postfix 2.3): the queue manager would
initialize missing client logging attributes (from xforward)
with real client attributes. Fix: enable this backwards
compatibility feature only with queue files that don't
contain logging attributes. Problem reported by Liviu Daia.
Files *qmgr/qmgr_message.c.

View File

@@ -107,7 +107,11 @@ Notes:
value must not contain null or newline. value must not contain null or newline.
* The "instance" attribute value can be used to correlate different requests * The "instance" attribute value can be used to correlate different requests
regarding the same message delivery. 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 * The "size" attribute value specifies the message size that the client
specified in the MAIL FROM command (zero if none was specified). With specified in the MAIL FROM command (zero if none was specified). With

View File

@@ -149,7 +149,12 @@ stress=
and an attribute value must not contain null or newline. </p> and an attribute value must not contain null or newline. </p>
<li> <p> The "instance" attribute value can be used to correlate <li> <p> The "instance" attribute value can be used to correlate
different requests regarding the same message delivery. </p> 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. </p>
<li> <p> The "size" attribute value specifies the message size <li> <p> The "size" attribute value specifies the message size
that the client specified in the MAIL FROM command (zero if that the client specified in the MAIL FROM command (zero if

View File

@@ -109,10 +109,10 @@ BOUNCE(5) BOUNCE(5)
<b>TEMPLATE HEADER FORMAT</b> <b>TEMPLATE HEADER FORMAT</b>
The first portion of a bounce template consists of The first portion of a bounce template consists of
optional template headers. These either become message optional template headers. Some become message headers in
headers in the delivery status notification, or control the delivery status notification; some control the format-
the formatting of the notification. Headers not specified ting of that notification. Headers not specified in a tem-
in a template will be left at their default value. plate will be left at their default value.
The following headers are supported: The following headers are supported:
@@ -126,7 +126,7 @@ BOUNCE(5) BOUNCE(5)
<b>Subject:</b> <b>Subject:</b>
The subject in the message header of the delivery The subject in the message header of the delivery
status notification. status notification that is returned to the sender.
<b>Postmaster-Subject:</b> <b>Postmaster-Subject:</b>
The subject that will be used in Postmaster copies The subject that will be used in Postmaster copies

View File

@@ -67,14 +67,13 @@ POSTMAP(1) POSTMAP(1)
mat. Each line of body content becomes one lookup mat. Each line of body content becomes one lookup
key. key.
By default, this processing of body content starts By default, the <b>-b</b> option starts generating lookup
at the first non-header line, and continues until keys at the first non-header line, and stops when
the end of the message is reached. the end of the message is reached. To simulate
<a href="header_checks.5.html"><b>body_checks</b>(5)</a> processing, enable MIME parsing with
To simulate <a href="header_checks.5.html"><b>body_checks</b>(5)</a> processing, enable MIME <b>-m</b>. With this, the <b>-b</b> option generates no body-
parsing with <b>-m</b>. With this, the <b>-b</b> option generates style lookup keys for attachment MIME headers and
no body-style lookup keys from attachment MIME for attached message/* headers.
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. and later.
@@ -106,15 +105,15 @@ POSTMAP(1) POSTMAP(1)
process the input as if it is an email message in process the input as if it is an email message in
<a href="http://tools.ietf.org/html/rfc2822">RFC 2822</a> format. Each logical header line becomes <a href="http://tools.ietf.org/html/rfc2822">RFC 2822</a> format. Each logical header line becomes
one lookup key. A multi-line header becomes one one lookup key. A multi-line header becomes one
string with embedded newline characters. lookup key with one or more embedded newline char-
acters.
By default, this processing of header content ends By default, the <b>-h</b> option generates lookup keys
at the first non-header line. until the first non-header line is reached. To
simulate <a href="header_checks.5.html"><b>header_checks</b>(5)</a> processing, enable MIME
To simulate <a href="header_checks.5.html"><b>header_checks</b>(5)</a> processing, enable parsing with <b>-m</b>. With this, the <b>-h</b> option also gen-
MIME parsing with <b>-m</b>. With this, the <b>-h</b> option also erates header-style lookup keys for attachment MIME
generates header-style lookup keys from attachment headers and for attached message/* headers.
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. and later.
@@ -124,7 +123,7 @@ POSTMAP(1) POSTMAP(1)
default, <a href="postmap.1.html"><b>postmap</b>(1)</a> creates a new database from the default, <a href="postmap.1.html"><b>postmap</b>(1)</a> creates a new database from the
entries in <b>file_name</b>. entries in <b>file_name</b>.
<b>-m</b> Enable MIME mode mode with "<b>-b</b>" and "<b>-h</b>". <b>-m</b> Enable MIME parsing with "<b>-b</b>" and "<b>-h</b>".
This feature is available in Postfix version 2.6 This feature is available in Postfix version 2.6
and later. and later.

View File

@@ -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 as if it is an email message in RFC 2822 format. Each line
of body content becomes one lookup key. of body content becomes one lookup key.
.sp .sp
By default, this processing of body content starts at the By default, the \fB-b\fR option starts generating lookup
first non-header line, and continues until the end of the keys at the first non-header line, and stops when the end
message is reached. of the message is reached.
.sp
To simulate \fBbody_checks\fR(5) processing, enable MIME To simulate \fBbody_checks\fR(5) processing, enable MIME
parsing with \fB-m\fR. With this, the \fB-b\fR option parsing with \fB-m\fR. With this, the \fB-b\fR option
generates no body-style lookup keys from attachment MIME generates no body-style lookup keys for attachment MIME
headers and from attached message/* headers. headers and for attached message/* headers.
.sp .sp
This feature is available in Postfix version 2.6 and later. This feature is available in Postfix version 2.6 and later.
.IP "\fB-c \fIconfig_dir\fR" .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 from standard input with "\fB-q -\fR", process the input
as if it is an email message in RFC 2822 format. Each as if it is an email message in RFC 2822 format. Each
logical header line becomes one lookup key. A multi-line logical header line becomes one lookup key. A multi-line
header becomes one string with embedded newline characters. header becomes one lookup key with one or more embedded
.sp newline characters.
By default, this processing of header content ends at the
first non-header line.
.sp .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 To simulate \fBheader_checks\fR(5) processing, enable MIME
parsing with \fB-m\fR. With this, the \fB-h\fR option also parsing with \fB-m\fR. With this, the \fB-h\fR option also
generates header-style lookup keys from attachment MIME generates header-style lookup keys for attachment MIME
headers and from attached message/* headers. headers and for attached message/* headers.
.sp .sp
This feature is available in Postfix version 2.6 and later. This feature is available in Postfix version 2.6 and later.
.IP \fB-i\fR .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 truncate an existing database. By default, \fBpostmap\fR(1) creates
a new database from the entries in \fBfile_name\fR. a new database from the entries in \fBfile_name\fR.
.IP \fB-m\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 .sp
This feature is available in Postfix version 2.6 and later. This feature is available in Postfix version 2.6 and later.
.IP \fB-N\fR .IP \fB-N\fR

View File

@@ -122,9 +122,9 @@ directory.
.ad .ad
.fi .fi
The first portion of a bounce template consists of optional The first portion of a bounce template consists of optional
template headers. These either become message headers in template headers. Some become message headers in the
the delivery status notification, or control the formatting delivery status notification; some control the formatting
of the notification. Headers not specified in a template of that notification. Headers not specified in a template
will be left at their default value. will be left at their default value.
The following headers are supported: The following headers are supported:
@@ -136,7 +136,7 @@ The sender address in the message header of the delivery
status notification. status notification.
.IP \fBSubject:\fR .IP \fBSubject:\fR
The subject in the message header of the delivery status The subject in the message header of the delivery status
notification. notification that is returned to the sender.
.IP \fBPostmaster-Subject:\fR .IP \fBPostmaster-Subject:\fR
The subject that will be used in Postmaster copies of The subject that will be used in Postmaster copies of
undeliverable or delayed mail notifications. These copies undeliverable or delayed mail notifications. These copies

View File

@@ -149,7 +149,12 @@ stress=
and an attribute value must not contain null or newline. </p> and an attribute value must not contain null or newline. </p>
<li> <p> The "instance" attribute value can be used to correlate <li> <p> The "instance" attribute value can be used to correlate
different requests regarding the same message delivery. </p> 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. </p>
<li> <p> The "size" attribute value specifies the message size <li> <p> The "size" attribute value specifies the message size
that the client specified in the MAIL FROM command (zero if that the client specified in the MAIL FROM command (zero if

View File

@@ -110,9 +110,9 @@
# .ad # .ad
# .fi # .fi
# The first portion of a bounce template consists of optional # The first portion of a bounce template consists of optional
# template headers. These either become message headers in # template headers. Some become message headers in the
# the delivery status notification, or control the formatting # delivery status notification; some control the formatting
# of the notification. Headers not specified in a template # of that notification. Headers not specified in a template
# will be left at their default value. # will be left at their default value.
# #
# The following headers are supported: # The following headers are supported:
@@ -124,7 +124,7 @@
# status notification. # status notification.
# .IP \fBSubject:\fR # .IP \fBSubject:\fR
# The subject in the message header of the delivery status # The subject in the message header of the delivery status
# notification. # notification that is returned to the sender.
# .IP \fBPostmaster-Subject:\fR # .IP \fBPostmaster-Subject:\fR
# The subject that will be used in Postmaster copies of # The subject that will be used in Postmaster copies of
# undeliverable or delayed mail notifications. These copies # undeliverable or delayed mail notifications. These copies

View File

@@ -20,7 +20,7 @@
* Patches change both the patchlevel and the release date. Snapshots have no * Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only. * patchlevel; they change the release date only.
*/ */
#define MAIL_RELEASE_DATE "20080324" #define MAIL_RELEASE_DATE "20080411"
#define MAIL_VERSION_NUMBER "2.6" #define MAIL_VERSION_NUMBER "2.6"
#ifdef SNAPSHOT #ifdef SNAPSHOT

View File

@@ -311,6 +311,7 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
int dsn_notify = 0; int dsn_notify = 0;
char *dsn_orcpt = 0; char *dsn_orcpt = 0;
int n; int n;
int have_log_client_attr = 0;
/* /*
* Initialize. No early returns or we have a memory leak. * 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 * client information. To support old queue files, we accept both
* names for the purpose of logging; the new name overrides the * names for the purpose of logging; the new name overrides the
* old one. * 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) { 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); message->client_name = mystrdup(value);
} else if (strcmp(name, MAIL_ATTR_ACT_CLIENT_ADDR) == 0) { } 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); message->client_addr = mystrdup(value);
} else if (strcmp(name, MAIL_ATTR_ACT_PROTO_NAME) == 0) { } 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); message->client_proto = mystrdup(value);
} else if (strcmp(name, MAIL_ATTR_ACT_HELO_NAME) == 0) { } 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); message->client_helo = mystrdup(value);
} }
/* Original client attributes. */ /* Original client attributes. */
@@ -631,22 +638,27 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
if (message->client_name != 0) if (message->client_name != 0)
myfree(message->client_name); myfree(message->client_name);
message->client_name = mystrdup(value); message->client_name = mystrdup(value);
have_log_client_attr = 1;
} else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_ADDR) == 0) { } else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_ADDR) == 0) {
if (message->client_addr != 0) if (message->client_addr != 0)
myfree(message->client_addr); myfree(message->client_addr);
message->client_addr = mystrdup(value); message->client_addr = mystrdup(value);
have_log_client_attr = 1;
} else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_PORT) == 0) { } else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_PORT) == 0) {
if (message->client_port != 0) if (message->client_port != 0)
myfree(message->client_port); myfree(message->client_port);
message->client_port = mystrdup(value); message->client_port = mystrdup(value);
have_log_client_attr = 1;
} else if (strcmp(name, MAIL_ATTR_LOG_PROTO_NAME) == 0) { } else if (strcmp(name, MAIL_ATTR_LOG_PROTO_NAME) == 0) {
if (message->client_proto != 0) if (message->client_proto != 0)
myfree(message->client_proto); myfree(message->client_proto);
message->client_proto = mystrdup(value); message->client_proto = mystrdup(value);
have_log_client_attr = 1;
} else if (strcmp(name, MAIL_ATTR_LOG_HELO_NAME) == 0) { } else if (strcmp(name, MAIL_ATTR_LOG_HELO_NAME) == 0) {
if (message->client_helo != 0) if (message->client_helo != 0)
myfree(message->client_helo); myfree(message->client_helo);
message->client_helo = mystrdup(value); message->client_helo = mystrdup(value);
have_log_client_attr = 1;
} else if (strcmp(name, MAIL_ATTR_SASL_METHOD) == 0) { } else if (strcmp(name, MAIL_ATTR_SASL_METHOD) == 0) {
if (message->sasl_method == 0) if (message->sasl_method == 0)
message->sasl_method = mystrdup(value); message->sasl_method = mystrdup(value);

View File

@@ -63,14 +63,13 @@
/* as if it is an email message in RFC 2822 format. Each line /* as if it is an email message in RFC 2822 format. Each line
/* of body content becomes one lookup key. /* of body content becomes one lookup key.
/* .sp /* .sp
/* By default, this processing of body content starts at the /* By default, the \fB-b\fR option starts generating lookup
/* first non-header line, and continues until the end of the /* keys at the first non-header line, and stops when the end
/* message is reached. /* of the message is reached.
/* .sp
/* To simulate \fBbody_checks\fR(5) processing, enable MIME /* To simulate \fBbody_checks\fR(5) processing, enable MIME
/* parsing with \fB-m\fR. With this, the \fB-b\fR option /* parsing with \fB-m\fR. With this, the \fB-b\fR option
/* generates no body-style lookup keys from attachment MIME /* generates no body-style lookup keys for attachment MIME
/* headers and from attached message/* headers. /* headers and for attached message/* headers.
/* .sp /* .sp
/* This feature is available in Postfix version 2.6 and later. /* This feature is available in Postfix version 2.6 and later.
/* .IP "\fB-c \fIconfig_dir\fR" /* .IP "\fB-c \fIconfig_dir\fR"
@@ -95,15 +94,15 @@
/* from standard input with "\fB-q -\fR", process the input /* from standard input with "\fB-q -\fR", process the input
/* as if it is an email message in RFC 2822 format. Each /* as if it is an email message in RFC 2822 format. Each
/* logical header line becomes one lookup key. A multi-line /* logical header line becomes one lookup key. A multi-line
/* header becomes one string with embedded newline characters. /* header becomes one lookup key with one or more embedded
/* .sp /* newline characters.
/* By default, this processing of header content ends at the
/* first non-header line.
/* .sp /* .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 /* To simulate \fBheader_checks\fR(5) processing, enable MIME
/* parsing with \fB-m\fR. With this, the \fB-h\fR option also /* parsing with \fB-m\fR. With this, the \fB-h\fR option also
/* generates header-style lookup keys from attachment MIME /* generates header-style lookup keys for attachment MIME
/* headers and from attached message/* headers. /* headers and for attached message/* headers.
/* .sp /* .sp
/* This feature is available in Postfix version 2.6 and later. /* This feature is available in Postfix version 2.6 and later.
/* .IP \fB-i\fR /* .IP \fB-i\fR
@@ -111,7 +110,7 @@
/* truncate an existing database. By default, \fBpostmap\fR(1) creates /* truncate an existing database. By default, \fBpostmap\fR(1) creates
/* a new database from the entries in \fBfile_name\fR. /* a new database from the entries in \fBfile_name\fR.
/* .IP \fB-m\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 /* .sp
/* This feature is available in Postfix version 2.6 and later. /* This feature is available in Postfix version 2.6 and later.
/* .IP \fB-N\fR /* .IP \fB-N\fR

View File

@@ -334,6 +334,7 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
int dsn_notify = 0; int dsn_notify = 0;
char *dsn_orcpt = 0; char *dsn_orcpt = 0;
int n; int n;
int have_log_client_attr = 0;
/* /*
* Initialize. No early returns or we have a memory leak. * 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 * client information. To support old queue files we accept both
* names for the purpose of logging; the new name overrides the * names for the purpose of logging; the new name overrides the
* old one. * 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) { 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); message->client_name = mystrdup(value);
} else if (strcmp(name, MAIL_ATTR_ACT_CLIENT_ADDR) == 0) { } 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); message->client_addr = mystrdup(value);
} else if (strcmp(name, MAIL_ATTR_ACT_PROTO_NAME) == 0) { } 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); message->client_proto = mystrdup(value);
} else if (strcmp(name, MAIL_ATTR_ACT_HELO_NAME) == 0) { } 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); message->client_helo = mystrdup(value);
} }
/* Original client attributes. */ /* Original client attributes. */
@@ -672,22 +679,27 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
if (message->client_name != 0) if (message->client_name != 0)
myfree(message->client_name); myfree(message->client_name);
message->client_name = mystrdup(value); message->client_name = mystrdup(value);
have_log_client_attr = 1;
} else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_ADDR) == 0) { } else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_ADDR) == 0) {
if (message->client_addr != 0) if (message->client_addr != 0)
myfree(message->client_addr); myfree(message->client_addr);
message->client_addr = mystrdup(value); message->client_addr = mystrdup(value);
have_log_client_attr = 1;
} else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_PORT) == 0) { } else if (strcmp(name, MAIL_ATTR_LOG_CLIENT_PORT) == 0) {
if (message->client_port != 0) if (message->client_port != 0)
myfree(message->client_port); myfree(message->client_port);
message->client_port = mystrdup(value); message->client_port = mystrdup(value);
have_log_client_attr = 1;
} else if (strcmp(name, MAIL_ATTR_LOG_PROTO_NAME) == 0) { } else if (strcmp(name, MAIL_ATTR_LOG_PROTO_NAME) == 0) {
if (message->client_proto != 0) if (message->client_proto != 0)
myfree(message->client_proto); myfree(message->client_proto);
message->client_proto = mystrdup(value); message->client_proto = mystrdup(value);
have_log_client_attr = 1;
} else if (strcmp(name, MAIL_ATTR_LOG_HELO_NAME) == 0) { } else if (strcmp(name, MAIL_ATTR_LOG_HELO_NAME) == 0) {
if (message->client_helo != 0) if (message->client_helo != 0)
myfree(message->client_helo); myfree(message->client_helo);
message->client_helo = mystrdup(value); message->client_helo = mystrdup(value);
have_log_client_attr = 1;
} else if (strcmp(name, MAIL_ATTR_SASL_METHOD) == 0) { } else if (strcmp(name, MAIL_ATTR_SASL_METHOD) == 0) {
if (message->sasl_method == 0) if (message->sasl_method == 0)
message->sasl_method = mystrdup(value); message->sasl_method = mystrdup(value);

View File

@@ -4300,6 +4300,8 @@ static int check_recipient_rcpt_maps(SMTPD_STATE *state, const char *recipient)
return (0); return (0);
if (state->recipient_rcptmap_checked == 1) if (state->recipient_rcptmap_checked == 1)
return (0); return (0);
if (state->warn_if_reject == 0)
/* We really validate the recipient address. */
state->recipient_rcptmap_checked = 1; state->recipient_rcptmap_checked = 1;
return (check_rcpt_maps(state, recipient, SMTPD_NAME_RECIPIENT)); return (check_rcpt_maps(state, recipient, SMTPD_NAME_RECIPIENT));
} }
@@ -4317,6 +4319,8 @@ static int check_sender_rcpt_maps(SMTPD_STATE *state, const char *sender)
return (0); return (0);
if (state->sender_rcptmap_checked == 1) if (state->sender_rcptmap_checked == 1)
return (0); return (0);
if (state->warn_if_reject == 0)
/* We really validate the sender address. */
state->sender_rcptmap_checked = 1; state->sender_rcptmap_checked = 1;
return (check_rcpt_maps(state, sender, SMTPD_NAME_SENDER)); return (check_rcpt_maps(state, sender, SMTPD_NAME_SENDER));
} }