mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-30 05:38:06 +00:00
postfix-2.6-20080411
This commit is contained in:
parent
9bf0dc8741
commit
fef0910080
1
postfix/.indent.pro
vendored
1
postfix/.indent.pro
vendored
@ -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
|
||||||
|
@ -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.
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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,63 +126,63 @@ 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
|
||||||
of undeliverable or delayed mail notifications.
|
of undeliverable or delayed mail notifications.
|
||||||
These copies are sent under control of the
|
These copies are sent under control of the
|
||||||
<a href="postconf.5.html#notify_classes">notify_classes</a> configuration parameter.
|
<a href="postconf.5.html#notify_classes">notify_classes</a> configuration parameter.
|
||||||
|
|
||||||
The usage and specification of template message headers is
|
The usage and specification of template message headers is
|
||||||
subject to the following restrictions:
|
subject to the following restrictions:
|
||||||
|
|
||||||
<b>o</b> Template message header names can be specified in
|
<b>o</b> Template message header names can be specified in
|
||||||
upper case, lower case or mixed case. Postfix
|
upper case, lower case or mixed case. Postfix
|
||||||
always produces bounce message header labels of the
|
always produces bounce message header labels of the
|
||||||
form "<b>From:</b>" and "<b>Subject:</b>".
|
form "<b>From:</b>" and "<b>Subject:</b>".
|
||||||
|
|
||||||
<b>o</b> Template message headers must not span multiple
|
<b>o</b> Template message headers must not span multiple
|
||||||
lines.
|
lines.
|
||||||
|
|
||||||
<b>o</b> Template message headers do not support $parameter
|
<b>o</b> Template message headers do not support $parameter
|
||||||
expansions.
|
expansions.
|
||||||
|
|
||||||
<b>o</b> Template message headers must contain ASCII charac-
|
<b>o</b> 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.
|
ters.
|
||||||
|
|
||||||
<b>TEMPLATE MESSAGE TEXT FORMAT</b>
|
<b>TEMPLATE MESSAGE TEXT FORMAT</b>
|
||||||
The second portion of a bounce template consists of mes-
|
The second portion of a bounce template consists of mes-
|
||||||
sage text. As the above example shows, template message
|
sage text. As the above example shows, template message
|
||||||
text may contain <a href="postconf.5.html">main.cf</a> $parameters. Besides the parame-
|
text may contain <a href="postconf.5.html">main.cf</a> $parameters. Besides the parame-
|
||||||
ters that are defined in <a href="postconf.5.html">main.cf</a>, the following parameters
|
ters that are defined in <a href="postconf.5.html">main.cf</a>, 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.
|
appended to their name.
|
||||||
|
|
||||||
<b>delay_warning_time_</b><i>suffix</i>
|
<b>delay_warning_time_</b><i>suffix</i>
|
||||||
Expands into the value of the <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a></b>
|
Expands into the value of the <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a></b>
|
||||||
parameter, expressed in the time unit specified by
|
parameter, expressed in the time unit specified by
|
||||||
<i>suffix</i>, which is one of <b>seconds</b>, <b>minutes</b>, <b>hours,</b>
|
<i>suffix</i>, which is one of <b>seconds</b>, <b>minutes</b>, <b>hours,</b>
|
||||||
<b>days</b>, or <b>weeks</b>.
|
<b>days</b>, or <b>weeks</b>.
|
||||||
|
|
||||||
<b>maximal_queue_lifetime_</b><i>suffix</i>
|
<b>maximal_queue_lifetime_</b><i>suffix</i>
|
||||||
Expands into the value of the <b><a href="postconf.5.html#maximal_queue_lifetime">maximal_queue_life</a>-</b>
|
Expands into the value of the <b><a href="postconf.5.html#maximal_queue_lifetime">maximal_queue_life</a>-</b>
|
||||||
<b><a href="postconf.5.html#maximal_queue_lifetime">time</a></b> parameter, expressed in the time unit speci-
|
<b><a href="postconf.5.html#maximal_queue_lifetime">time</a></b> parameter, expressed in the time unit speci-
|
||||||
fied by <i>suffix</i>. See above under <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a></b>
|
fied by <i>suffix</i>. See above under <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a></b>
|
||||||
for possible <i>suffix</i> values.
|
for possible <i>suffix</i> values.
|
||||||
|
|
||||||
The usage and specification of template message text is
|
The usage and specification of template message text is
|
||||||
subject to the following restrictions:
|
subject to the following restrictions:
|
||||||
|
|
||||||
<b>o</b> The template message text is not sent in Postmaster
|
<b>o</b> The template message text is not sent in Postmaster
|
||||||
copies of delivery status notifications.
|
copies of delivery status notifications.
|
||||||
|
|
||||||
<b>o</b> If the template message text contains non-ASCII
|
<b>o</b> If the template message text contains non-ASCII
|
||||||
characters, Postfix requires that the <b>Charset:</b> tem-
|
characters, Postfix requires that the <b>Charset:</b> tem-
|
||||||
plate header is updated. Specify an appropriate
|
plate header is updated. Specify an appropriate
|
||||||
superset of US-ASCII. A superset is needed because
|
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.
|
plate when it sends a delivery status notification.
|
||||||
|
|
||||||
<b>SEE ALSO</b>
|
<b>SEE ALSO</b>
|
||||||
@ -190,11 +190,11 @@ BOUNCE(5) BOUNCE(5)
|
|||||||
<a href="postconf.5.html">postconf(5)</a>, configuration parameters
|
<a href="postconf.5.html">postconf(5)</a>, configuration parameters
|
||||||
|
|
||||||
<b>LICENSE</b>
|
<b>LICENSE</b>
|
||||||
The Secure Mailer license must be distributed with this
|
The Secure Mailer license must be distributed with this
|
||||||
software.
|
software.
|
||||||
|
|
||||||
<b>HISTORY</b>
|
<b>HISTORY</b>
|
||||||
The Postfix bounce template format was originally devel-
|
The Postfix bounce template format was originally devel-
|
||||||
oped by Nicolas Riendeau.
|
oped by Nicolas Riendeau.
|
||||||
|
|
||||||
<b>AUTHOR(S)</b>
|
<b>AUTHOR(S)</b>
|
||||||
|
@ -67,168 +67,167 @@ 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
|
||||||
|
<b>-m</b>. With this, the <b>-b</b> option generates no body-
|
||||||
|
style lookup keys for attachment MIME headers and
|
||||||
|
for attached message/* headers.
|
||||||
|
|
||||||
To simulate <a href="header_checks.5.html"><b>body_checks</b>(5)</a> processing, enable MIME
|
This feature is available in Postfix version 2.6
|
||||||
parsing with <b>-m</b>. With this, the <b>-b</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
|
|
||||||
and later.
|
and later.
|
||||||
|
|
||||||
<b>-c</b> <i>config</i><b>_</b><i>dir</i>
|
<b>-c</b> <i>config</i><b>_</b><i>dir</i>
|
||||||
Read the <a href="postconf.5.html"><b>main.cf</b></a> configuration file in the named
|
Read the <a href="postconf.5.html"><b>main.cf</b></a> configuration file in the named
|
||||||
directory instead of the default configuration
|
directory instead of the default configuration
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
<b>-d</b> <i>key</i> Search the specified maps for <i>key</i> and remove one
|
<b>-d</b> <i>key</i> Search the specified maps for <i>key</i> and remove one
|
||||||
entry per map. The exit status is zero when the
|
entry per map. The exit status is zero when the
|
||||||
requested information was found.
|
requested information was found.
|
||||||
|
|
||||||
If a key value of <b>-</b> is specified, the program reads
|
If a key value of <b>-</b> is specified, the program reads
|
||||||
key values from the standard input stream. The exit
|
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.
|
keys was found.
|
||||||
|
|
||||||
<b>-f</b> Do not fold the lookup key to lower case while cre-
|
<b>-f</b> Do not fold the lookup key to lower case while cre-
|
||||||
ating or querying a table.
|
ating or querying a table.
|
||||||
|
|
||||||
With Postfix version 2.3 and later, this option has
|
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
|
case folding is controlled by appending a flag to a
|
||||||
pattern.
|
pattern.
|
||||||
|
|
||||||
<b>-h</b> Enable message header query mode. When reading
|
<b>-h</b> Enable message header query mode. When reading
|
||||||
lookup keys from standard input with "<b>-q -</b>",
|
lookup keys from standard input with "<b>-q -</b>",
|
||||||
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
|
||||||
|
parsing with <b>-m</b>. With this, the <b>-h</b> option also gen-
|
||||||
|
erates header-style lookup keys for attachment MIME
|
||||||
|
headers and for attached message/* headers.
|
||||||
|
|
||||||
To simulate <a href="header_checks.5.html"><b>header_checks</b>(5)</a> processing, enable
|
This feature is available in Postfix version 2.6
|
||||||
MIME parsing with <b>-m</b>. With this, the <b>-h</b> 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
|
|
||||||
and later.
|
and later.
|
||||||
|
|
||||||
<b>-i</b> Incremental mode. Read entries from standard input
|
<b>-i</b> Incremental mode. Read entries from standard input
|
||||||
and do not truncate an existing database. By
|
and do not truncate an existing database. By
|
||||||
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.
|
||||||
|
|
||||||
<b>-N</b> Include the terminating null character that termi-
|
<b>-N</b> Include the terminating null character that termi-
|
||||||
nates lookup keys and values. By default,
|
nates lookup keys and values. By default,
|
||||||
<a href="postmap.1.html"><b>postmap</b>(1)</a> does whatever is the default for the
|
|
||||||
host operating system.
|
|
||||||
|
|
||||||
<b>-n</b> Don't include the terminating null character that
|
|
||||||
terminates lookup keys and values. By default,
|
|
||||||
<a href="postmap.1.html"><b>postmap</b>(1)</a> does whatever is the default for the
|
<a href="postmap.1.html"><b>postmap</b>(1)</a> does whatever is the default for the
|
||||||
host operating system.
|
host operating system.
|
||||||
|
|
||||||
<b>-o</b> Do not release root privileges when processing a
|
<b>-n</b> Don't include the terminating null character that
|
||||||
non-root input file. By default, <a href="postmap.1.html"><b>postmap</b>(1)</a> drops
|
terminates lookup keys and values. By default,
|
||||||
root privileges and runs as the source file owner
|
<a href="postmap.1.html"><b>postmap</b>(1)</a> does whatever is the default for the
|
||||||
|
host operating system.
|
||||||
|
|
||||||
|
<b>-o</b> Do not release root privileges when processing a
|
||||||
|
non-root input file. By default, <a href="postmap.1.html"><b>postmap</b>(1)</a> drops
|
||||||
|
root privileges and runs as the source file owner
|
||||||
instead.
|
instead.
|
||||||
|
|
||||||
<b>-p</b> Do not inherit the file access permissions from the
|
<b>-p</b> Do not inherit the file access permissions from the
|
||||||
input file when creating a new file. Instead, cre-
|
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).
|
(mode 0644).
|
||||||
|
|
||||||
<b>-q</b> <i>key</i> Search the specified maps for <i>key</i> and write the
|
<b>-q</b> <i>key</i> Search the specified maps for <i>key</i> and write the
|
||||||
first value found to the standard output stream.
|
first value found to the standard output stream.
|
||||||
The exit status is zero when the requested informa-
|
The exit status is zero when the requested informa-
|
||||||
tion was found.
|
tion was found.
|
||||||
|
|
||||||
If a key value of <b>-</b> is specified, the program reads
|
If a key value of <b>-</b> is specified, the program reads
|
||||||
key values from the standard input stream and
|
key values from the standard input stream and
|
||||||
writes one line of <i>key value</i> output for each key
|
writes one line of <i>key value</i> output for each key
|
||||||
that was found. The exit status is zero when at
|
that was found. The exit status is zero when at
|
||||||
least one of the requested keys was found.
|
least one of the requested keys was found.
|
||||||
|
|
||||||
<b>-r</b> When updating a table, do not complain about
|
<b>-r</b> When updating a table, do not complain about
|
||||||
attempts to update existing entries, and make those
|
attempts to update existing entries, and make those
|
||||||
updates anyway.
|
updates anyway.
|
||||||
|
|
||||||
<b>-s</b> Retrieve all database elements, and write one line
|
<b>-s</b> Retrieve all database elements, and write one line
|
||||||
of <i>key value</i> output for each element. The elements
|
of <i>key value</i> output for each element. The elements
|
||||||
are printed in database order, which is not neces-
|
are printed in database order, which is not neces-
|
||||||
sarily the same as the original input order.
|
sarily the same as the original input order.
|
||||||
|
|
||||||
This feature is available in Postfix version 2.2
|
This feature is available in Postfix version 2.2
|
||||||
and later, and is not available for all database
|
and later, and is not available for all database
|
||||||
types.
|
types.
|
||||||
|
|
||||||
<b>-v</b> Enable verbose logging for debugging purposes. Mul-
|
<b>-v</b> Enable verbose logging for debugging purposes. Mul-
|
||||||
tiple <b>-v</b> options make the software increasingly
|
tiple <b>-v</b> options make the software increasingly
|
||||||
verbose.
|
verbose.
|
||||||
|
|
||||||
<b>-w</b> When updating a table, do not complain about
|
<b>-w</b> When updating a table, do not complain about
|
||||||
attempts to update existing entries, and ignore
|
attempts to update existing entries, and ignore
|
||||||
those attempts.
|
those attempts.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
<i>file</i><b>_</b><i>type</i>
|
<i>file</i><b>_</b><i>type</i>
|
||||||
The database type. To find out what types are sup-
|
The database type. To find out what types are sup-
|
||||||
ported, use the "<b>postconf -m</b>" command.
|
ported, use the "<b>postconf -m</b>" command.
|
||||||
|
|
||||||
The <a href="postmap.1.html"><b>postmap</b>(1)</a> command can query any supported file
|
The <a href="postmap.1.html"><b>postmap</b>(1)</a> 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:
|
types:
|
||||||
|
|
||||||
<b>btree</b> The output file is a btree file, named
|
<b>btree</b> The output file is a btree file, named
|
||||||
<i>file</i><b>_</b><i>name</i><b>.db</b>. This is available on systems
|
<i>file</i><b>_</b><i>name</i><b>.db</b>. This is available on systems
|
||||||
with support for <b>db</b> databases.
|
with support for <b>db</b> databases.
|
||||||
|
|
||||||
<b>cdb</b> The output consists of one file, named
|
<b>cdb</b> The output consists of one file, named
|
||||||
<i>file</i><b>_</b><i>name</i><b>.cdb</b>. This is available on systems
|
<i>file</i><b>_</b><i>name</i><b>.cdb</b>. This is available on systems
|
||||||
with support for <b>cdb</b> databases.
|
with support for <b>cdb</b> databases.
|
||||||
|
|
||||||
<b>dbm</b> The output consists of two files, named
|
<b>dbm</b> The output consists of two files, named
|
||||||
<i>file</i><b>_</b><i>name</i><b>.pag</b> and <i>file</i><b>_</b><i>name</i><b>.dir</b>. This is
|
<i>file</i><b>_</b><i>name</i><b>.pag</b> and <i>file</i><b>_</b><i>name</i><b>.dir</b>. This is
|
||||||
available on systems with support for <b>dbm</b>
|
available on systems with support for <b>dbm</b>
|
||||||
databases.
|
databases.
|
||||||
|
|
||||||
<b>hash</b> The output file is a hashed file, named
|
<b>hash</b> The output file is a hashed file, named
|
||||||
<i>file</i><b>_</b><i>name</i><b>.db</b>. This is available on systems
|
<i>file</i><b>_</b><i>name</i><b>.db</b>. This is available on systems
|
||||||
with support for <b>db</b> databases.
|
with support for <b>db</b> databases.
|
||||||
|
|
||||||
<b>sdbm</b> The output consists of two files, named
|
<b>sdbm</b> The output consists of two files, named
|
||||||
<i>file</i><b>_</b><i>name</i><b>.pag</b> and <i>file</i><b>_</b><i>name</i><b>.dir</b>. This is
|
<i>file</i><b>_</b><i>name</i><b>.pag</b> and <i>file</i><b>_</b><i>name</i><b>.dir</b>. This is
|
||||||
available on systems with support for <b>sdbm</b>
|
available on systems with support for <b>sdbm</b>
|
||||||
databases.
|
databases.
|
||||||
|
|
||||||
When no <i>file</i><b>_</b><i>type</i> is specified, the software uses
|
When no <i>file</i><b>_</b><i>type</i> is specified, the software uses
|
||||||
the database type specified via the <b><a href="postconf.5.html#default_database_type">default_data</a>-</b>
|
the database type specified via the <b><a href="postconf.5.html#default_database_type">default_data</a>-</b>
|
||||||
<b><a href="postconf.5.html#default_database_type">base_type</a></b> configuration parameter.
|
<b><a href="postconf.5.html#default_database_type">base_type</a></b> configuration parameter.
|
||||||
|
|
||||||
<i>file</i><b>_</b><i>name</i>
|
<i>file</i><b>_</b><i>name</i>
|
||||||
The name of the lookup table source file when
|
The name of the lookup table source file when
|
||||||
rebuilding a database.
|
rebuilding a database.
|
||||||
|
|
||||||
<b>DIAGNOSTICS</b>
|
<b>DIAGNOSTICS</b>
|
||||||
Problems are logged to the standard error stream and to
|
Problems are logged to the standard error stream and to
|
||||||
<b>syslogd</b>(8). No output means that no problems were
|
<b>syslogd</b>(8). No output means that no problems were
|
||||||
detected. Duplicate entries are skipped and are flagged
|
detected. Duplicate entries are skipped and are flagged
|
||||||
with a warning.
|
with a warning.
|
||||||
|
|
||||||
<a href="postmap.1.html"><b>postmap</b>(1)</a> terminates with zero exit status in case of
|
<a href="postmap.1.html"><b>postmap</b>(1)</a> terminates with zero exit status in case of
|
||||||
success (including successful "<b>postmap -q</b>" lookup) and
|
success (including successful "<b>postmap -q</b>" lookup) and
|
||||||
terminates with non-zero exit status in case of failure.
|
terminates with non-zero exit status in case of failure.
|
||||||
|
|
||||||
<b>ENVIRONMENT</b>
|
<b>ENVIRONMENT</b>
|
||||||
@ -239,21 +238,21 @@ POSTMAP(1) POSTMAP(1)
|
|||||||
Enable verbose logging for debugging purposes.
|
Enable verbose logging for debugging purposes.
|
||||||
|
|
||||||
<b>CONFIGURATION PARAMETERS</b>
|
<b>CONFIGURATION PARAMETERS</b>
|
||||||
The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant
|
The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant
|
||||||
to this program. The text below provides only a parameter
|
to this program. The text below provides only a parameter
|
||||||
summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including exam-
|
summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including exam-
|
||||||
ples.
|
ples.
|
||||||
|
|
||||||
<b><a href="postconf.5.html#berkeley_db_create_buffer_size">berkeley_db_create_buffer_size</a> (16777216)</b>
|
<b><a href="postconf.5.html#berkeley_db_create_buffer_size">berkeley_db_create_buffer_size</a> (16777216)</b>
|
||||||
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.
|
create Berkeley DB hash or btree tables.
|
||||||
|
|
||||||
<b><a href="postconf.5.html#berkeley_db_read_buffer_size">berkeley_db_read_buffer_size</a> (131072)</b>
|
<b><a href="postconf.5.html#berkeley_db_read_buffer_size">berkeley_db_read_buffer_size</a> (131072)</b>
|
||||||
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.
|
read Berkeley DB hash or btree tables.
|
||||||
|
|
||||||
<b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
|
<b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
|
||||||
The default location of the Postfix <a href="postconf.5.html">main.cf</a> and
|
The default location of the Postfix <a href="postconf.5.html">main.cf</a> and
|
||||||
<a href="master.5.html">master.cf</a> configuration files.
|
<a href="master.5.html">master.cf</a> configuration files.
|
||||||
|
|
||||||
<b><a href="postconf.5.html#default_database_type">default_database_type</a> (see 'postconf -d' output)</b>
|
<b><a href="postconf.5.html#default_database_type">default_database_type</a> (see 'postconf -d' output)</b>
|
||||||
@ -264,8 +263,8 @@ POSTMAP(1) POSTMAP(1)
|
|||||||
The syslog facility of Postfix logging.
|
The syslog facility of Postfix logging.
|
||||||
|
|
||||||
<b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
|
<b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
|
||||||
The mail system name that is prepended to the
|
The mail system name that is prepended to the
|
||||||
process name in syslog records, so that "smtpd"
|
process name in syslog records, so that "smtpd"
|
||||||
becomes, for example, "postfix/smtpd".
|
becomes, for example, "postfix/smtpd".
|
||||||
|
|
||||||
<b>SEE ALSO</b>
|
<b>SEE ALSO</b>
|
||||||
@ -278,7 +277,7 @@ POSTMAP(1) POSTMAP(1)
|
|||||||
<a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview
|
<a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview
|
||||||
|
|
||||||
<b>LICENSE</b>
|
<b>LICENSE</b>
|
||||||
The Secure Mailer license must be distributed with this
|
The Secure Mailer license must be distributed with this
|
||||||
software.
|
software.
|
||||||
|
|
||||||
<b>AUTHOR(S)</b>
|
<b>AUTHOR(S)</b>
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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);
|
||||||
|
@ -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
|
||||||
|
@ -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);
|
||||||
|
@ -4300,7 +4300,9 @@ 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);
|
||||||
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));
|
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);
|
return (0);
|
||||||
if (state->sender_rcptmap_checked == 1)
|
if (state->sender_rcptmap_checked == 1)
|
||||||
return (0);
|
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));
|
return (check_rcpt_maps(state, sender, SMTPD_NAME_SENDER));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user