2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-30 13:48:06 +00:00

postfix-2.3-20050923

This commit is contained in:
Wietse Venema
2005-09-23 00:00:00 -05:00
committed by Viktor Dukhovni
parent 9526ba7e60
commit 14313fe35c
29 changed files with 556 additions and 171 deletions

View File

@@ -11133,7 +11133,31 @@ Apologies for any names omitted.
Update: common code factored out into db_common.c, and Update: common code factored out into db_common.c, and
adoption of Liviu Daia's connection aware MySQL quoting. adoption of Liviu Daia's connection aware MySQL quoting.
Files: dict_ldap.c, dict_mysql.c, dict_pgsql.c, db_common.c. Patch by Victor Duchovni. Files: dict_ldap.c, dict_mysql.c,
dict_pgsql.c, db_common.c.
20050923
Safety: don't update the local(8) delivery agent's idea of
the Delivered-To: address while expanding aliases or .forward
files. When an alias or .forward file changes the Delivered-To:
address, it ties up one queue file and one cleanup process
instance while mail is being forwarded. To get the old
behavior, specify "frozen_delivered_to = no". Problem
reported by Michael Tokarev, but found independently by
others. Files: local/local.c, local/aliases.c, local/dotforward.c,
local/mailbox.c, local/maildir.c.
Cleanup: while expanding a local(8) alias that has an owner
alias, don't reset the owner-alias information when recursing
into an alias that has no owner alias. This produces better
error reports when delivering mail to nested aliases that
have an owner alias only at the top level. To get the old
behavior, specify "sticky_owner_alias = no". Problem
reported by Victor Duchovni. File: local/alias.c.
Logging: additional SASL debug logging by Andreas Winkelmann.
Files: */*sasl_glue.c.
Open problems: Open problems:

View File

@@ -17,6 +17,22 @@ Incompatibility with Postfix 2.1 and earlier
If you upgrade from Postfix 2.1 or earlier, read RELEASE_NOTES-2.2 If you upgrade from Postfix 2.1 or earlier, read RELEASE_NOTES-2.2
before proceeding. before proceeding.
Incompatibility with snapshot 20050923
======================================
The Postfix local(8) delivery agent no longer updates its idea of
the Delivered-To: address while it expands aliases or .forward
files. With deeply nested aliases or .forward files, this can greatly
reduce the number of queue files and cleanup process instances. To
get the earlier behavior, specify "frozen_delivered_to = no".
While expanding an alias that has an owner alias, the Postfix
local(8) delivery agent no longer resets the owner information when
it expands a subordinate alias that has no owner alias. This
produces better error reporting with nested aliases that have an
owner alias only at the top level. To get the earlier behavior,
specify "sticky_owner_alias = no".
Incompatibility with snapshot 20050828 Incompatibility with snapshot 20050828
====================================== ======================================

View File

@@ -36,7 +36,7 @@ abuse: postmaster
# trap decode to catch security attacks # trap decode to catch security attacks
decode: root decode: root
# ALIASES(5) ALIASES(5) # ALIASES(5) ALIASES(5)
# #
# NAME # NAME
# aliases - Postfix local alias database format # aliases - Postfix local alias database format
@@ -87,38 +87,39 @@ decode: root
# #
# In addition, when an alias exists for owner-name, delivery # In addition, when an alias exists for owner-name, delivery
# diagnostics are directed to that address, instead of to # diagnostics are directed to that address, instead of to
# the originator. This is typically used to direct delivery # the originator of the message. This is typically used to
# errors to the owner of a mailing list, who is in a better # direct delivery errors to the maintainer of a mailing
# position to deal with mailing list delivery problems than # list, who is in a better position to deal with mailing
# the originator of the undelivered mail. # list delivery problems than the originator of the undeliv-
# ered mail.
# #
# The value contains one or more of the following: # The value contains one or more of the following:
# #
# address # address
# Mail is forwarded to address, which is compatible # Mail is forwarded to address, which is compatible
# with the RFC 822 standard. # with the RFC 822 standard.
# #
# /file/name # /file/name
# Mail is appended to /file/name. See local(8) for # Mail is appended to /file/name. See local(8) for
# details of delivery to file. Delivery is not lim- # details of delivery to file. Delivery is not lim-
# ited to regular files. For example, to dispose of # ited to regular files. For example, to dispose of
# unwanted mail, deflect it to /dev/null. # unwanted mail, deflect it to /dev/null.
# #
# |command # |command
# Mail is piped into command. Commands that contain # Mail is piped into command. Commands that contain
# special characters, such as whitespace, should be # special characters, such as whitespace, should be
# enclosed between double quotes. See local(8) for # enclosed between double quotes. See local(8) for
# details of delivery to command. # details of delivery to command.
# #
# When the command fails, a limited amount of command # When the command fails, a limited amount of command
# output is mailed back to the sender. The file # output is mailed back to the sender. The file
# /usr/include/sysexits.h defines the expected exit # /usr/include/sysexits.h defines the expected exit
# status codes. For example, use |"exit 67" to simu- # status codes. For example, use |"exit 67" to simu-
# late a "user unknown" error, and |"exit 0" to # late a "user unknown" error, and |"exit 0" to
# implement an expensive black hole. # implement an expensive black hole.
# #
# :include:/file/name # :include:/file/name
# Mail is sent to the destinations listed in the # Mail is sent to the destinations listed in the
# named file. Lines in :include: files have the same # named file. Lines in :include: files have the same
# syntax as the right-hand side of alias entries. # syntax as the right-hand side of alias entries.
# #
@@ -130,67 +131,82 @@ decode: root
# #
# ADDRESS EXTENSION # ADDRESS EXTENSION
# When alias database search fails, and the recipient local- # When alias database search fails, and the recipient local-
# part contains the optional recipient delimiter (e.g., # part contains the optional recipient delimiter (e.g.,
# user+foo), the search is repeated for the unextended # user+foo), the search is repeated for the unextended
# address (e.g., user). # address (e.g., user).
# #
# The propagate_unmatched_extensions parameter controls # The propagate_unmatched_extensions parameter controls
# whether an unmatched address extension (+foo) is propa- # whether an unmatched address extension (+foo) is propa-
# gated to the result of table lookup. # gated to the result of table lookup.
# #
# SECURITY # SECURITY
# The local(8) delivery agent disallows regular expression # The local(8) delivery agent disallows regular expression
# substitution of $1 etc. in alias_maps, because that would # substitution of $1 etc. in alias_maps, because that would
# open a security hole. # open a security hole.
# #
# The local(8) delivery agent will silently ignore requests # The local(8) delivery agent will silently ignore requests
# to use the proxymap(8) server within alias_maps. Instead # to use the proxymap(8) server within alias_maps. Instead
# it will open the table directly. Before Postfix version # it will open the table directly. Before Postfix version
# 2.2, the local(8) delivery agent will terminate with a # 2.2, the local(8) delivery agent will terminate with a
# fatal error. # fatal error.
# #
# CONFIGURATION PARAMETERS # CONFIGURATION PARAMETERS
# The following main.cf parameters are especially relevant. # The following main.cf parameters are especially relevant.
# The text below provides only a parameter summary. See # The text below provides only a parameter summary. See
# postconf(5) for more details including examples. # postconf(5) for more details including examples.
# #
# alias_database # alias_database
# List of alias databases that are updated by the # List of alias databases that are updated by the
# newaliases(1) command. # newaliases(1) command.
# #
# alias_maps # alias_maps
# List of alias databases queried by the local(8) # List of alias databases queried by the local(8)
# delivery agent. # delivery agent.
# #
# allow_mail_to_commands # allow_mail_to_commands
# Restrict the usage of mail delivery to external # Restrict the usage of mail delivery to external
# command. # command.
# #
# allow_mail_to_files # allow_mail_to_files
# Restrict the usage of mail delivery to external # Restrict the usage of mail delivery to external
# file. # file.
# #
# expand_owner_alias # expand_owner_alias
# When delivering to an alias that has an owner- com- # When delivering to an alias that has an owner- com-
# panion alias, set the envelope sender address to # panion alias, set the envelope sender address to
# the right-hand side of the owner alias, instead # the right-hand side of the owner alias, instead
# using of the left-hand side address. # using of the left-hand side address.
# #
# propagate_unmatched_extensions # propagate_unmatched_extensions
# A list of address rewriting or forwarding mecha- # A list of address rewriting or forwarding mecha-
# nisms that propagate an address extension from the # nisms that propagate an address extension from the
# original address to the result. Specify zero or # original address to the result. Specify zero or
# more of canonical, virtual, alias, forward, # more of canonical, virtual, alias, forward,
# include, or generic. # include, or generic.
# #
# owner_request_special # owner_request_special
# Give special treatment to owner-listname and list- # Give special treatment to owner-listname and list-
# name-request addresses. # name-request addresses.
# #
# recipient_delimiter # recipient_delimiter
# Delimiter that separates recipients from address # Delimiter that separates recipients from address
# extensions. # extensions.
# #
# Available in Postfix version 2.3 and later:
#
# frozen_delivered_to
# Update the local(8) delivery agent's Delivered-To:
# address (see prepend_delivered_header) only once,
# at the start of a delivery; do not update the
# Delivered-To: address while expanding aliases or
# .forward files.
#
# sticky_owner_alias
# When expanding a local(8) alias that has an owner
# alias (see owner-name discussion above), use the
# owner information even when the expansion invokes a
# subordinate alias that has no owner alias.
#
# STANDARDS # STANDARDS
# RFC 822 (ARPA Internet Text Messages) # RFC 822 (ARPA Internet Text Messages)
# #
@@ -215,4 +231,4 @@ decode: root
# P.O. Box 704 # P.O. Box 704
# Yorktown Heights, NY 10598, USA # Yorktown Heights, NY 10598, USA
# #
# ALIASES(5) # ALIASES(5)

View File

@@ -55,38 +55,39 @@ ALIASES(5) ALIASES(5)
In addition, when an alias exists for <b>owner-</b><i>name</i>, delivery In addition, when an alias exists for <b>owner-</b><i>name</i>, delivery
diagnostics are directed to that address, instead of to diagnostics are directed to that address, instead of to
the originator. This is typically used to direct delivery the originator of the message. This is typically used to
errors to the owner of a mailing list, who is in a better direct delivery errors to the maintainer of a mailing
position to deal with mailing list delivery problems than list, who is in a better position to deal with mailing
the originator of the undelivered mail. list delivery problems than the originator of the undeliv-
ered mail.
The <i>value</i> contains one or more of the following: The <i>value</i> contains one or more of the following:
<i>address</i> <i>address</i>
Mail is forwarded to <i>address</i>, which is compatible Mail is forwarded to <i>address</i>, which is compatible
with the <a href="http://www.faqs.org/rfcs/rfc822.html">RFC 822</a> standard. with the <a href="http://www.faqs.org/rfcs/rfc822.html">RFC 822</a> standard.
<i>/file/name</i> <i>/file/name</i>
Mail is appended to <i>/file/name</i>. See <a href="local.8.html"><b>local</b>(8)</a> for Mail is appended to <i>/file/name</i>. See <a href="local.8.html"><b>local</b>(8)</a> for
details of delivery to file. Delivery is not lim- details of delivery to file. Delivery is not lim-
ited to regular files. For example, to dispose of ited to regular files. For example, to dispose of
unwanted mail, deflect it to <b>/dev/null</b>. unwanted mail, deflect it to <b>/dev/null</b>.
|<i>command</i> |<i>command</i>
Mail is piped into <i>command</i>. Commands that contain Mail is piped into <i>command</i>. Commands that contain
special characters, such as whitespace, should be special characters, such as whitespace, should be
enclosed between double quotes. See <a href="local.8.html"><b>local</b>(8)</a> for enclosed between double quotes. See <a href="local.8.html"><b>local</b>(8)</a> for
details of delivery to command. details of delivery to command.
When the command fails, a limited amount of command When the command fails, a limited amount of command
output is mailed back to the sender. The file output is mailed back to the sender. The file
<b>/usr/include/sysexits.h</b> defines the expected exit <b>/usr/include/sysexits.h</b> defines the expected exit
status codes. For example, use <b>|"exit 67"</b> to simu- status codes. For example, use <b>|"exit 67"</b> to simu-
late a "user unknown" error, and <b>|"exit 0"</b> to late a "user unknown" error, and <b>|"exit 0"</b> to
implement an expensive black hole. implement an expensive black hole.
<b>:include:</b><i>/file/name</i> <b>:include:</b><i>/file/name</i>
Mail is sent to the destinations listed in the Mail is sent to the destinations listed in the
named file. Lines in <b>:include:</b> files have the same named file. Lines in <b>:include:</b> files have the same
syntax as the right-hand side of alias entries. syntax as the right-hand side of alias entries.
@@ -98,67 +99,82 @@ ALIASES(5) ALIASES(5)
<b>ADDRESS EXTENSION</b> <b>ADDRESS EXTENSION</b>
When alias database search fails, and the recipient local- When alias database search fails, and the recipient local-
part contains the optional recipient delimiter (e.g., part contains the optional recipient delimiter (e.g.,
<i>user+foo</i>), the search is repeated for the unextended <i>user+foo</i>), the search is repeated for the unextended
address (e.g., <i>user</i>). address (e.g., <i>user</i>).
The <b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a></b> parameter controls The <b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a></b> parameter controls
whether an unmatched address extension (<i>+foo</i>) is propa- whether an unmatched address extension (<i>+foo</i>) is propa-
gated to the result of table lookup. gated to the result of table lookup.
<b>SECURITY</b> <b>SECURITY</b>
The <a href="local.8.html"><b>local</b>(8)</a> delivery agent disallows regular expression The <a href="local.8.html"><b>local</b>(8)</a> delivery agent disallows regular expression
substitution of $1 etc. in <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>, because that would substitution of $1 etc. in <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>, because that would
open a security hole. open a security hole.
The <a href="local.8.html"><b>local</b>(8)</a> delivery agent will silently ignore requests The <a href="local.8.html"><b>local</b>(8)</a> delivery agent will silently ignore requests
to use the <a href="proxymap.8.html"><b>proxymap</b>(8)</a> server within <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>. Instead to use the <a href="proxymap.8.html"><b>proxymap</b>(8)</a> server within <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>. Instead
it will open the table directly. Before Postfix version it will open the table directly. Before Postfix version
2.2, the <a href="local.8.html"><b>local</b>(8)</a> delivery agent will terminate with a 2.2, the <a href="local.8.html"><b>local</b>(8)</a> delivery agent will terminate with a
fatal error. fatal error.
<b>CONFIGURATION PARAMETERS</b> <b>CONFIGURATION PARAMETERS</b>
The following <b>main.cf</b> parameters are especially relevant. The following <b>main.cf</b> parameters are especially relevant.
The text below provides only a parameter summary. See The text below provides only a parameter summary. See
<a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including examples. <a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including examples.
<b><a href="postconf.5.html#alias_database">alias_database</a></b> <b><a href="postconf.5.html#alias_database">alias_database</a></b>
List of alias databases that are updated by the List of alias databases that are updated by the
<a href="newaliases.1.html"><b>newaliases</b>(1)</a> command. <a href="newaliases.1.html"><b>newaliases</b>(1)</a> command.
<b><a href="postconf.5.html#alias_maps">alias_maps</a></b> <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>
List of alias databases queried by the <a href="local.8.html"><b>local</b>(8)</a> List of alias databases queried by the <a href="local.8.html"><b>local</b>(8)</a>
delivery agent. delivery agent.
<b><a href="postconf.5.html#allow_mail_to_commands">allow_mail_to_commands</a></b> <b><a href="postconf.5.html#allow_mail_to_commands">allow_mail_to_commands</a></b>
Restrict the usage of mail delivery to external Restrict the usage of mail delivery to external
command. command.
<b><a href="postconf.5.html#allow_mail_to_files">allow_mail_to_files</a></b> <b><a href="postconf.5.html#allow_mail_to_files">allow_mail_to_files</a></b>
Restrict the usage of mail delivery to external Restrict the usage of mail delivery to external
file. file.
<b><a href="postconf.5.html#expand_owner_alias">expand_owner_alias</a></b> <b><a href="postconf.5.html#expand_owner_alias">expand_owner_alias</a></b>
When delivering to an alias that has an <b>owner-</b> com- When delivering to an alias that has an <b>owner-</b> com-
panion alias, set the envelope sender address to panion alias, set the envelope sender address to
the right-hand side of the owner alias, instead the right-hand side of the owner alias, instead
using of the left-hand side address. using of the left-hand side address.
<b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a></b> <b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a></b>
A list of address rewriting or forwarding mecha- A list of address rewriting or forwarding mecha-
nisms that propagate an address extension from the nisms that propagate an address extension from the
original address to the result. Specify zero or original address to the result. Specify zero or
more of <b>canonical</b>, <b>virtual</b>, <b>alias</b>, <b>forward</b>, more of <b>canonical</b>, <b>virtual</b>, <b>alias</b>, <b>forward</b>,
<b>include</b>, or <b>generic</b>. <b>include</b>, or <b>generic</b>.
<b><a href="postconf.5.html#owner_request_special">owner_request_special</a></b> <b><a href="postconf.5.html#owner_request_special">owner_request_special</a></b>
Give special treatment to <b>owner-</b><i>listname</i> and <i>list-</i> Give special treatment to <b>owner-</b><i>listname</i> and <i>list-</i>
<i>name</i><b>-request</b> addresses. <i>name</i><b>-request</b> addresses.
<b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a></b> <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a></b>
Delimiter that separates recipients from address Delimiter that separates recipients from address
extensions. extensions.
Available in Postfix version 2.3 and later:
<b><a href="postconf.5.html#frozen_delivered_to">frozen_delivered_to</a></b>
Update the <a href="local.8.html">local(8)</a> delivery agent's Delivered-To:
address (see <a href="postconf.5.html#prepend_delivered_header">prepend_delivered_header</a>) only once,
at the start of a delivery; do not update the
Delivered-To: address while expanding aliases or
.forward files.
<b><a href="postconf.5.html#sticky_owner_alias">sticky_owner_alias</a></b>
When expanding a <a href="local.8.html">local(8)</a> alias that has an owner
alias (see owner-<i>name</i> discussion above), use the
owner information even when the expansion invokes a
subordinate alias that has no owner alias.
<b>STANDARDS</b> <b>STANDARDS</b>
<a href="http://www.faqs.org/rfcs/rfc822.html">RFC 822</a> (ARPA Internet Text Messages) <a href="http://www.faqs.org/rfcs/rfc822.html">RFC 822</a> (ARPA Internet Text Messages)

View File

@@ -377,6 +377,22 @@ LOCAL(8) LOCAL(8)
<b><a href="postconf.5.html#sun_mailtool_compatibility">sun_mailtool_compatibility</a> (no)</b> <b><a href="postconf.5.html#sun_mailtool_compatibility">sun_mailtool_compatibility</a> (no)</b>
Obsolete SUN mailtool compatibility feature. Obsolete SUN mailtool compatibility feature.
Available in Postfix version 2.3 and later:
<b><a href="postconf.5.html#frozen_delivered_to">frozen_delivered_to</a> (yes)</b>
Update the <a href="local.8.html"><b>local</b>(8)</a> delivery agent's idea of the
Delivered-To: address (see prepend_deliv-
ered_header) only once, at the start of a delivery
attempt; do not update the Delivered-To: address
while expanding aliases or .forward files.
<b><a href="postconf.5.html#sticky_owner_alias">sticky_owner_alias</a> (yes)</b>
When expanding a <a href="local.8.html"><b>local</b>(8)</a> alias that has an owner
alias (see owner-<i>name</i> discussion in <a href="aliases.5.html"><b>aliases</b>(5)</a>),
use the owner information even when the expansion
invokes a subordinate alias that has no owner
alias.
<b>DELIVERY METHOD CONTROLS</b> <b>DELIVERY METHOD CONTROLS</b>
The precedence of <a href="local.8.html"><b>local</b>(8)</a> delivery methods from high to The precedence of <a href="local.8.html"><b>local</b>(8)</a> delivery methods from high to
low is: aliases, .forward files, <a href="postconf.5.html#mailbox_transport">mailbox_transport</a>, <a href="postconf.5.html#mailbox_command_maps">mail</a>- low is: aliases, .forward files, <a href="postconf.5.html#mailbox_transport">mailbox_transport</a>, <a href="postconf.5.html#mailbox_command_maps">mail</a>-
@@ -536,22 +552,23 @@ LOCAL(8) LOCAL(8)
<b><a href="postconf.5.html#prepend_delivered_header">prepend_delivered_header</a> (command, file, forward)</b> <b><a href="postconf.5.html#prepend_delivered_header">prepend_delivered_header</a> (command, file, forward)</b>
The message delivery contexts where the Postfix The message delivery contexts where the Postfix
<a href="local.8.html"><b>local</b>(8)</a> delivery agent prepends a Delivered-To: <a href="local.8.html"><b>local</b>(8)</a> delivery agent prepends a Delivered-To:
message header. message header with the address that the mail was
delivered to.
<b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b> <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
The process ID of a Postfix command or daemon The process ID of a Postfix command or daemon
process. process.
<b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b> <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
The process name of a Postfix command or daemon The process name of a Postfix command or daemon
process. process.
<b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a> (canonical, virtual)</b> <b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a> (canonical, virtual)</b>
What address lookup tables copy an address exten- What address lookup tables copy an address exten-
sion from the lookup key to the lookup result. sion from the lookup key to the lookup result.
<b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b> <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
The location of the Postfix top-level queue direc- The location of the Postfix top-level queue direc-
tory. tory.
<b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> (empty)</b> <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> (empty)</b>
@@ -559,15 +576,15 @@ LOCAL(8) LOCAL(8)
sions (user+foo). sions (user+foo).
<b><a href="postconf.5.html#require_home_directory">require_home_directory</a> (no)</b> <b><a href="postconf.5.html#require_home_directory">require_home_directory</a> (no)</b>
Whether or not a <a href="local.8.html"><b>local</b>(8)</a> recipient's home direc- Whether or not a <a href="local.8.html"><b>local</b>(8)</a> recipient's home direc-
tory must exist before mail delivery is attempted. tory must exist before mail delivery is attempted.
<b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b> <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
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>FILES</b> <b>FILES</b>
@@ -587,14 +604,14 @@ LOCAL(8) LOCAL(8)
syslogd(8), system logging syslogd(8), system logging
<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 <b>Delivered-To:</b> message header appears in the <b>qmail</b> sys- The <b>Delivered-To:</b> message header appears in the <b>qmail</b> sys-
tem by Daniel Bernstein. tem by Daniel Bernstein.
The <i>maildir</i> structure appears in the <b>qmail</b> system by The <i>maildir</i> structure appears in the <b>qmail</b> system by
Daniel Bernstein. Daniel Bernstein.
<b>AUTHOR(S)</b> <b>AUTHOR(S)</b>

View File

@@ -2474,6 +2474,24 @@ Examples:
</pre> </pre>
</DD>
<DT><b><a name="frozen_delivered_to">frozen_delivered_to</a>
(default: yes)</b></DT><DD>
<p> Update the <a href="local.8.html">local(8)</a> delivery agent's idea of the Delivered-To:
address (see <a href="postconf.5.html#prepend_delivered_header">prepend_delivered_header</a>) only once, at the start of
a delivery attempt; do not update the Delivered-To: address while
expanding aliases or .forward files. </p>
<p> This feature is available in Postfix 2.3 and later. With older
Postfix releases, the behavior is as if this parameter is set to
"no". The old setting can be expensive with deeply nested aliases
or .forward files. When an alias or .forward file changes the
Delivered-To: address, it ties up one queue file and one cleanup
process instance while mail is being forwarded. </p>
</DD> </DD>
<DT><b><a name="hash_queue_depth">hash_queue_depth</a> <DT><b><a name="hash_queue_depth">hash_queue_depth</a>
@@ -4636,10 +4654,10 @@ This feature is available in Postfix 2.0 and later.
<DT><b><a name="prepend_delivered_header">prepend_delivered_header</a> <DT><b><a name="prepend_delivered_header">prepend_delivered_header</a>
(default: command, file, forward)</b></DT><DD> (default: command, file, forward)</b></DT><DD>
<p> <p> The message delivery contexts where the Postfix <a href="local.8.html">local(8)</a> delivery
The message delivery contexts where the Postfix <a href="local.8.html">local(8)</a> delivery agent prepends a Delivered-To: message header with the address
agent prepends a Delivered-To: message header. that the mail was delivered to. This information is used for mail
</p> delivery loop detection. </p>
<p> <p>
By default, the Postfix local delivery agent prepends a Delivered-To: By default, the Postfix local delivery agent prepends a Delivered-To:
@@ -9131,6 +9149,22 @@ The default time unit is s (seconds).
</p> </p>
</DD>
<DT><b><a name="sticky_owner_alias">sticky_owner_alias</a>
(default: yes)</b></DT><DD>
<p> When expanding a <a href="local.8.html">local(8)</a> alias that has an owner alias (see
owner-<i>name</i> discussion in <a href="aliases.5.html">aliases(5)</a>), use the owner information
even when the expansion invokes a subordinate alias that has no
owner alias. </p>
<p> This feature is available in Postfix 2.3 and later. With older
Postfix releases, the behavior is as if this parameter is set to
"no". The old setting provides poorer error reporting with nested
aliases that only have an owner alias at the top level. </p>
</DD> </DD>
<DT><b><a name="strict_7bit_headers">strict_7bit_headers</a> <DT><b><a name="strict_7bit_headers">strict_7bit_headers</a>

View File

@@ -51,6 +51,11 @@ QMQP-SOURCE(1) QMQP-SOURCE(1)
<b>-m</b> <i>message</i><b>_</b><i>count</i> <b>-m</b> <i>message</i><b>_</b><i>count</i>
Send the specified number of messages (default: 1). Send the specified number of messages (default: 1).
<b>-M</b> <i><a href="postconf.5.html#myhostname">myhostname</a></i>
Use the specified hostname or [address] in the
default sender and recipient addresses, instead of
the machine hostname.
<b>-r</b> <i>recipient</i><b>_</b><i>count</i> <b>-r</b> <i>recipient</i><b>_</b><i>count</i>
Send the specified number of recipients per trans- Send the specified number of recipients per trans-
action (default: 1). Recipient names are generated action (default: 1). Recipient names are generated
@@ -68,6 +73,9 @@ QMQP-SOURCE(1) QMQP-SOURCE(1)
between messages. Suspending one thread does not between messages. Suspending one thread does not
affect other delivery threads. affect other delivery threads.
<b>-v</b> Make the program more verbose, for debugging pur-
poses.
<b>-w</b> <i>interval</i> <b>-w</b> <i>interval</i>
Wait a fixed time between messages. Suspending one Wait a fixed time between messages. Suspending one
thread does not affect other delivery threads. thread does not affect other delivery threads.
@@ -76,7 +84,7 @@ QMQP-SOURCE(1) QMQP-SOURCE(1)
<a href="qmqp-sink.1.html">qmqp-sink(1)</a>, QMQP message dump <a href="qmqp-sink.1.html">qmqp-sink(1)</a>, QMQP message dump
<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>

View File

@@ -48,11 +48,8 @@ SMTP-SOURCE(1) SMTP-SOURCE(1)
Use the specified sender address (default: Use the specified sender address (default:
&lt;foo@<a href="postconf.5.html#myhostname">myhostname</a>&gt;). &lt;foo@<a href="postconf.5.html#myhostname">myhostname</a>&gt;).
<b>-o</b> Old mode: don't send HELO, and don't send message
headers.
<b>-l</b> <i>length</i> <b>-l</b> <i>length</i>
Send <i>length</i> bytes as message payload. The length Send <i>length</i> bytes as message payload. The length
does not include message headers. does not include message headers.
<b>-L</b> Speak LMTP rather than SMTP. <b>-L</b> Speak LMTP rather than SMTP.
@@ -60,13 +57,21 @@ SMTP-SOURCE(1) SMTP-SOURCE(1)
<b>-m</b> <i>message</i><b>_</b><i>count</i> <b>-m</b> <i>message</i><b>_</b><i>count</i>
Send the specified number of messages (default: 1). Send the specified number of messages (default: 1).
<b>-N</b> Prepend a non-repeating sequence number to each <b>-M</b> <i><a href="postconf.5.html#myhostname">myhostname</a></i>
recipient address. This avoids the artificial 100% Use the specified hostname or [address] in the HELO
hit rate in the resolve and rewrite client caches command and in the default sender and recipient
and exercises the trivial-rewrite daemon, better addresses, instead of the machine hostname.
approximating Postfix performance under real-life
<b>-N</b> Prepend a non-repeating sequence number to each
recipient address. This avoids the artificial 100%
hit rate in the resolve and rewrite client caches
and exercises the trivial-rewrite daemon, better
approximating Postfix performance under real-life
work-loads. work-loads.
<b>-o</b> Old mode: don't send HELO, and don't send message
headers.
<b>-r</b> <i>recipient</i><b>_</b><i>count</i> <b>-r</b> <i>recipient</i><b>_</b><i>count</i>
Send the specified number of recipients per trans- Send the specified number of recipients per trans-
action (default: 1). Recipient names are generated action (default: 1). Recipient names are generated
@@ -88,12 +93,15 @@ SMTP-SOURCE(1) SMTP-SOURCE(1)
between messages. Suspending one thread does not between messages. Suspending one thread does not
affect other delivery threads. affect other delivery threads.
<b>-v</b> Make the program more verbose, for debugging pur-
poses.
<b>-w</b> <i>interval</i> <b>-w</b> <i>interval</i>
Wait a fixed time between messages. Suspending one Wait a fixed time between messages. Suspending one
thread does not affect other delivery threads. thread does not affect other delivery threads.
[<b>inet:</b>]<i>host</i>[:<i>port</i>] [<b>inet:</b>]<i>host</i>[:<i>port</i>]
Connect via TCP to host <i>host</i>, port <i>port</i>. The Connect via TCP to host <i>host</i>, port <i>port</i>. The
default port is <b>smtp</b>. default port is <b>smtp</b>.
<b>unix:</b><i>pathname</i> <b>unix:</b><i>pathname</i>
@@ -106,7 +114,7 @@ SMTP-SOURCE(1) SMTP-SOURCE(1)
<a href="smtp-sink.1.html">smtp-sink(1)</a>, SMTP/LMTP message dump <a href="smtp-sink.1.html">smtp-sink(1)</a>, SMTP/LMTP message dump
<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>

View File

@@ -43,6 +43,10 @@ Send \fIlength\fR bytes as message payload. The length
includes the message headers. includes the message headers.
.IP "\fB-m \fImessage_count\fR" .IP "\fB-m \fImessage_count\fR"
Send the specified number of messages (default: 1). Send the specified number of messages (default: 1).
.IP "\fB-M \fImyhostname\fR"
Use the specified hostname or [address] in the default
sender and recipient addresses, instead of the machine
hostname.
.IP "\fB-r \fIrecipient_count\fR" .IP "\fB-r \fIrecipient_count\fR"
Send the specified number of recipients per transaction (default: 1). Send the specified number of recipients per transaction (default: 1).
Recipient names are generated by prepending a number to the Recipient names are generated by prepending a number to the
@@ -54,6 +58,8 @@ Use the specified recipient address (default: <foo@myhostname>).
.IP "\fB-R \fIinterval\fR" .IP "\fB-R \fIinterval\fR"
Wait for a random period of time 0 <= n <= interval between messages. Wait for a random period of time 0 <= n <= interval between messages.
Suspending one thread does not affect other delivery threads. Suspending one thread does not affect other delivery threads.
.IP \fB-v\fR
Make the program more verbose, for debugging purposes.
.IP "\fB-w \fIinterval\fR" .IP "\fB-w \fIinterval\fR"
Wait a fixed time between messages. Wait a fixed time between messages.
Suspending one thread does not affect other delivery threads. Suspending one thread does not affect other delivery threads.

View File

@@ -43,8 +43,6 @@ Don't disconnect after sending a message; send the next
message over the same connection. message over the same connection.
.IP "\fB-f \fIfrom\fR" .IP "\fB-f \fIfrom\fR"
Use the specified sender address (default: <foo@myhostname>). Use the specified sender address (default: <foo@myhostname>).
.IP \fB-o\fR
Old mode: don't send HELO, and don't send message headers.
.IP "\fB-l \fIlength\fR" .IP "\fB-l \fIlength\fR"
Send \fIlength\fR bytes as message payload. The length does not Send \fIlength\fR bytes as message payload. The length does not
include message headers. include message headers.
@@ -52,12 +50,18 @@ include message headers.
Speak LMTP rather than SMTP. Speak LMTP rather than SMTP.
.IP "\fB-m \fImessage_count\fR" .IP "\fB-m \fImessage_count\fR"
Send the specified number of messages (default: 1). Send the specified number of messages (default: 1).
.IP "\fB-M \fImyhostname\fR"
Use the specified hostname or [address] in the HELO command
and in the default sender and recipient addresses, instead
of the machine hostname.
.IP "\fB-N\fR" .IP "\fB-N\fR"
Prepend a non-repeating sequence number to each recipient Prepend a non-repeating sequence number to each recipient
address. This avoids the artificial 100% hit rate in the address. This avoids the artificial 100% hit rate in the
resolve and rewrite client caches and exercises the resolve and rewrite client caches and exercises the
trivial-rewrite daemon, better approximating Postfix trivial-rewrite daemon, better approximating Postfix
performance under real-life work-loads. performance under real-life work-loads.
.IP \fB-o\fR
Old mode: don't send HELO, and don't send message headers.
.IP "\fB-r \fIrecipient_count\fR" .IP "\fB-r \fIrecipient_count\fR"
Send the specified number of recipients per transaction (default: 1). Send the specified number of recipients per transaction (default: 1).
Recipient names are generated by prepending a number to the Recipient names are generated by prepending a number to the
@@ -71,6 +75,8 @@ Use the specified recipient address (default: <foo@myhostname>).
.IP "\fB-R \fIinterval\fR" .IP "\fB-R \fIinterval\fR"
Wait for a random period of time 0 <= n <= interval between messages. Wait for a random period of time 0 <= n <= interval between messages.
Suspending one thread does not affect other delivery threads. Suspending one thread does not affect other delivery threads.
.IP \fB-v\fR
Make the program more verbose, for debugging purposes.
.IP "\fB-w \fIinterval\fR" .IP "\fB-w \fIinterval\fR"
Wait a fixed time between messages. Wait a fixed time between messages.
Suspending one thread does not affect other delivery threads. Suspending one thread does not affect other delivery threads.

View File

@@ -52,8 +52,9 @@ such as whitespace, `#', `:', or `@'. The \fIname\fR is folded to
lowercase, in order to make database lookups case insensitive. lowercase, in order to make database lookups case insensitive.
.PP .PP
In addition, when an alias exists for \fBowner-\fIname\fR, delivery In addition, when an alias exists for \fBowner-\fIname\fR, delivery
diagnostics are directed to that address, instead of to the originator. diagnostics are directed to that address, instead of to the originator
This is typically used to direct delivery errors to the owner of of the message.
This is typically used to direct delivery errors to the maintainer of
a mailing list, who is in a better position to deal with mailing a mailing list, who is in a better position to deal with mailing
list delivery problems than the originator of the undelivered mail. list delivery problems than the originator of the undelivered mail.
.PP .PP
@@ -145,6 +146,18 @@ Give special treatment to \fBowner-\fIlistname\fR and
addresses. addresses.
.IP \fBrecipient_delimiter\fR .IP \fBrecipient_delimiter\fR
Delimiter that separates recipients from address extensions. Delimiter that separates recipients from address extensions.
.PP
Available in Postfix version 2.3 and later:
.IP \fBfrozen_delivered_to\fR
Update the local(8) delivery agent's Delivered-To: address
(see prepend_delivered_header) only once, at the start of
a delivery; do not update the Delivered-To: address while
expanding aliases or .forward files.
.IP \fBsticky_owner_alias\fR
When expanding a local(8) alias that has an owner alias
(see owner-\fIname\fR discussion above), use the owner
information even when the expansion invokes a subordinate
alias that has no owner alias.
.SH "STANDARDS" .SH "STANDARDS"
.na .na
.nf .nf

View File

@@ -1309,6 +1309,18 @@ forward_path =
.fi .fi
.ad .ad
.ft R .ft R
.SH frozen_delivered_to (default: yes)
Update the \fBlocal\fR(8) delivery agent's idea of the Delivered-To:
address (see prepend_delivered_header) only once, at the start of
a delivery attempt; do not update the Delivered-To: address while
expanding aliases or .forward files.
.PP
This feature is available in Postfix 2.3 and later. With older
Postfix releases, the behavior is as if this parameter is set to
"no". The old setting can be expensive with deeply nested aliases
or .forward files. When an alias or .forward file changes the
Delivered-To: address, it ties up one queue file and one cleanup
process instance while mail is being forwarded.
.SH hash_queue_depth (default: 1) .SH hash_queue_depth (default: 1)
The number of subdirectory levels for queue directories listed with The number of subdirectory levels for queue directories listed with
the hash_queue_names parameter. the hash_queue_names parameter.
@@ -2546,7 +2558,9 @@ submissions from the Postfix maildrop queue.
This feature is available in Postfix 2.0 and later. This feature is available in Postfix 2.0 and later.
.SH prepend_delivered_header (default: command, file, forward) .SH prepend_delivered_header (default: command, file, forward)
The message delivery contexts where the Postfix \fBlocal\fR(8) delivery The message delivery contexts where the Postfix \fBlocal\fR(8) delivery
agent prepends a Delivered-To: message header. agent prepends a Delivered-To: message header with the address
that the mail was delivered to. This information is used for mail
delivery loop detection.
.PP .PP
By default, the Postfix local delivery agent prepends a Delivered-To: By default, the Postfix local delivery agent prepends a Delivered-To:
header when forwarding mail and when delivering to file (mailbox) header when forwarding mail and when delivering to file (mailbox)
@@ -5335,6 +5349,16 @@ This is used for delivery to file or mailbox.
.PP .PP
Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks). Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
The default time unit is s (seconds). The default time unit is s (seconds).
.SH sticky_owner_alias (default: yes)
When expanding a \fBlocal\fR(8) alias that has an owner alias (see
owner-\fIname\fR discussion in \fBaliases\fR(5)), use the owner information
even when the expansion invokes a subordinate alias that has no
owner alias.
.PP
This feature is available in Postfix 2.3 and later. With older
Postfix releases, the behavior is as if this parameter is set to
"no". The old setting provides poorer error reporting with nested
aliases that only have an owner alias at the top level.
.SH strict_7bit_headers (default: no) .SH strict_7bit_headers (default: no)
Reject mail with 8-bit text in message headers. This blocks mail Reject mail with 8-bit text in message headers. This blocks mail
from poorly written applications. from poorly written applications.

View File

@@ -392,6 +392,18 @@ address localparts: don't split such addresses when the
recipient_delimiter is set to "-". recipient_delimiter is set to "-".
.IP "\fBsun_mailtool_compatibility (no)\fR" .IP "\fBsun_mailtool_compatibility (no)\fR"
Obsolete SUN mailtool compatibility feature. Obsolete SUN mailtool compatibility feature.
.PP
Available in Postfix version 2.3 and later:
.IP "\fBfrozen_delivered_to (yes)\fR"
Update the \fBlocal\fR(8) delivery agent's idea of the Delivered-To:
address (see prepend_delivered_header) only once, at the start of
a delivery attempt; do not update the Delivered-To: address while
expanding aliases or .forward files.
.IP "\fBsticky_owner_alias (yes)\fR"
When expanding a \fBlocal\fR(8) alias that has an owner alias (see
owner-\fIname\fR discussion in \fBaliases\fR(5)), use the owner information
even when the expansion invokes a subordinate alias that has no
owner alias.
.SH "DELIVERY METHOD CONTROLS" .SH "DELIVERY METHOD CONTROLS"
.na .na
.nf .nf
@@ -520,7 +532,8 @@ The maximal number of connection requests before a Postfix daemon
process terminates. process terminates.
.IP "\fBprepend_delivered_header (command, file, forward)\fR" .IP "\fBprepend_delivered_header (command, file, forward)\fR"
The message delivery contexts where the Postfix \fBlocal\fR(8) delivery The message delivery contexts where the Postfix \fBlocal\fR(8) delivery
agent prepends a Delivered-To: message header. agent prepends a Delivered-To: message header with the address
that the mail was delivered to.
.IP "\fBprocess_id (read-only)\fR" .IP "\fBprocess_id (read-only)\fR"
The process ID of a Postfix command or daemon process. The process ID of a Postfix command or daemon process.
.IP "\fBprocess_name (read-only)\fR" .IP "\fBprocess_name (read-only)\fR"

View File

@@ -501,6 +501,9 @@ while (<>) {
s;\btls_ran[-</Bb>]*\n* *[<Bb>]*dom_reseed_period\b;<a href="postconf.5.html#tls_random_reseed_period">$&</a>;g; s;\btls_ran[-</Bb>]*\n* *[<Bb>]*dom_reseed_period\b;<a href="postconf.5.html#tls_random_reseed_period">$&</a>;g;
s;\btls_ran[-</Bb>]*\n* *[<Bb>]*dom_source\b;<a href="postconf.5.html#tls_random_source">$&</a>;g; s;\btls_ran[-</Bb>]*\n* *[<Bb>]*dom_source\b;<a href="postconf.5.html#tls_random_source">$&</a>;g;
s;\bfrozen_delivered_to\b;<a href="postconf.5.html#frozen_delivered_to">$&</a>;g;
s;\bsticky_owner_alias\b;<a href="postconf.5.html#sticky_owner_alias">$&</a>;g;
# Undo hyperlinks of manual pages with the same name as parameters. # Undo hyperlinks of manual pages with the same name as parameters.
s/<a href="[^"]*">([^<]*)<\/a>\(/$1(/g; s/<a href="[^"]*">([^<]*)<\/a>\(/$1(/g;

View File

@@ -46,8 +46,9 @@
# lowercase, in order to make database lookups case insensitive. # lowercase, in order to make database lookups case insensitive.
# .PP # .PP
# In addition, when an alias exists for \fBowner-\fIname\fR, delivery # In addition, when an alias exists for \fBowner-\fIname\fR, delivery
# diagnostics are directed to that address, instead of to the originator. # diagnostics are directed to that address, instead of to the originator
# This is typically used to direct delivery errors to the owner of # of the message.
# This is typically used to direct delivery errors to the maintainer of
# a mailing list, who is in a better position to deal with mailing # a mailing list, who is in a better position to deal with mailing
# list delivery problems than the originator of the undelivered mail. # list delivery problems than the originator of the undelivered mail.
# .PP # .PP
@@ -133,6 +134,18 @@
# addresses. # addresses.
# .IP \fBrecipient_delimiter\fR # .IP \fBrecipient_delimiter\fR
# Delimiter that separates recipients from address extensions. # Delimiter that separates recipients from address extensions.
# .PP
# Available in Postfix version 2.3 and later:
# .IP \fBfrozen_delivered_to\fR
# Update the local(8) delivery agent's Delivered-To: address
# (see prepend_delivered_header) only once, at the start of
# a delivery; do not update the Delivered-To: address while
# expanding aliases or .forward files.
# .IP \fBsticky_owner_alias\fR
# When expanding a local(8) alias that has an owner alias
# (see owner-\fIname\fR discussion above), use the owner
# information even when the expansion invokes a subordinate
# alias that has no owner alias.
# STANDARDS # STANDARDS
# RFC 822 (ARPA Internet Text Messages) # RFC 822 (ARPA Internet Text Messages)
# SEE ALSO # SEE ALSO

View File

@@ -6841,10 +6841,10 @@ This feature is available in Postfix 2.0 and later.
%PARAM prepend_delivered_header command, file, forward %PARAM prepend_delivered_header command, file, forward
<p> <p> The message delivery contexts where the Postfix local(8) delivery
The message delivery contexts where the Postfix local(8) delivery agent prepends a Delivered-To: message header with the address
agent prepends a Delivered-To: message header. that the mail was delivered to. This information is used for mail
</p> delivery loop detection. </p>
<p> <p>
By default, the Postfix local delivery agent prepends a Delivered-To: By default, the Postfix local delivery agent prepends a Delivered-To:
@@ -8541,3 +8541,29 @@ message_strip_characters = \0
</pre> </pre>
<p> This feature is available in Postfix 2.3 and later. </p> <p> This feature is available in Postfix 2.3 and later. </p>
%PARAM sticky_owner_alias yes
<p> When expanding a local(8) alias that has an owner alias (see
owner-<i>name</i> discussion in aliases(5)), use the owner information
even when the expansion invokes a subordinate alias that has no
owner alias. </p>
<p> This feature is available in Postfix 2.3 and later. With older
Postfix releases, the behavior is as if this parameter is set to
"no". The old setting provides poorer error reporting with nested
aliases that only have an owner alias at the top level. </p>
%PARAM frozen_delivered_to yes
<p> Update the local(8) delivery agent's idea of the Delivered-To:
address (see prepend_delivered_header) only once, at the start of
a delivery attempt; do not update the Delivered-To: address while
expanding aliases or .forward files. </p>
<p> This feature is available in Postfix 2.3 and later. With older
Postfix releases, the behavior is as if this parameter is set to
"no". The old setting can be expensive with deeply nested aliases
or .forward files. When an alias or .forward file changes the
Delivered-To: address, it ties up one queue file and one cleanup
process instance while mail is being forwarded. </p>

View File

@@ -2373,6 +2373,17 @@ extern char *var_msg_reject_chars;
#define DEF_MSG_STRIP_CHARS "" #define DEF_MSG_STRIP_CHARS ""
extern char *var_msg_strip_chars; extern char *var_msg_strip_chars;
/*
* Local forwarding complexity controls.
*/
#define VAR_FROZEN_DELIVERED "frozen_delivered_to"
#define DEF_FROZEN_DELIVERED 1
extern bool var_frozen_delivered;
#define VAR_STICKY_OWNER_ALIAS "sticky_owner_alias"
#define DEF_STICKY_OWNER_ALIAS 1
extern bool var_sticky_owner_alias;
/* LICENSE /* LICENSE
/* .ad /* .ad
/* .fi /* .fi

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 "20050922" #define MAIL_RELEASE_DATE "20050923"
#define MAIL_VERSION_NUMBER "2.3" #define MAIL_VERSION_NUMBER "2.3"
#ifdef SNAPSHOT #ifdef SNAPSHOT

View File

@@ -145,8 +145,6 @@ static NAME_MASK lmtp_sasl_sec_mask[] = {
#if SASL_VERSION_MAJOR < 2 #if SASL_VERSION_MAJOR < 2
/* SASL version 1.x */ /* SASL version 1.x */
#define SASL_LOG_WARN SASL_LOG_WARNING
#define SASL_LOG_NOTE SASL_LOG_INFO
#define SASL_CLIENT_NEW(srv, fqdn, lport, rport, prompt, secflags, pconn) \ #define SASL_CLIENT_NEW(srv, fqdn, lport, rport, prompt, secflags, pconn) \
sasl_client_new(srv, fqdn, prompt, secflags, pconn) sasl_client_new(srv, fqdn, prompt, secflags, pconn)
#define SASL_CLIENT_START(conn, mechlst, secret, prompt, clout, cllen, mech) \ #define SASL_CLIENT_START(conn, mechlst, secret, prompt, clout, cllen, mech) \
@@ -177,16 +175,53 @@ static int lmtp_sasl_log(void *unused_context, int priority,
{ {
switch (priority) { switch (priority) {
case SASL_LOG_ERR: /* unusual errors */ case SASL_LOG_ERR: /* unusual errors */
case SASL_LOG_WARN: /* non-fatal warnings */ #ifdef SASL_LOG_WARN /* non-fatal warnings (Cyrus-SASL v2) */
case SASL_LOG_WARN:
#endif
#ifdef SASL_LOG_WARNING /* non-fatal warnings (Cyrus-SASL v1) */
case SASL_LOG_WARNING:
#endif
msg_warn("SASL authentication problem: %s", message); msg_warn("SASL authentication problem: %s", message);
break; break;
case SASL_LOG_NOTE: /* other info */ #ifdef SASL_LOG_INFO
case SASL_LOG_INFO: /* other info (Cyrus-SASL v1) */
if (msg_verbose) if (msg_verbose)
msg_info("SASL authentication info: %s", message); msg_info("SASL authentication info: %s", message);
break; break;
#if SASL_VERSION_MAJOR >= 2 #endif
case SASL_LOG_FAIL: /* authentication failures */ #ifdef SASL_LOG_NOTE
case SASL_LOG_NOTE: /* other info (Cyrus-SASL v2) */
if (msg_verbose)
msg_info("SASL authentication info: %s", message);
break;
#endif
#ifdef SASL_LOG_FAIL
case SASL_LOG_FAIL: /* authentication failures
* (Cyrus-SASL v2) */
msg_warn("SASL authentication failure: %s", message); msg_warn("SASL authentication failure: %s", message);
break;
#endif
#ifdef SASL_LOG_DEBUG
case SASL_LOG_DEBUG: /* more verbose than LOG_NOTE
* (Cyrus-SASL v2) */
if (msg_verbose > 1)
msg_info("SASL authentication debug: %s", message);
break;
#endif
#ifdef SASL_LOG_TRACE
case SASL_LOG_TRACE: /* traces of internal
* protocols (Cyrus-SASL v2) */
if (msg_verbose > 1)
msg_info("SASL authentication trace: %s", message);
break;
#endif
#ifdef SASL_LOG_PASS
case SASL_LOG_PASS: /* traces of internal
* protocols, including
* passwords (Cyrus-SASL v2) */
if (msg_verbose > 1)
msg_info("SASL authentication pass: %s", message);
break;
#endif #endif
} }
return (SASL_OK); return (SASL_OK);
@@ -315,7 +350,7 @@ void lmtp_sasl_initialize(void)
#endif #endif
) )
msg_fatal("incorrect SASL library version. " msg_fatal("incorrect SASL library version. "
"Postfix was built with include files from version %d.%d.%d, " "Postfix was built with include files from version %d.%d.%d, "
"but the run-time library version is %d.%d.%d", "but the run-time library version is %d.%d.%d",
SASL_VERSION_MAJOR, SASL_VERSION_MINOR, SASL_VERSION_STEP, SASL_VERSION_MAJOR, SASL_VERSION_MINOR, SASL_VERSION_STEP,
sasl_major, sasl_minor, sasl_step); sasl_major, sasl_minor, sasl_step);
@@ -447,7 +482,7 @@ int lmtp_sasl_authenticate(LMTP_STATE *state, DSN_BUF *why)
if (msg_verbose) if (msg_verbose)
msg_info("%s: %s: SASL mechanisms %s", msg_info("%s: %s: SASL mechanisms %s",
myname, session->namaddr, state->sasl_mechanism_list); myname, session->namaddr, state->sasl_mechanism_list);
/* /*
* Start the client side authentication protocol. * Start the client side authentication protocol.
@@ -458,12 +493,12 @@ int lmtp_sasl_authenticate(LMTP_STATE *state, DSN_BUF *why)
&clientout, &clientoutlen, &mechanism); &clientout, &clientoutlen, &mechanism);
if (result != SASL_OK && result != SASL_CONTINUE) { if (result != SASL_OK && result != SASL_CONTINUE) {
dsb_update(why, "4.7.0", DSB_DEF_ACTION, DSB_SKIP_RMTA, DSB_DTYPE_SASL, dsb_update(why, "4.7.0", DSB_DEF_ACTION, DSB_SKIP_RMTA, DSB_DTYPE_SASL,
421, sasl_errstring(result, NO_SASL_LANGLIST, 421, sasl_errstring(result, NO_SASL_LANGLIST,
NO_SASL_OUTLANG), NO_SASL_OUTLANG),
"cannot SASL authenticate to server %s: %s", "cannot SASL authenticate to server %s: %s",
session->namaddr, session->namaddr,
sasl_errstring(result, NO_SASL_LANGLIST, sasl_errstring(result, NO_SASL_LANGLIST,
NO_SASL_OUTLANG)); NO_SASL_OUTLANG));
return (-1); return (-1);
} }
@@ -510,7 +545,7 @@ int lmtp_sasl_authenticate(LMTP_STATE *state, DSN_BUF *why)
if (SASL_DECODE64(line, serverinlen, STR(state->sasl_decoded), if (SASL_DECODE64(line, serverinlen, STR(state->sasl_decoded),
serverinlen, &enc_length) != SASL_OK) { serverinlen, &enc_length) != SASL_OK) {
lmtp_dsn_update(why, "5.7.0", DSN_BY_LOCAL_MTA, lmtp_dsn_update(why, "5.7.0", DSN_BY_LOCAL_MTA,
501, "501 malformed SASL challenge", 501, "501 malformed SASL challenge",
"malformed SASL challenge from server %s", "malformed SASL challenge from server %s",
session->namaddr); session->namaddr);
return (-1); return (-1);

View File

@@ -263,7 +263,8 @@ int deliver_alias(LOCAL_STATE state, USER_ATTR usr_attr,
SET_OWNER_ATTR(state.msg_attr, STR(canon_owner), state.level); SET_OWNER_ATTR(state.msg_attr, STR(canon_owner), state.level);
} else { } else {
canon_owner = 0; canon_owner = 0;
RESET_OWNER_ATTR(state.msg_attr, state.level); if (var_sticky_owner_alias == 0)
RESET_OWNER_ATTR(state.msg_attr, state.level);
} }
/* /*
@@ -272,7 +273,8 @@ int deliver_alias(LOCAL_STATE state, USER_ATTR usr_attr,
* Set the delivered message attribute to the recipient, so that * Set the delivered message attribute to the recipient, so that
* this message will list the correct forwarding address. * this message will list the correct forwarding address.
*/ */
state.msg_attr.delivered = state.msg_attr.rcpt.address; if (var_frozen_delivered == 0)
state.msg_attr.delivered = state.msg_attr.rcpt.address;
/* /*
* Deliver. * Deliver.

View File

@@ -139,7 +139,8 @@ int deliver_dotforward(LOCAL_STATE state, USER_ATTR usr_attr, int *statusp)
* Set the delivered message attribute to the recipient, so that this * Set the delivered message attribute to the recipient, so that this
* message will list the correct forwarding address. * message will list the correct forwarding address.
*/ */
state.msg_attr.delivered = state.msg_attr.rcpt.address; if (var_frozen_delivered == 0)
state.msg_attr.delivered = state.msg_attr.rcpt.address;
/* /*
* DELIVERY RIGHTS * DELIVERY RIGHTS

View File

@@ -360,6 +360,18 @@
/* recipient_delimiter is set to "-". /* recipient_delimiter is set to "-".
/* .IP "\fBsun_mailtool_compatibility (no)\fR" /* .IP "\fBsun_mailtool_compatibility (no)\fR"
/* Obsolete SUN mailtool compatibility feature. /* Obsolete SUN mailtool compatibility feature.
/* .PP
/* Available in Postfix version 2.3 and later:
/* .IP "\fBfrozen_delivered_to (yes)\fR"
/* Update the \fBlocal\fR(8) delivery agent's idea of the Delivered-To:
/* address (see prepend_delivered_header) only once, at the start of
/* a delivery attempt; do not update the Delivered-To: address while
/* expanding aliases or .forward files.
/* .IP "\fBsticky_owner_alias (yes)\fR"
/* When expanding a \fBlocal\fR(8) alias that has an owner alias (see
/* owner-\fIname\fR discussion in \fBaliases\fR(5)), use the owner information
/* even when the expansion invokes a subordinate alias that has no
/* owner alias.
/* DELIVERY METHOD CONTROLS /* DELIVERY METHOD CONTROLS
/* .ad /* .ad
/* .fi /* .fi
@@ -478,7 +490,8 @@
/* process terminates. /* process terminates.
/* .IP "\fBprepend_delivered_header (command, file, forward)\fR" /* .IP "\fBprepend_delivered_header (command, file, forward)\fR"
/* The message delivery contexts where the Postfix \fBlocal\fR(8) delivery /* The message delivery contexts where the Postfix \fBlocal\fR(8) delivery
/* agent prepends a Delivered-To: message header. /* agent prepends a Delivered-To: message header with the address
/* that the mail was delivered to.
/* .IP "\fBprocess_id (read-only)\fR" /* .IP "\fBprocess_id (read-only)\fR"
/* The process ID of a Postfix command or daemon process. /* The process ID of a Postfix command or daemon process.
/* .IP "\fBprocess_name (read-only)\fR" /* .IP "\fBprocess_name (read-only)\fR"
@@ -606,6 +619,8 @@ int var_stat_home_dir;
int var_mailtool_compat; int var_mailtool_compat;
char *var_mailbox_lock; char *var_mailbox_lock;
int var_mailbox_limit; int var_mailbox_limit;
bool var_frozen_delivered;
bool var_sticky_owner_alias;
int local_cmd_deliver_mask; int local_cmd_deliver_mask;
int local_file_deliver_mask; int local_file_deliver_mask;
@@ -845,6 +860,8 @@ int main(int argc, char **argv)
VAR_EXP_OWN_ALIAS, DEF_EXP_OWN_ALIAS, &var_exp_own_alias, VAR_EXP_OWN_ALIAS, DEF_EXP_OWN_ALIAS, &var_exp_own_alias,
VAR_STAT_HOME_DIR, DEF_STAT_HOME_DIR, &var_stat_home_dir, VAR_STAT_HOME_DIR, DEF_STAT_HOME_DIR, &var_stat_home_dir,
VAR_MAILTOOL_COMPAT, DEF_MAILTOOL_COMPAT, &var_mailtool_compat, VAR_MAILTOOL_COMPAT, DEF_MAILTOOL_COMPAT, &var_mailtool_compat,
VAR_FROZEN_DELIVERED, DEF_FROZEN_DELIVERED, &var_frozen_delivered,
VAR_STICKY_OWNER_ALIAS, DEF_STICKY_OWNER_ALIAS, &var_sticky_owner_alias,
0, 0,
}; };

View File

@@ -124,7 +124,8 @@ static int deliver_mailbox_file(LOCAL_STATE state, USER_ATTR usr_attr)
*/ */
if (vstream_fseek(state.msg_attr.fp, state.msg_attr.offset, SEEK_SET) < 0) if (vstream_fseek(state.msg_attr.fp, state.msg_attr.offset, SEEK_SET) < 0)
msg_fatal("seek message file %s: %m", VSTREAM_PATH(state.msg_attr.fp)); msg_fatal("seek message file %s: %m", VSTREAM_PATH(state.msg_attr.fp));
state.msg_attr.delivered = state.msg_attr.rcpt.address; if (var_frozen_delivered == 0)
state.msg_attr.delivered = state.msg_attr.rcpt.address;
mail_copy_status = MAIL_COPY_STAT_WRITE; mail_copy_status = MAIL_COPY_STAT_WRITE;
if (*var_home_mailbox) { if (*var_home_mailbox) {
spool_dir = 0; spool_dir = 0;

View File

@@ -114,7 +114,8 @@ int deliver_maildir(LOCAL_STATE state, USER_ATTR usr_attr, char *path)
*/ */
if (vstream_fseek(state.msg_attr.fp, state.msg_attr.offset, SEEK_SET) < 0) if (vstream_fseek(state.msg_attr.fp, state.msg_attr.offset, SEEK_SET) < 0)
msg_fatal("seek message file %s: %m", VSTREAM_PATH(state.msg_attr.fp)); msg_fatal("seek message file %s: %m", VSTREAM_PATH(state.msg_attr.fp));
state.msg_attr.delivered = state.msg_attr.rcpt.address; if (var_frozen_delivered == 0)
state.msg_attr.delivered = state.msg_attr.rcpt.address;
mail_copy_status = MAIL_COPY_STAT_WRITE; mail_copy_status = MAIL_COPY_STAT_WRITE;
buf = vstring_alloc(100); buf = vstring_alloc(100);

View File

@@ -160,8 +160,6 @@ static NAME_MASK smtp_sasl_sec_mask[] = {
#if SASL_VERSION_MAJOR < 2 #if SASL_VERSION_MAJOR < 2
/* SASL version 1.x */ /* SASL version 1.x */
#define SASL_LOG_WARN SASL_LOG_WARNING
#define SASL_LOG_NOTE SASL_LOG_INFO
#define SASL_CLIENT_NEW(srv, fqdn, lport, rport, prompt, secflags, pconn) \ #define SASL_CLIENT_NEW(srv, fqdn, lport, rport, prompt, secflags, pconn) \
sasl_client_new(srv, fqdn, prompt, secflags, pconn) sasl_client_new(srv, fqdn, prompt, secflags, pconn)
#define SASL_CLIENT_START(conn, mechlst, secret, prompt, clout, cllen, mech) \ #define SASL_CLIENT_START(conn, mechlst, secret, prompt, clout, cllen, mech) \
@@ -197,32 +195,50 @@ static int smtp_sasl_log(void *unused_context, int priority,
{ {
switch (priority) { switch (priority) {
case SASL_LOG_ERR: /* unusual errors */ case SASL_LOG_ERR: /* unusual errors */
case SASL_LOG_WARN: /* non-fatal warnings */ #ifdef SASL_LOG_WARN /* non-fatal warnings (Cyrus-SASL v2) */
case SASL_LOG_WARN:
#endif
#ifdef SASL_LOG_WARNING /* non-fatal warnings (Cyrus-SASL v1) */
case SASL_LOG_WARNING:
#endif
msg_warn("SASL authentication problem: %s", message); msg_warn("SASL authentication problem: %s", message);
break; break;
case SASL_LOG_NOTE: /* other info */ #ifdef SASL_LOG_INFO
case SASL_LOG_INFO: /* other info (Cyrus-SASL v1) */
if (msg_verbose) if (msg_verbose)
msg_info("SASL authentication info: %s", message); msg_info("SASL authentication info: %s", message);
break; break;
#endif
#ifdef SASL_LOG_NOTE
case SASL_LOG_NOTE: /* other info (Cyrus-SASL v2) */
if (msg_verbose)
msg_info("SASL authentication info: %s", message);
break;
#endif
#ifdef SASL_LOG_FAIL #ifdef SASL_LOG_FAIL
case SASL_LOG_FAIL: /* authentication failures */ case SASL_LOG_FAIL: /* authentication failures
* (Cyrus-SASL v2) */
msg_warn("SASL authentication failure: %s", message); msg_warn("SASL authentication failure: %s", message);
break; break;
#endif #endif
#ifdef SASL_LOG_DEBUG #ifdef SASL_LOG_DEBUG
case SASL_LOG_DEBUG: case SASL_LOG_DEBUG: /* more verbose than LOG_NOTE
* (Cyrus-SASL v2) */
if (msg_verbose > 1) if (msg_verbose > 1)
msg_info("SASL authentication debug: %s", message); msg_info("SASL authentication debug: %s", message);
break; break;
#endif #endif
#ifdef SASL_LOG_TRACE #ifdef SASL_LOG_TRACE
case SASL_LOG_TRACE: case SASL_LOG_TRACE: /* traces of internal
* protocols (Cyrus-SASL v2) */
if (msg_verbose > 1) if (msg_verbose > 1)
msg_info("SASL authentication trace: %s", message); msg_info("SASL authentication trace: %s", message);
break; break;
#endif #endif
#ifdef SASL_LOG_PASS #ifdef SASL_LOG_PASS
case SASL_LOG_PASS: case SASL_LOG_PASS: /* traces of internal
* protocols, including
* passwords (Cyrus-SASL v2) */
if (msg_verbose > 1) if (msg_verbose > 1)
msg_info("SASL authentication pass: %s", message); msg_info("SASL authentication pass: %s", message);
break; break;

View File

@@ -135,8 +135,6 @@
#if SASL_VERSION_MAJOR < 2 #if SASL_VERSION_MAJOR < 2
/* SASL version 1.x */ /* SASL version 1.x */
#define SASL_LOG_WARN SASL_LOG_WARNING
#define SASL_LOG_NOTE SASL_LOG_INFO
#define SASL_SERVER_NEW(srv, fqdn, rlm, lport, rport, cb, secflags, pconn) \ #define SASL_SERVER_NEW(srv, fqdn, rlm, lport, rport, cb, secflags, pconn) \
sasl_server_new(srv, fqdn, rlm, cb, secflags, pconn) sasl_server_new(srv, fqdn, rlm, cb, secflags, pconn)
#define SASL_SERVER_START(conn, mech, clin, clinlen, srvout, srvoutlen, err) \ #define SASL_SERVER_START(conn, mech, clin, clinlen, srvout, srvoutlen, err) \
@@ -165,39 +163,57 @@ static int smtpd_sasl_log(void *unused_context, int priority,
const char *message) const char *message)
{ {
switch (priority) { switch (priority) {
case SASL_LOG_ERR: case SASL_LOG_ERR: /* unusual errors */
case SASL_LOG_WARN: #ifdef SASL_LOG_WARN /* non-fatal warnings (Cyrus-SASL v2) */
case SASL_LOG_WARN:
#endif
#ifdef SASL_LOG_WARNING /* non-fatal warnings (Cyrus-SASL v1) */
case SASL_LOG_WARNING:
#endif
msg_warn("SASL authentication problem: %s", message); msg_warn("SASL authentication problem: %s", message);
break; break;
case SASL_LOG_NOTE: #ifdef SASL_LOG_INFO
case SASL_LOG_INFO: /* other info (Cyrus-SASL v1) */
if (msg_verbose) if (msg_verbose)
msg_info("SASL authentication info: %s", message); msg_info("SASL authentication info: %s", message);
break; break;
#endif
#ifdef SASL_LOG_NOTE
case SASL_LOG_NOTE: /* other info (Cyrus-SASL v2) */
if (msg_verbose)
msg_info("SASL authentication info: %s", message);
break;
#endif
#ifdef SASL_LOG_FAIL #ifdef SASL_LOG_FAIL
case SASL_LOG_FAIL: case SASL_LOG_FAIL: /* authentication failures
* (Cyrus-SASL v2) */
msg_warn("SASL authentication failure: %s", message); msg_warn("SASL authentication failure: %s", message);
break; break;
#endif #endif
#ifdef SASL_LOG_DEBUG #ifdef SASL_LOG_DEBUG
case SASL_LOG_DEBUG: case SASL_LOG_DEBUG: /* more verbose than LOG_NOTE
* (Cyrus-SASL v2) */
if (msg_verbose > 1) if (msg_verbose > 1)
msg_info("SASL authentication debug: %s", message); msg_info("SASL authentication debug: %s", message);
break; break;
#endif #endif
#ifdef SASL_LOG_TRACE #ifdef SASL_LOG_TRACE
case SASL_LOG_TRACE: case SASL_LOG_TRACE: /* traces of internal
* protocols (Cyrus-SASL v2) */
if (msg_verbose > 1) if (msg_verbose > 1)
msg_info("SASL authentication trace: %s", message); msg_info("SASL authentication trace: %s", message);
break; break;
#endif #endif
#ifdef SASL_LOG_PASS #ifdef SASL_LOG_PASS
case SASL_LOG_PASS: case SASL_LOG_PASS: /* traces of internal
* protocols, including
* passwords (Cyrus-SASL v2) */
if (msg_verbose > 1) if (msg_verbose > 1)
msg_info("SASL authentication pass: %s", message); msg_info("SASL authentication pass: %s", message);
break; break;
#endif #endif
} }
return SASL_OK; return (SASL_OK);
} }
/* /*
@@ -245,7 +261,7 @@ void smtpd_sasl_initialize(void)
#endif #endif
) )
msg_fatal("incorrect SASL library version. " msg_fatal("incorrect SASL library version. "
"Postfix was built with include files from version %d.%d.%d, " "Postfix was built with include files from version %d.%d.%d, "
"but the run-time library version is %d.%d.%d", "but the run-time library version is %d.%d.%d",
SASL_VERSION_MAJOR, SASL_VERSION_MINOR, SASL_VERSION_STEP, SASL_VERSION_MAJOR, SASL_VERSION_MINOR, SASL_VERSION_STEP,
sasl_major, sasl_minor, sasl_step); sasl_major, sasl_minor, sasl_step);

View File

@@ -106,6 +106,8 @@ qmqp-source.o: ../../include/qmqp_proto.h
qmqp-source.o: ../../include/sane_connect.h qmqp-source.o: ../../include/sane_connect.h
qmqp-source.o: ../../include/split_at.h qmqp-source.o: ../../include/split_at.h
qmqp-source.o: ../../include/sys_defs.h qmqp-source.o: ../../include/sys_defs.h
qmqp-source.o: ../../include/valid_hostname.h
qmqp-source.o: ../../include/valid_mailhost_addr.h
qmqp-source.o: ../../include/vbuf.h qmqp-source.o: ../../include/vbuf.h
qmqp-source.o: ../../include/vstream.h qmqp-source.o: ../../include/vstream.h
qmqp-source.o: ../../include/vstring.h qmqp-source.o: ../../include/vstring.h
@@ -142,6 +144,8 @@ smtp-source.o: ../../include/sane_connect.h
smtp-source.o: ../../include/smtp_stream.h smtp-source.o: ../../include/smtp_stream.h
smtp-source.o: ../../include/split_at.h smtp-source.o: ../../include/split_at.h
smtp-source.o: ../../include/sys_defs.h smtp-source.o: ../../include/sys_defs.h
smtp-source.o: ../../include/valid_hostname.h
smtp-source.o: ../../include/valid_mailhost_addr.h
smtp-source.o: ../../include/vbuf.h smtp-source.o: ../../include/vbuf.h
smtp-source.o: ../../include/vstream.h smtp-source.o: ../../include/vstream.h
smtp-source.o: ../../include/vstring.h smtp-source.o: ../../include/vstring.h

View File

@@ -37,6 +37,10 @@
/* includes the message headers. /* includes the message headers.
/* .IP "\fB-m \fImessage_count\fR" /* .IP "\fB-m \fImessage_count\fR"
/* Send the specified number of messages (default: 1). /* Send the specified number of messages (default: 1).
/* .IP "\fB-M \fImyhostname\fR"
/* Use the specified hostname or [address] in the default
/* sender and recipient addresses, instead of the machine
/* hostname.
/* .IP "\fB-r \fIrecipient_count\fR" /* .IP "\fB-r \fIrecipient_count\fR"
/* Send the specified number of recipients per transaction (default: 1). /* Send the specified number of recipients per transaction (default: 1).
/* Recipient names are generated by prepending a number to the /* Recipient names are generated by prepending a number to the
@@ -48,6 +52,8 @@
/* .IP "\fB-R \fIinterval\fR" /* .IP "\fB-R \fIinterval\fR"
/* Wait for a random period of time 0 <= n <= interval between messages. /* Wait for a random period of time 0 <= n <= interval between messages.
/* Suspending one thread does not affect other delivery threads. /* Suspending one thread does not affect other delivery threads.
/* .IP \fB-v\fR
/* Make the program more verbose, for debugging purposes.
/* .IP "\fB-w \fIinterval\fR" /* .IP "\fB-w \fIinterval\fR"
/* Wait a fixed time between messages. /* Wait a fixed time between messages.
/* Suspending one thread does not affect other delivery threads. /* Suspending one thread does not affect other delivery threads.
@@ -94,6 +100,8 @@
#include <host_port.h> #include <host_port.h>
#include <myaddrinfo.h> #include <myaddrinfo.h>
#include <inet_proto.h> #include <inet_proto.h>
#include <valid_hostname.h>
#include <valid_mailhost_addr.h>
/* Global library. */ /* Global library. */
@@ -428,7 +436,7 @@ static void receive_reply(int unused_event, char *context)
static void usage(char *myname) static void usage(char *myname)
{ {
msg_fatal("usage: %s -s sess -l msglen -m msgs -c -C count -f from -t to -R delay -v -w delay host[:port]", myname); msg_fatal("usage: %s -cv -s sess -l msglen -m msgs -C count -M myhostname -f from -t to -R delay -w delay host[:port]", myname);
} }
/* main - parse JCL and start the machine */ /* main - parse JCL and start the machine */
@@ -458,7 +466,7 @@ int main(int argc, char **argv)
/* /*
* Parse JCL. * Parse JCL.
*/ */
while ((ch = GETOPT(argc, argv, "46cC:f:l:m:r:R:s:t:vw:")) > 0) { while ((ch = GETOPT(argc, argv, "46cC:f:l:m:M:r:R:s:t:vw:")) > 0) {
switch (ch) { switch (ch) {
case '4': case '4':
protocols = INET_PROTO_NAME_IPV4; protocols = INET_PROTO_NAME_IPV4;
@@ -484,6 +492,16 @@ int main(int argc, char **argv)
if ((message_count = atoi(optarg)) <= 0) if ((message_count = atoi(optarg)) <= 0)
usage(argv[0]); usage(argv[0]);
break; break;
case 'M':
if (*optarg == '[') {
if (!valid_mailhost_literal(optarg, DO_GRIPE))
msg_fatal("bad address literal: %s", optarg);
} else {
if (!valid_hostname(optarg, DO_GRIPE))
msg_fatal("bad hostname: %s", optarg);
}
var_myhostname = optarg;
break;
case 'r': case 'r':
if ((recipients = atoi(optarg)) <= 0) if ((recipients = atoi(optarg)) <= 0)
usage(argv[0]); usage(argv[0]);
@@ -562,7 +580,8 @@ int main(int argc, char **argv)
/* /*
* Make sure we have sender and recipient addresses. * Make sure we have sender and recipient addresses.
*/ */
var_myhostname = get_hostname(); if (var_myhostname == 0)
var_myhostname = get_hostname();
if (sender == 0 || recipient == 0) { if (sender == 0 || recipient == 0) {
vstring_sprintf(buffer, "foo@%s", var_myhostname); vstring_sprintf(buffer, "foo@%s", var_myhostname);
defaddr = mystrdup(vstring_str(buffer)); defaddr = mystrdup(vstring_str(buffer));

View File

@@ -37,8 +37,6 @@
/* message over the same connection. /* message over the same connection.
/* .IP "\fB-f \fIfrom\fR" /* .IP "\fB-f \fIfrom\fR"
/* Use the specified sender address (default: <foo@myhostname>). /* Use the specified sender address (default: <foo@myhostname>).
/* .IP \fB-o\fR
/* Old mode: don't send HELO, and don't send message headers.
/* .IP "\fB-l \fIlength\fR" /* .IP "\fB-l \fIlength\fR"
/* Send \fIlength\fR bytes as message payload. The length does not /* Send \fIlength\fR bytes as message payload. The length does not
/* include message headers. /* include message headers.
@@ -46,12 +44,18 @@
/* Speak LMTP rather than SMTP. /* Speak LMTP rather than SMTP.
/* .IP "\fB-m \fImessage_count\fR" /* .IP "\fB-m \fImessage_count\fR"
/* Send the specified number of messages (default: 1). /* Send the specified number of messages (default: 1).
/* .IP "\fB-M \fImyhostname\fR"
/* Use the specified hostname or [address] in the HELO command
/* and in the default sender and recipient addresses, instead
/* of the machine hostname.
/* .IP "\fB-N\fR" /* .IP "\fB-N\fR"
/* Prepend a non-repeating sequence number to each recipient /* Prepend a non-repeating sequence number to each recipient
/* address. This avoids the artificial 100% hit rate in the /* address. This avoids the artificial 100% hit rate in the
/* resolve and rewrite client caches and exercises the /* resolve and rewrite client caches and exercises the
/* trivial-rewrite daemon, better approximating Postfix /* trivial-rewrite daemon, better approximating Postfix
/* performance under real-life work-loads. /* performance under real-life work-loads.
/* .IP \fB-o\fR
/* Old mode: don't send HELO, and don't send message headers.
/* .IP "\fB-r \fIrecipient_count\fR" /* .IP "\fB-r \fIrecipient_count\fR"
/* Send the specified number of recipients per transaction (default: 1). /* Send the specified number of recipients per transaction (default: 1).
/* Recipient names are generated by prepending a number to the /* Recipient names are generated by prepending a number to the
@@ -65,6 +69,8 @@
/* .IP "\fB-R \fIinterval\fR" /* .IP "\fB-R \fIinterval\fR"
/* Wait for a random period of time 0 <= n <= interval between messages. /* Wait for a random period of time 0 <= n <= interval between messages.
/* Suspending one thread does not affect other delivery threads. /* Suspending one thread does not affect other delivery threads.
/* .IP \fB-v\fR
/* Make the program more verbose, for debugging purposes.
/* .IP "\fB-w \fIinterval\fR" /* .IP "\fB-w \fIinterval\fR"
/* Wait a fixed time between messages. /* Wait a fixed time between messages.
/* Suspending one thread does not affect other delivery threads. /* Suspending one thread does not affect other delivery threads.
@@ -121,6 +127,8 @@
#include <host_port.h> #include <host_port.h>
#include <myaddrinfo.h> #include <myaddrinfo.h>
#include <inet_proto.h> #include <inet_proto.h>
#include <valid_hostname.h>
#include <valid_mailhost_addr.h>
/* Global library. */ /* Global library. */
@@ -784,7 +792,7 @@ static void quit_done(int unused_event, char *context)
static void usage(char *myname) static void usage(char *myname)
{ {
msg_fatal("usage: %s -cdLNov -s sess -l msglen -m msgs -C count -f from -t to -r rcptcount -R delay -w delay host[:port]", myname); msg_fatal("usage: %s -cdLNov -s sess -l msglen -m msgs -C count -M myhostname -f from -t to -r rcptcount -R delay -w delay host[:port]", myname);
} }
/* main - parse JCL and start the machine */ /* main - parse JCL and start the machine */
@@ -812,7 +820,7 @@ int main(int argc, char **argv)
/* /*
* Parse JCL. * Parse JCL.
*/ */
while ((ch = GETOPT(argc, argv, "46cC:df:l:Lm:Nor:R:s:S:t:vw:")) > 0) { while ((ch = GETOPT(argc, argv, "46cC:df:l:Lm:M:Nor:R:s:S:t:vw:")) > 0) {
switch (ch) { switch (ch) {
case '4': case '4':
protocols = INET_PROTO_NAME_IPV4; protocols = INET_PROTO_NAME_IPV4;
@@ -851,6 +859,16 @@ int main(int argc, char **argv)
if ((message_count = atoi(optarg)) <= 0) if ((message_count = atoi(optarg)) <= 0)
msg_fatal("bad message count: %s", optarg); msg_fatal("bad message count: %s", optarg);
break; break;
case 'M':
if (*optarg == '[') {
if (!valid_mailhost_literal(optarg, DO_GRIPE))
msg_fatal("bad address literal: %s", optarg);
} else {
if (!valid_hostname(optarg, DO_GRIPE))
msg_fatal("bad hostname: %s", optarg);
}
var_myhostname = optarg;
break;
case 'N': case 'N':
number_rcpts = 1; number_rcpts = 1;
break; break;
@@ -947,7 +965,8 @@ int main(int argc, char **argv)
/* /*
* Make sure we have sender and recipient addresses. * Make sure we have sender and recipient addresses.
*/ */
var_myhostname = get_hostname(); if (var_myhostname == 0)
var_myhostname = get_hostname();
if (sender == 0 || recipient == 0) { if (sender == 0 || recipient == 0) {
vstring_sprintf(buffer, "foo@%s", var_myhostname); vstring_sprintf(buffer, "foo@%s", var_myhostname);
defaddr = mystrdup(vstring_str(buffer)); defaddr = mystrdup(vstring_str(buffer));