2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-28 20:57:56 +00:00

postfix-1.1.11-20020605

This commit is contained in:
Wietse Venema 2002-06-05 00:00:00 -05:00 committed by Viktor Dukhovni
parent d51915c134
commit 14c13568bd
59 changed files with 631 additions and 134 deletions

View File

@ -3,6 +3,7 @@
/usr/spool/mail yes (compile time option)
/var/mail yes (compile time option)
/var/spool/mail yes (compile time option)
8bitmime yes (including 8bit to quoted-printable conversion)
:include: yes (mail to /file and |command is off by default)
aliases yes (can enable/disable mail to /file or |command)
bare newlines yes (but will send CRLF)
@ -14,7 +15,7 @@ delivered-to yes (configurable with prepend_delivered_header)
dsn not yet (bounces have DSN form)
errors-to: yes
esmtp yes
etrn support yes (uses per-destination log or flushes entire queue)
etrn support yes (per-destination log for authorized destinations only)
fcntl locking yes (runtime configurable)
flock locking yes (runtime configurable)
home mailbox yes
@ -28,7 +29,8 @@ mail to file yes (configurable for .forward, aliases, :include:)
maildir yes (in home, system mailspool, /file/name/ alias)
mailertable yes (it's called transport)
mailq yes
majordomo yes (edit approve script to delete /delivered-to/i)
majordomo yes (edit approve script to delete /^delivered-to:/i)
mime yes (including 8bit to quoted-printable conversion)
mime conversion not yet; postfix uses just-send-eight
mysql tables yes (contributed)
netinfo tables yes (contributed)

View File

@ -6592,6 +6592,23 @@ Apologies for any names omitted.
Patch by Sebastian Schaffert @ wastl.net. File:
global/deliver_pass.c.
20020604
Workaround: Solaris non-blocking read() can fail on a socket
with unread data according to ioctl FIONREAD. Incredible.
Diagnosis by Max Pashkov. File: smtp/smtp-sink.c.
Weirdstuff: sender-based routing. This will become more
useful once per-address transport map entries are done.
File: src/qmgr/qmgr_message.c.
20020605
Safety: header_address_token_limit limits the amount of
memory and CPU that we're willing to spend while parsing
addresses in message headers. The limit is expressed as a
number of tokens. File: global/tok822_parse.c
Open problems:
Medium: old maildrop files are no longer readable by the

View File

@ -474,7 +474,7 @@ the Postfix queue directories (/var/spool/postfix). This provides
a significant barrier against intrusion. The barrier is not
impenetrable, but every little bit helps.
With the exception of the Postfix local delivery and `pipe' daemons,
With the exception of the Postfix daemons that deliver mail locally,
every Postfix daemon can run chrooted.
Sites with high security requirements should consider to chroot

View File

@ -372,7 +372,7 @@ localhost:10026 inet n - n - - smtpd
-o local_recipient_maps=
-o virtual_maps=
-o virtual_mailbox_maps=
-o cleanup_service=cleanup2
-o cleanup_service_name=cleanup2
-o mynetworks=127.0.0.0/8
-o mynetworks_style=host
-o smtpd_restriction_classes=

View File

@ -19,7 +19,8 @@
#
# Unprivileged: whether the service runs with root privileges or as
# the owner of the Postfix system (the owner name is controlled by the
# mail_owner configuration variable in the main.cf file).
# mail_owner configuration variable in the main.cf file). Only the
# pipe, virtual and local delivery daemons require privileges.
#
# Chroot: whether or not the service runs chrooted to the mail queue
# directory (pathname is controlled by the queue_directory configuration
@ -87,10 +88,12 @@ lmtp unix - - n - - lmtp
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
# The Cyrus deliver program has changed incompatibly.
# The Cyrus deliver program has changed incompatibly, multiple times.
#
cyrus unix - n n - - pipe
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
cyrus unix - n n - - pipe
user=cyrus argv=/cyrus/bin/deliver -e -r ${recipient} -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe

View File

@ -47,21 +47,21 @@
# matching is case insensitive.
#
# m (default: off)
# Toggles the PCRE_MULTILINE flag. When the flag is
# Toggles the PCRE_MULTILINE flag. When this flag is
# on, the ^ and $ metacharacters match immediately
# after and immediately before a newline character,
# respectively, in addition to matching at the start
# and end of the subject string.
#
# s (default: on)
# Toggle the PCRE_DOTALL flag. When the flag is on,
# Toggles the PCRE_DOTALL flag. When this flag is on,
# the . metacharacter matches the newline character.
# With Postfix versions prior to 20020528, The flag
# is off by default, which is inconvenient for multi-
# line message header matching.
#
# x (default: off)
# Toggles the pcre extended flag. When the flag is
# Toggles the pcre extended flag. When this flag is
# on, whitespace in the pattern (other than in a
# character class) and characters between a # outside
# a character class and the next newline character
@ -71,7 +71,7 @@
#
# A (default: off)
# Toggles the PCRE_ANCHORED flag. When this flag is
# set, the pattern is forced to be "anchored", that
# on, the pattern is forced to be "anchored", that
# is, it is constrained to match only at the start of
# the string which is being searched (the "subject
# string"). This effect can also be achieved by
@ -79,7 +79,7 @@
#
# E (default: off)
# Toggles the PCRE_DOLLAR_ENDONLY flag. When this
# flag is set, a $ metacharacter in the pattern
# flag is on, a $ metacharacter in the pattern
# matches only at the end of the subject string.
# Without this flag, a dollar also matches immedi-
# ately before the final character if it is a newline
@ -89,18 +89,18 @@
#
# U (default: off)
# Toggles the ungreedy matching flag. When this flag
# is set, the pattern matching engine inverts the
# is on, the pattern matching engine inverts the
# "greediness" of the quantifiers so that they are
# not greedy by default, but become greedy if fol-
# lowed by "?". This flag can also set by a (?U)
# modifier within the pattern.
#
# X (default: off)
# Toggles the PCRE_EXTRA flag. When this flag is
# set, any backslash in a pattern that is followed by
# a letter that has no special meaning causes an
# error, thus reserving these combinations for future
# expansion.
# Toggles the PCRE_EXTRA flag. When this flag is on,
# any backslash in a pattern that is followed by a
# letter that has no special meaning causes an error,
# thus reserving these combinations for future expan-
# sion.
#
# Each pattern is applied to the entire lookup key string.
# Depending on the application, that string is an entire

View File

@ -61,11 +61,18 @@ fork_attempts = 5
fork_delay = 1s
# The header_size_limit parameter limits the amount of memory in
# bytes used for processing a message header. If a header is larger,
# the remainder of the entire message is treated as message body.
# bytes used for storing a message header. If a header is larger,
# the remainder of the header is descarded.
#
header_size_limit = 102400
# The header_address_token_limit limits the amount of memory and CPU
# that Postfix will spend while rewriting addresses in message headers.
# The limit is expressed as a token count. Tokens beyond the limit are
# discarded.
#
header_address_token_limit = 10240
# The line_length_limit parameter limits the amount of memory in
# bytes used for handling input lines. Longer lines are chopped up
# into pieces and reconstructed upon delivery.

View File

@ -125,7 +125,7 @@ strict_rfc821_envelopes = no
# response. This prevents naive clients from going into an error -
# disconnect - connect - error loop.
#
smtpd_error_sleep_time = 5
smtpd_error_sleep_time = 1s
# The smtpd_soft_error_limit parameter specifies an error count lower
# limit. When an SMTP client has made this number of errors within
@ -138,7 +138,7 @@ smtpd_soft_error_limit = 10
# limit. The SMTP server disconnects after an SMTP client makes this
# number of errors within a session.
#
smtpd_hard_error_limit = 100
smtpd_hard_error_limit = 20
#
# UCE RESTRICTIONS

View File

@ -48,21 +48,21 @@ PCRE_TABLE(5) PCRE_TABLE(5)
matching is case insensitive.
<b>m</b> (default: off)
Toggles the PCRE_MULTILINE flag. When the flag is
Toggles the PCRE_MULTILINE flag. When this flag is
on, the <b>^</b> and $ metacharacters match immediately
after and immediately before a newline character,
respectively, in addition to matching at the start
and end of the subject string.
<b>s</b> (default: on)
Toggle the PCRE_DOTALL flag. When the flag is on,
Toggles the PCRE_DOTALL flag. When this flag is on,
the <b>.</b> metacharacter matches the newline character.
With Postfix versions prior to 20020528, The flag
is off by default, which is inconvenient for multi-
line message header matching.
<b>x</b> (default: off)
Toggles the pcre extended flag. When the flag is
Toggles the pcre extended flag. When this flag is
on, whitespace in the pattern (other than in a
character class) and characters between a <b>#</b> outside
a character class and the next newline character
@ -72,7 +72,7 @@ PCRE_TABLE(5) PCRE_TABLE(5)
<b>A</b> (default: off)
Toggles the PCRE_ANCHORED flag. When this flag is
set, the pattern is forced to be "anchored", that
on, the pattern is forced to be "anchored", that
is, it is constrained to match only at the start of
the string which is being searched (the "subject
string"). This effect can also be achieved by
@ -80,7 +80,7 @@ PCRE_TABLE(5) PCRE_TABLE(5)
<b>E</b> (default: off)
Toggles the PCRE_DOLLAR_ENDONLY flag. When this
flag is set, a <b>$</b> metacharacter in the pattern
flag is on, a <b>$</b> metacharacter in the pattern
matches only at the end of the subject string.
Without this flag, a dollar also matches immedi-
ately before the final character if it is a newline
@ -90,18 +90,18 @@ PCRE_TABLE(5) PCRE_TABLE(5)
<b>U</b> (default: off)
Toggles the ungreedy matching flag. When this flag
is set, the pattern matching engine inverts the
is on, the pattern matching engine inverts the
"greediness" of the quantifiers so that they are
not greedy by default, but become greedy if fol-
lowed by "?". This flag can also set by a (?U)
modifier within the pattern.
<b>X</b> (default: off)
Toggles the PCRE_EXTRA flag. When this flag is
set, any backslash in a pattern that is followed by
a letter that has no special meaning causes an
error, thus reserving these combinations for future
expansion.
Toggles the PCRE_EXTRA flag. When this flag is on,
any backslash in a pattern that is followed by a
letter that has no special meaning causes an error,
thus reserving these combinations for future expan-
sion.
Each pattern is applied to the entire lookup key string.
Depending on the application, that string is an entire

View File

@ -252,8 +252,8 @@ PIPE(8) PIPE(8)
Limit the time for delivery to external command,
for delivery via the named <b>transport</b>. The default
limit is taken from the <b>command</b><i>_</i><b>time</b><i>_</i><b>limit</b> parame-
ter. The limit is enforced by the Postfix queue
manager.
ter. The limit is enforced by the pipe delivery
agent.
<b>SEE</b> <b>ALSO</b>
<a href="bounce.8.html">bounce(8)</a> non-delivery status reports

View File

@ -73,22 +73,32 @@ POSTCONF(1) POSTCONF(1)
is available only on systems with support
for Berkeley DB databases.
<b>ldap</b> Perform lookups using the LDAP protocol.
<b>ldap</b> (read-only)
Perform lookups using the LDAP protocol.
This is described in an LDAP_README file.
<b>pcre</b> A lookup table based on Perl Compatible Reg-
ular Expressions. The file format is
<b>mysql</b> (read-only)
Perform lookups using the MYSQL protocol.
This is described in a MYSQL_README file.
<b>pcre</b> (read-only)
A lookup table based on Perl Compatible Reg-
ular Expressions. The file format is
described in <a href="pcre_table.5.html"><b>pcre</b><i>_</i><b>table</b>(5)</a>.
<b>regexp</b> A lookup table based on regular expressions.
The file format is described in <b>reg-</b>
<b>exp</b><i>_</i><b>table</b>(5).
<b>regexp</b> (read-only)
A lookup table based on regular expressions.
The file format is described in <a href="regexp_table.5.html"><b>reg-</b>
<b>exp</b><i>_</i><b>table</b>(5)</a>.
<b>static</b> A table that always returns the same result.
For example, <b>static:foobar</b> always returns
the string <b>foobar</b>.
<b>static</b> (read-only)
A table that always returns its name as
lookup result. For example, <b>static:foobar</b>
always returns the string <b>foobar</b> as lookup
result.
<b>unix</b> A limited way to query the UNIX authentica-
<b>unix</b> (read-only)
A limited way to query the UNIX authentica-
tion database. The following tables are
implemented:

View File

@ -51,7 +51,7 @@ POSTDROP(1) POSTDROP(1)
<b>alternate</b><i>_</i><b>config</b><i>_</i><b>directories</b> configuration parame-
ter value.
Only the super-user is allowed to specify arbitrary
Only the superuser is allowed to specify arbitrary
directory names.
<b>FILES</b>

View File

@ -8,7 +8,7 @@ POSTFIX(1) POSTFIX(1)
<b>postfix</b> [<b>-c</b> <i>config_dir</i>] [<b>-D</b>] [<b>-v</b>] <i>command</i>
<b>DESCRIPTION</b>
This command is reserved for the super-user. To submit
This command is reserved for the superuser. To submit
mail, use the Postfix <b>sendmail</b> command.
The <b>postfix</b> command controls the operation of the Postfix

View File

@ -69,7 +69,7 @@ POSTQUEUE(1) POSTQUEUE(1)
<b>alternate</b><i>_</i><b>config</b><i>_</i><b>directories</b> configuration parame-
ter value.
Only the super-user is allowed to specify arbitrary
Only the superuser is allowed to specify arbitrary
directory names.
<b>FILES</b>

View File

@ -1,5 +1,4 @@
<html> <head> </head> <body> <pre>
POSTSUPER(1) POSTSUPER(1)
<b>NAME</b>
@ -11,7 +10,7 @@ POSTSUPER(1) POSTSUPER(1)
<b>DESCRIPTION</b>
The <b>postsuper</b> command does maintenance jobs on the Postfix
queue. Use of the command is restricted to the super-user.
queue. Use of the command is restricted to the superuser.
By default, <b>postsuper</b> performs the operations requested
with the <b>-s</b> and <b>-p</b> command-line options on all Postfix
@ -135,6 +134,5 @@ POSTSUPER(1) POSTSUPER(1)
P.O. Box 704
Yorktown Heights, NY 10598, USA
1
POSTSUPER(1)
</pre> </body> </html>

View File

@ -360,7 +360,7 @@ client. The behavior is controlled by the following parameters:
<a name="#smtpd_error_sleep_time">
<dt> <b>smtpd_error_sleep_time</b> (default: 5 seconds) <dd> When
<dt> <b>smtpd_error_sleep_time</b> (default: 1 second) <dd> When
the per-session error count is small, the SMTP server pauses only
when reporting a problem to a client. The purpose is to prevent
naive clients from going into a fast <i>connect-error-disconnect</i>
@ -378,7 +378,7 @@ per-session error count exceeds this value, the SMTP server sleeps
<a name="#smtpd_hard_error_limit">
<dt> <b>smtpd_hard_error_limit</b> (default: 100) <dd> When
<dt> <b>smtpd_hard_error_limit</b> (default: 20) <dd> When
the per-session error count exceeds this value, the SMTP server
disconnects.

View File

@ -77,11 +77,21 @@ an untrusted source. Long lines are reconstructed upon delivery.
<dd> How much text may be carried in a multi-line message header.
Header text that does not fit in <b>$header_size_limit</b> bytes
overflows into the message body. This limit is enforced by the <a
is discarded. This limit is enforced by the <a
href="cleanup.8.html"> cleanup</a> header rewriting code.
<p>
<dt> <b>header_address_token_limit</b> (default: 10240 tokens)
<dd> Limit on the amount of memory and CPU that Postfix will use for
rewriting addresses in message headers. The limit is expressed as
a number of tokens. Tokens text that do not fit are discarded.
This limit is enforced by the <a href="cleanup.8.html"> cleanup</a>
header rewriting code.
<p>
<dt> <b>extract_recipient_limit</b> (default: 10240 recipients)
<dd> How many recipients Postfix will extract from message headers

View File

@ -13,7 +13,7 @@ SHOWQ(8) SHOWQ(8)
mand.
The <b>showq</b> daemon can also be run in stand-alone mode by
the super-user. This mode of operation is used to emulate
the superuser. This mode of operation is used to emulate
the `mailq' command while the Postfix mail system is down.
<b>SECURITY</b>

View File

@ -70,19 +70,23 @@ useful someday.
An indexed file type based on hashing.
This is available only on systems with support for Berkeley DB
databases.
.IP \fBldap\fR
.IP "\fBldap\fR (read-only)"
Perform lookups using the LDAP protocol. This is described
in an LDAP_README file.
.IP \fBpcre\fR
.IP "\fBmysql\fR (read-only)"
Perform lookups using the MYSQL protocol. This is described
in a MYSQL_README file.
.IP "\fBpcre\fR (read-only)"
A lookup table based on Perl Compatible Regular Expressions. The
file format is described in \fBpcre_table\fR(5).
.IP \fBregexp\fR
.IP "\fBregexp\fR (read-only)"
A lookup table based on regular expressions. The file format is
described in \fBregexp_table\fR(5).
.IP \fBstatic\fR
A table that always returns the same result. For example,
\fBstatic:foobar\fR always returns the string \fBfoobar\fR.
.IP \fBunix\fR
.IP "\fBstatic\fR (read-only)"
A table that always returns its name as lookup result. For example,
\fBstatic:foobar\fR always returns the string \fBfoobar\fR as lookup
result.
.IP "\fBunix\fR (read-only)"
A limited way to query the UNIX authentication database. The
following tables are implemented:
.RS

View File

@ -56,7 +56,7 @@ A non-standard directory is allowed only if the name is listed in the
standard \fBmain.cf\fR file, in the \fBalternate_config_directories\fR
configuration parameter value.
Only the super-user is allowed to specify arbitrary directory names.
Only the superuser is allowed to specify arbitrary directory names.
.SH FILES
.na
.nf

View File

@ -14,7 +14,7 @@ Postfix control program
.SH DESCRIPTION
.ad
.fi
This command is reserved for the super-user. To submit mail,
This command is reserved for the superuser. To submit mail,
use the Postfix \fBsendmail\fR command.
The \fBpostfix\fR command controls the operation of the Postfix

View File

@ -73,7 +73,7 @@ A non-standard directory is allowed only if the name is listed in the
standard \fBmain.cf\fR file, in the \fBalternate_config_directories\fR
configuration parameter value.
Only the super-user is allowed to specify arbitrary directory names.
Only the superuser is allowed to specify arbitrary directory names.
.SH FILES
.na
.nf

View File

@ -15,7 +15,7 @@ Postfix superintendent
.ad
.fi
The \fBpostsuper\fR command does maintenance jobs on the Postfix
queue. Use of the command is restricted to the super-user.
queue. Use of the command is restricted to the superuser.
By default, \fBpostsuper\fR performs the operations requested with the
\fB-s\fR and \fB-p\fR command-line options on all Postfix queue

View File

@ -44,32 +44,32 @@ characters after the pattern:
Toggles the case sensitivity flag. By default, matching is case
insensitive.
.IP "\fBm\fR (default: off)"
Toggles the PCRE_MULTILINE flag. When the flag is on, the \fB^\fR
Toggles the PCRE_MULTILINE flag. When this flag is on, the \fB^\fR
and \fb$\fR metacharacters match immediately after and immediately
before a newline character, respectively, in addition to
matching at the start and end of the subject string.
.IP "\fBs\fR (default: on)"
Toggle the PCRE_DOTALL flag. When the flag is on, the \fB.\fR
Toggles the PCRE_DOTALL flag. When this flag is on, the \fB.\fR
metacharacter matches the newline character. With
Postfix versions prior to 20020528, The flag is off by
default, which is inconvenient for multi-line message header
matching.
.IP "\fBx\fR (default: off)"
Toggles the pcre extended flag. When the flag is on, whitespace
Toggles the pcre extended flag. When this flag is on, whitespace
in the pattern (other than in a character class) and
characters between a \fB#\fR outside a character class and
the next newline character are ignored. An escaping backslash
can be used to include a whitespace or \fB#\fR character
as part of the pattern.
.IP "\fBA\fR (default: off)"
Toggles the PCRE_ANCHORED flag. When this flag is set,
Toggles the PCRE_ANCHORED flag. When this flag is on,
the pattern is forced to be "anchored", that is, it is
constrained to match only at the start of the string which
is being searched (the "subject string"). This effect can
also be achieved by appropriate constructs in the pattern
itself.
.IP "\fBE\fR (default: off)"
Toggles the PCRE_DOLLAR_ENDONLY flag. When this flag is set,
Toggles the PCRE_DOLLAR_ENDONLY flag. When this flag is on,
a \fB$\fR metacharacter in the pattern matches only at the
end of the subject string. Without this flag, a dollar also
matches immediately before the final character if it is a
@ -77,14 +77,14 @@ newline character (but not before any other newline
characters). This flag is ignored if PCRE_MULTILINE
flag is set.
.IP "\fBU\fR (default: off)"
Toggles the ungreedy matching flag. When this flag is set,
Toggles the ungreedy matching flag. When this flag is on,
the pattern matching engine inverts the "greediness" of
the quantifiers so that they are not greedy by default,
but become greedy if followed by "?". This flag can also
set by a (?U) modifier within the pattern.
.IP "\fBX\fR (default: off)"
Toggles the PCRE_EXTRA flag.
When this flag is set, any backslash in a pattern that is
When this flag is on, any backslash in a pattern that is
followed by a letter that has no special meaning causes an
error, thus reserving these combinations for future expansion.
.PP

View File

@ -227,7 +227,7 @@ The limit is enforced by the Postfix queue manager.
Limit the time for delivery to external command, for delivery via
the named \fBtransport\fR. The default limit is taken from the
\fBcommand_time_limit\fR parameter.
The limit is enforced by the Postfix queue manager.
The limit is enforced by the pipe delivery agent.
.SH SEE ALSO
.na
.nf

View File

@ -16,7 +16,7 @@ The \fBshowq\fR daemon reports the Postfix mail queue status.
It is the program that emulates the sendmail `mailq' command.
The \fBshowq\fR daemon can also be run in stand-alone mode
by the super-user. This mode of operation is used to emulate
by the superuser. This mode of operation is used to emulate
the `mailq' command while the Postfix mail system is down.
.SH SECURITY
.na

View File

@ -44,7 +44,7 @@ exec sed '
s/[<bB>]*canonical[</bB>]*(5)/<a href="canonical.5.html">&<\/a>/
s/[<bB>]*etrn[</bB>]*(5)/<a href="etrn.5.html">&<\/a>/
s/[<bB>]*pcre[</bBiI>]*_[</iIbB>]*table[</bB>]*(5)/<a href="pcre_table.5.html">&<\/a>/
s/[<bB>]*regexp[</bBiI>]*_[</iIbB>]*table[</bB>]*(5)/<a href="regexp_table.5.html">&<\/a>/
s/[<bB>]*reg[-</bB>]*\n*[ <bB>]*exp[</bBiI>]*_[</iIbB>]*table[</bB>]*(5)/<a href="regexp_table.5.html">&<\/a>/
s/[<bB>]*relocated[</bB>]*(5)/<a href="relocated.5.html">&<\/a>/
s/[<bB>]*trans[-</bB>]*\n*[ <bB>]*port[</bB>]*(5)/<a href="transport.5.html">&<\/a>/
s/[<bB>]*virtual[</bB>]*(5)/<a href="virtual.5.html">&<\/a>/

View File

@ -38,32 +38,32 @@
# Toggles the case sensitivity flag. By default, matching is case
# insensitive.
# .IP "\fBm\fR (default: off)"
# Toggles the PCRE_MULTILINE flag. When the flag is on, the \fB^\fR
# Toggles the PCRE_MULTILINE flag. When this flag is on, the \fB^\fR
# and \fb$\fR metacharacters match immediately after and immediately
# before a newline character, respectively, in addition to
# matching at the start and end of the subject string.
# .IP "\fBs\fR (default: on)"
# Toggle the PCRE_DOTALL flag. When the flag is on, the \fB.\fR
# Toggles the PCRE_DOTALL flag. When this flag is on, the \fB.\fR
# metacharacter matches the newline character. With
# Postfix versions prior to 20020528, The flag is off by
# default, which is inconvenient for multi-line message header
# matching.
# .IP "\fBx\fR (default: off)"
# Toggles the pcre extended flag. When the flag is on, whitespace
# Toggles the pcre extended flag. When this flag is on, whitespace
# in the pattern (other than in a character class) and
# characters between a \fB#\fR outside a character class and
# the next newline character are ignored. An escaping backslash
# can be used to include a whitespace or \fB#\fR character
# as part of the pattern.
# .IP "\fBA\fR (default: off)"
# Toggles the PCRE_ANCHORED flag. When this flag is set,
# Toggles the PCRE_ANCHORED flag. When this flag is on,
# the pattern is forced to be "anchored", that is, it is
# constrained to match only at the start of the string which
# is being searched (the "subject string"). This effect can
# also be achieved by appropriate constructs in the pattern
# itself.
# .IP "\fBE\fR (default: off)"
# Toggles the PCRE_DOLLAR_ENDONLY flag. When this flag is set,
# Toggles the PCRE_DOLLAR_ENDONLY flag. When this flag is on,
# a \fB$\fR metacharacter in the pattern matches only at the
# end of the subject string. Without this flag, a dollar also
# matches immediately before the final character if it is a
@ -71,14 +71,14 @@
# characters). This flag is ignored if PCRE_MULTILINE
# flag is set.
# .IP "\fBU\fR (default: off)"
# Toggles the ungreedy matching flag. When this flag is set,
# Toggles the ungreedy matching flag. When this flag is on,
# the pattern matching engine inverts the "greediness" of
# the quantifiers so that they are not greedy by default,
# but become greedy if followed by "?". This flag can also
# set by a (?U) modifier within the pattern.
# .IP "\fBX\fR (default: off)"
# Toggles the PCRE_EXTRA flag.
# When this flag is set, any backslash in a pattern that is
# When this flag is on, any backslash in a pattern that is
# followed by a letter that has no special meaning causes an
# error, thus reserving these combinations for future expansion.
# .PP

View File

@ -142,10 +142,12 @@ void cleanup_map11_tree(CLEANUP_STATE *state, TOK822 *tree,
* checking in one place, instead of having error handling code all over
* the place.
*/
#define NO_TOKEN_LIMIT 0
tok822_externalize(temp, tree->head, TOK822_STR_DEFL);
cleanup_map11_external(state, temp, maps, propagate);
tok822_free_tree(tree->head);
tree->head = tok822_scan(STR(temp), &tree->tail);
tree->head = tok822_scan(STR(temp), &tree->tail, NO_TOKEN_LIMIT);
vstring_free(temp);
}

View File

@ -151,10 +151,12 @@ void cleanup_masquerade_tree(TOK822 *tree, ARGV *masq_domains)
{
VSTRING *temp = vstring_alloc(100);
#define NO_TOKEN_LIMIT 0
tok822_externalize(temp, tree->head, TOK822_STR_DEFL);
cleanup_masquerade_external(temp, masq_domains);
tok822_free_tree(tree->head);
tree->head = tok822_scan(STR(temp), &tree->tail);
tree->head = tok822_scan(STR(temp), &tree->tail, NO_TOKEN_LIMIT);
vstring_free(temp);
}

View File

@ -170,8 +170,8 @@ static void cleanup_rewrite_sender(CLEANUP_STATE *state, HEADER_OPTS *hdr_opts,
* sender addresses, and regenerate the header line. Finally, pipe the
* result through the header line folding routine.
*/
tree = tok822_parse(vstring_str(header_buf)
+ strlen(hdr_opts->name) + 1);
tree = tok822_parse(vstring_str(header_buf) + strlen(hdr_opts->name) + 1,
var_token_limit);
addr_list = tok822_grep(tree, TOK822_ADDR);
for (tpp = addr_list; *tpp; tpp++) {
cleanup_rewrite_tree(*tpp);
@ -222,8 +222,8 @@ static void cleanup_rewrite_recip(CLEANUP_STATE *state, HEADER_OPTS *hdr_opts,
* recipient addresses, and regenerate the header line. Finally, pipe the
* result through the header line folding routine.
*/
tree = tok822_parse(vstring_str(header_buf)
+ strlen(hdr_opts->name) + 1);
tree = tok822_parse(vstring_str(header_buf) + strlen(hdr_opts->name) + 1,
var_token_limit);
addr_list = tok822_grep(tree, TOK822_ADDR);
for (tpp = addr_list; *tpp; tpp++) {
cleanup_rewrite_tree(*tpp);
@ -501,6 +501,8 @@ static void cleanup_header_done_callback(void *context)
/*
* Add a missing (Resent-)From: header.
*/
#define NO_TOKEN_LIMIT 0
if ((state->headers_seen & (1 << (state->resent[0] ?
HDR_RESENT_FROM : HDR_FROM))) == 0) {
quote_822_local(state->temp1, *state->sender ?
@ -509,7 +511,7 @@ static void cleanup_header_done_callback(void *context)
state->resent, vstring_str(state->temp1));
if (*state->sender && state->fullname && *state->fullname) {
vstring_sprintf(state->temp1, "(%s)", state->fullname);
token = tok822_parse(vstring_str(state->temp1));
token = tok822_parse(vstring_str(state->temp1), NO_TOKEN_LIMIT);
vstring_strcat(state->temp2, " ");
tok822_externalize(state->temp2, token, TOK822_STR_NONE);
tok822_free_tree(token);

View File

@ -80,10 +80,12 @@ void cleanup_rewrite_tree(TOK822 *tree)
VSTRING *dst = vstring_alloc(100);
VSTRING *src = vstring_alloc(100);
#define NO_TOKEN_LIMIT 0
tok822_externalize(src, tree->head, TOK822_STR_DEFL);
cleanup_rewrite_external(dst, STR(src));
tok822_free_tree(tree->head);
tree->head = tok822_scan(STR(dst), &tree->tail);
tree->head = tok822_scan(STR(dst), &tree->tail, NO_TOKEN_LIMIT);
vstring_free(dst);
vstring_free(src);
}

View File

@ -78,7 +78,9 @@ ARGV *mail_addr_crunch(const char *string, const char *extension)
* the result to external (quoted) form. Optionally apply the extension
* to each address found.
*/
tree = tok822_parse(string);
#define NO_TOKEN_LIMIT 0
tree = tok822_parse(string, NO_TOKEN_LIMIT);
addr_list = tok822_grep(tree, TOK822_ADDR);
for (tpp = addr_list; *tpp; tpp++) {
tok822_externalize(extern_addr, tpp[0]->head, TOK822_STR_DEFL);

View File

@ -90,6 +90,7 @@
/* int var_mime_maxdepth;
/* int var_mime_bound_len;
/* int var_header_limit;
/* int var_token_limit;
/* int var_disable_mime_input;
/* int var_disable_mime_oconv;
/* int var_strict_8bitmime;
@ -242,6 +243,7 @@ int var_db_read_buf;
int var_mime_maxdepth;
int var_mime_bound_len;
int var_header_limit;
int var_token_limit;
int var_disable_mime_input;
int var_disable_mime_oconv;
int var_strict_8bitmime;
@ -484,6 +486,7 @@ void mail_params_init()
VAR_DB_CREATE_BUF, DEF_DB_CREATE_BUF, &var_db_create_buf, 1, 0,
VAR_DB_READ_BUF, DEF_DB_READ_BUF, &var_db_read_buf, 1, 0,
VAR_HEADER_LIMIT, DEF_HEADER_LIMIT, &var_header_limit, 1, 0,
VAR_TOKEN_LIMIT, DEF_TOKEN_LIMIT, &var_token_limit, 1, 0,
VAR_MIME_MAXDEPTH, DEF_MIME_MAXDEPTH, &var_mime_maxdepth, 1, 0,
VAR_MIME_BOUND_LEN, DEF_MIME_BOUND_LEN, &var_mime_bound_len, 1, 0,
0,

View File

@ -776,7 +776,7 @@ extern int var_smtpd_rcpt_limit;
extern int var_smtpd_soft_erlim;
#define VAR_SMTPD_HARD_ERLIM "smtpd_hard_error_limit"
#define DEF_SMTPD_HARD_ERLIM 100
#define DEF_SMTPD_HARD_ERLIM 20
extern int var_smtpd_hard_erlim;
#define VAR_SMTPD_ERR_SLEEP "smtpd_error_sleep_time"
@ -962,9 +962,13 @@ extern int var_lmtp_quit_tmout;
extern int var_hopcount_limit;
#define VAR_HEADER_LIMIT "header_size_limit"
#define DEF_HEADER_LIMIT 10240
#define DEF_HEADER_LIMIT 102400
extern int var_header_limit;
#define VAR_TOKEN_LIMIT "header_address_token_limit"
#define DEF_TOKEN_LIMIT 10240
extern int var_token_limit;
#define VAR_EXTRA_RCPT_LIMIT "extract_recipient_limit"
#define DEF_EXTRA_RCPT_LIMIT 10240
extern int var_extra_rcpt_limit;
@ -1547,6 +1551,13 @@ extern bool var_strict_8bit_body;
#define DEF_STRICT_ENCODING 0
extern bool var_strict_encoding;
/*
* Bizarre.
*/
#define VAR_SENDER_ROUTING "sender_based_routing"
#define DEF_SENDER_ROUTING 0
extern bool var_sender_routing;
/* LICENSE
/* .ad
/* .fi

View File

@ -20,7 +20,7 @@
* Patches change the patchlevel and the release date. Snapshots change the
* release date only, unless they include the same bugfix as a patch release.
*/
#define MAIL_RELEASE_DATE "20020602"
#define MAIL_RELEASE_DATE "20020605"
#define VAR_MAIL_VERSION "mail_version"
#define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE

View File

@ -1439,3 +1439,352 @@ Header:
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage

View File

@ -3,6 +3,30 @@ MAIN Header:
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
garbage garbage garbage garbage garbage garbage garbage garbage garbage
HEADER END
BODY END
mime_state: warning: message header length exceeds safety limit

View File

@ -74,9 +74,9 @@ extern TOK822 **tok822_grep(TOK822 *, int);
/*
* tok822_parse.c
*/
extern TOK822 *tok822_scan(const char *, TOK822 **);
extern TOK822 *tok822_scan(const char *, TOK822 **, int);
extern TOK822 *tok822_scan_addr(const char *);
extern TOK822 *tok822_parse(const char *);
extern TOK822 *tok822_parse(const char *, int);
extern VSTRING *tok822_externalize(VSTRING *, TOK822 *, int);
extern VSTRING *tok822_internalize(VSTRING *, TOK822 *, int);

View File

@ -6,12 +6,14 @@
/* SYNOPSIS
/* #include <tok822.h>
/*
/* TOK822 *tok822_scan(str, tailp)
/* TOK822 *tok822_scan(str, tailp, limit)
/* const char *str;
/* TOK822 **tailp;
/* int limit;
/*
/* TOK822 *tok822_parse(str)
/* TOK822 *tok822_parse(str, limit)
/* const char *str;
/* int limit;
/*
/* TOK822 *tok822_scan_addr(str)
/* const char *str;
@ -36,11 +38,15 @@
/* tok822_scan() converts the external-form string in \fIstr\fR
/* to a linear token list. The \fItailp\fR argument is a null pointer
/* or receives the pointer value of the last result list element.
/* The \fIlimit\fR argument is either zero or an upper bound on the
/* number of tokens produced.
/*
/* tok822_parse() converts the external-form address list in
/* \fIstr\fR to the corresponding token tree. The parser is permissive
/* and will not throw away information that it does not understand.
/* The parser adds missing commas between addresses.
/* The \fIlimit\fR argument is either zero or an upper bound on the
/* number of tokens produced.
/*
/* tok822_scan_addr() converts the external-form string in
/* \fIstr\fR to an address token tree. This is just string to
@ -316,12 +322,13 @@ static int tok822_append_space(TOK822 *tp)
/* tok822_scan - tokenize string */
TOK822 *tok822_scan(const char *str, TOK822 **tailp)
TOK822 *tok822_scan(const char *str, TOK822 **tailp, int tok_count_limit)
{
TOK822 *head = 0;
TOK822 *tail = 0;
TOK822 *tp;
int ch;
int tok_count = 0;
/*
* XXX 2822 new feature: Section 4.1 allows "." to appear in a phrase (to
@ -357,6 +364,8 @@ TOK822 *tok822_scan(const char *str, TOK822 **tailp)
} else {
tail = tok822_append(tail, tp);
}
if (tok_count_limit > 0 && ++tok_count >= tok_count_limit)
break;
}
if (tailp)
*tailp = tail;
@ -365,7 +374,7 @@ TOK822 *tok822_scan(const char *str, TOK822 **tailp)
/* tok822_parse - translate external string to token tree */
TOK822 *tok822_parse(const char *str)
TOK822 *tok822_parse(const char *str, int tok_count_limit)
{
TOK822 *head;
TOK822 *tail;
@ -381,7 +390,7 @@ TOK822 *tok822_parse(const char *str)
* token list that contains all tokens, we can always convert back to
* string form.
*/
if ((first_token = tok822_scan(str, &last_token)) == 0)
if ((first_token = tok822_scan(str, &last_token, tok_count_limit)) == 0)
return (0);
/*
@ -538,7 +547,7 @@ TOK822 *tok822_scan_addr(const char *addr)
{
TOK822 *tree = tok822_alloc(TOK822_ADDR, (char *) 0);
tree->head = tok822_scan(addr, &tree->tail);
tree->head = tok822_scan(addr, &tree->tail, 0);
return (tree);
}
@ -580,6 +589,8 @@ int main(int unused_argc, char **unused_argv)
TOK822 *list;
VSTRING *buf = vstring_alloc(100);
#define TEST_TOKEN_LIMIT 20
while (readlline(buf, VSTREAM_IN, (int *) 0)) {
while (VSTRING_LEN(buf) > 0 && vstring_end(buf)[-1] == '\n') {
vstring_end(buf)[-1] = 0;
@ -587,7 +598,7 @@ int main(int unused_argc, char **unused_argv)
}
if (!isatty(vstream_fileno(VSTREAM_IN)))
vstream_printf(">>>%s<<<\n\n", vstring_str(buf));
list = tok822_parse(vstring_str(buf));
list = tok822_parse(vstring_str(buf), TEST_TOKEN_LIMIT);
vstream_printf("Parse tree:\n");
tok822_print(list, 0);
vstream_printf("\n");

View File

@ -53,6 +53,8 @@ TOK822 *tok822_rewrite(TOK822 *addr, const char *how)
* the result. Shipping external form is much simpler than shipping parse
* trees.
*/
#define NO_TOKEN_LIMIT 0
tok822_externalize(input_ext_form, addr->head, TOK822_STR_DEFL);
if (msg_verbose)
msg_info("tok822_rewrite: input: %s", vstring_str(input_ext_form));
@ -60,7 +62,8 @@ TOK822 *tok822_rewrite(TOK822 *addr, const char *how)
if (msg_verbose)
msg_info("tok822_rewrite: result: %s", vstring_str(canon_ext_form));
tok822_free_tree(addr->head);
addr->head = tok822_scan(vstring_str(canon_ext_form), &addr->tail);
addr->head = tok822_scan(vstring_str(canon_ext_form), &addr->tail,
NO_TOKEN_LIMIT);
vstring_free(input_ext_form);
vstring_free(canon_ext_form);

View File

@ -177,7 +177,9 @@ int deliver_token_string(LOCAL_STATE state, USER_ATTR usr_attr,
if (msg_verbose)
msg_info("deliver_token_string: %s", string);
tree = tok822_parse(string);
#define NO_TOKEN_LIMIT 0
tree = tok822_parse(string, NO_TOKEN_LIMIT);
for (addr = tree; addr != 0; addr = addr->next) {
if (addr->type == TOK822_ADDR) {
if (addr_count)

View File

@ -337,6 +337,7 @@ int var_local_con_lim;
int var_local_rcpt_lim;
int var_proc_limit;
bool var_verp_bounce_off;
bool var_sender_routing;
static QMGR_SCAN *qmgr_incoming;
static QMGR_SCAN *qmgr_deferred;
@ -561,6 +562,7 @@ int main(int argc, char **argv)
static CONFIG_BOOL_TABLE bool_table[] = {
VAR_ALLOW_MIN_USER, DEF_ALLOW_MIN_USER, &var_allow_min_user,
VAR_VERP_BOUNCE_OFF, DEF_VERP_BOUNCE_OFF, &var_verp_bounce_off,
VAR_SENDER_ROUTING, DEF_SENDER_ROUTING, &var_sender_routing,
0,
};

View File

@ -638,7 +638,12 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
* Resolve the destination to (transport, nexthop, address). The
* result address may differ from the one specified by the sender.
*/
resolve_clnt_query(recipient->address, &reply);
if (var_sender_routing == 0) {
resolve_clnt_query(recipient->address, &reply);
} else {
resolve_clnt_query(message->sender, &reply);
vstring_strcpy(reply.recipient, recipient->address);
}
if (message->filter_xport) {
vstring_strcpy(reply.transport, message->filter_xport);
if ((nexthop = split_at(STR(reply.transport), ':')) == 0

View File

@ -211,7 +211,7 @@
/* Limit the time for delivery to external command, for delivery via
/* the named \fBtransport\fR. The default limit is taken from the
/* \fBcommand_time_limit\fR parameter.
/* The limit is enforced by the Postfix queue manager.
/* The limit is enforced by the pipe delivery agent.
/* SEE ALSO
/* bounce(8) non-delivery status reports
/* master(8) process manager

View File

@ -249,7 +249,10 @@ static void postalias(char *map_type, char *path_name, int postalias_flags,
* Tokenize the input, so that we do the right thing when a quoted
* localpart contains special characters such as "@", ":" and so on.
*/
if ((tok_list = tok822_scan(STR(line_buffer), (TOK822 **) 0)) == 0)
#define NO_TOKEN_LIMIT 0
if ((tok_list = tok822_scan(STR(line_buffer), (TOK822 **) 0,
NO_TOKEN_LIMIT)) == 0)
continue;
/*

View File

@ -64,19 +64,23 @@
/* An indexed file type based on hashing.
/* This is available only on systems with support for Berkeley DB
/* databases.
/* .IP \fBldap\fR
/* .IP "\fBldap\fR (read-only)"
/* Perform lookups using the LDAP protocol. This is described
/* in an LDAP_README file.
/* .IP \fBpcre\fR
/* .IP "\fBmysql\fR (read-only)"
/* Perform lookups using the MYSQL protocol. This is described
/* in a MYSQL_README file.
/* .IP "\fBpcre\fR (read-only)"
/* A lookup table based on Perl Compatible Regular Expressions. The
/* file format is described in \fBpcre_table\fR(5).
/* .IP \fBregexp\fR
/* .IP "\fBregexp\fR (read-only)"
/* A lookup table based on regular expressions. The file format is
/* described in \fBregexp_table\fR(5).
/* .IP \fBstatic\fR
/* A table that always returns the same result. For example,
/* \fBstatic:foobar\fR always returns the string \fBfoobar\fR.
/* .IP \fBunix\fR
/* .IP "\fBstatic\fR (read-only)"
/* A table that always returns its name as lookup result. For example,
/* \fBstatic:foobar\fR always returns the string \fBfoobar\fR as lookup
/* result.
/* .IP "\fBunix\fR (read-only)"
/* A limited way to query the UNIX authentication database. The
/* following tables are implemented:
/* .RS

View File

@ -44,7 +44,7 @@
/* standard \fBmain.cf\fR file, in the \fBalternate_config_directories\fR
/* configuration parameter value.
/*
/* Only the super-user is allowed to specify arbitrary directory names.
/* Only the superuser is allowed to specify arbitrary directory names.
/* FILES
/* /var/spool/postfix, mail queue
/* /etc/postfix, configuration files

View File

@ -8,7 +8,7 @@
/* \fBpostfix\fR [\fB-c \fIconfig_dir\fR] [\fB-D\fR] [\fB-v\fR]
/* \fIcommand\fR
/* DESCRIPTION
/* This command is reserved for the super-user. To submit mail,
/* This command is reserved for the superuser. To submit mail,
/* use the Postfix \fBsendmail\fR command.
/*
/* The \fBpostfix\fR command controls the operation of the Postfix

View File

@ -61,7 +61,7 @@
/* standard \fBmain.cf\fR file, in the \fBalternate_config_directories\fR
/* configuration parameter value.
/*
/* Only the super-user is allowed to specify arbitrary directory names.
/* Only the superuser is allowed to specify arbitrary directory names.
/* FILES
/* /var/spool/postfix, mail queue
/* /etc/postfix, configuration files

View File

@ -9,7 +9,7 @@
/* [\fB-r \fIqueue_id\fR] [\fIdirectory ...\fR]
/* DESCRIPTION
/* The \fBpostsuper\fR command does maintenance jobs on the Postfix
/* queue. Use of the command is restricted to the super-user.
/* queue. Use of the command is restricted to the superuser.
/*
/* By default, \fBpostsuper\fR performs the operations requested with the
/* \fB-s\fR and \fB-p\fR command-line options on all Postfix queue
@ -821,7 +821,7 @@ int main(int argc, char **argv)
* owner.
*/
if (getuid())
msg_fatal("use of this command is reserved for the super-user");
msg_fatal("use of this command is reserved for the superuser");
set_ugid(var_owner_uid, var_owner_gid);
/*

View File

@ -296,6 +296,7 @@ int var_local_rcpt_lim; /* XXX */
int var_local_con_lim; /* XXX */
int var_proc_limit;
bool var_verp_bounce_off;
bool var_sender_routing;
static QMGR_SCAN *qmgr_incoming;
static QMGR_SCAN *qmgr_deferred;
@ -518,6 +519,7 @@ int main(int argc, char **argv)
static CONFIG_BOOL_TABLE bool_table[] = {
VAR_ALLOW_MIN_USER, DEF_ALLOW_MIN_USER, &var_allow_min_user,
VAR_VERP_BOUNCE_OFF, DEF_VERP_BOUNCE_OFF, &var_verp_bounce_off,
VAR_SENDER_ROUTING, DEF_SENDER_ROUTING, &var_sender_routing,
0,
};

View File

@ -518,7 +518,12 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
* Resolve the destination to (transport, nexthop, address). The
* result address may differ from the one specified by the sender.
*/
resolve_clnt_query(recipient->address, &reply);
if (var_sender_routing == 0) {
resolve_clnt_query(recipient->address, &reply);
} else {
resolve_clnt_query(message->sender, &reply);
vstring_strcpy(reply.recipient, recipient->address);
}
if (message->filter_xport) {
vstring_strcpy(reply.transport, message->filter_xport);
if ((nexthop = split_at(STR(reply.transport), ':')) == 0

View File

@ -379,8 +379,10 @@ static void enqueue(const int flags, const char *encoding, const char *sender,
* pickup would not be able to run chrooted, and it may not be desirable
* to use login names at all.
*/
#define NO_TOKEN_LIMIT 0
if (sender != 0) {
tree = tok822_parse(sender);
tree = tok822_parse(sender, NO_TOKEN_LIMIT);
for (naddr = 0, tp = tree; tp != 0; tp = tp->next)
if (tp->type == TOK822_ADDR)
naddr++, tok822_internalize(buf, tp->head, TOK822_STR_DEFL);
@ -433,7 +435,7 @@ static void enqueue(const int flags, const char *encoding, const char *sender,
rec_fputs(dst, REC_TYPE_VERP, verp_delims);
if (recipients) {
for (cpp = recipients; *cpp != 0; cpp++) {
tree = tok822_parse(*cpp);
tree = tok822_parse(*cpp, NO_TOKEN_LIMIT);
for (tp = tree; tp != 0; tp = tp->next) {
if (tp->type == TOK822_ADDR) {
tok822_internalize(buf, tp->head, TOK822_STR_DEFL);

View File

@ -10,7 +10,7 @@
/* It is the program that emulates the sendmail `mailq' command.
/*
/* The \fBshowq\fR daemon can also be run in stand-alone mode
/* by the super-user. This mode of operation is used to emulate
/* by the superuser. This mode of operation is used to emulate
/* the `mailq' command while the Postfix mail system is down.
/* SECURITY
/* .ad

View File

@ -591,15 +591,17 @@ static char *extract_addr(SMTPD_STATE *state, SMTPD_TOKEN *arg,
* XXX We have only one address parser, written according to the rules of
* RFC 822. That standard differs subtly from RFC 821.
*/
#define NO_TOKEN_LIMIT 0
if (msg_verbose)
msg_info("%s: input: %s", myname, STR(arg->vstrval));
if (STR(arg->vstrval)[0] == '<'
&& STR(arg->vstrval)[LEN(arg->vstrval) - 1] == '>') {
junk = mystrndup(STR(arg->vstrval) + 1, LEN(arg->vstrval) - 2);
tree = tok822_parse(junk);
tree = tok822_parse(junk, NO_TOKEN_LIMIT);
myfree(junk);
} else
tree = tok822_parse(STR(arg->vstrval));
tree = tok822_parse(STR(arg->vstrval), NO_TOKEN_LIMIT);
/*
* Find trouble.

View File

@ -249,7 +249,7 @@ static int data_read(SINK_STATE *state)
* VSTREAM and kernel read buffers dry up.
*/
if (vstream_peek(state->stream) <= 0
&& peekfd(vstream_fileno(state->stream)) <= 0)
&& readable(vstream_fileno(state->stream)) <= 0)
return (0);
}
return (0);
@ -333,7 +333,7 @@ static int command_read(SINK_STATE *state)
* VSTREAM and kernel read buffers dry up.
*/
if (vstream_peek(state->stream) <= 0
&& peekfd(vstream_fileno(state->stream)) <= 0)
&& readable(vstream_fileno(state->stream)) <= 0)
return (0);
}

View File

@ -134,10 +134,13 @@ void resolve_addr(char *addr, VSTRING *channel, VSTRING *nexthop,
/*
* A lone empty string becomes the postmaster.
*/
#define NO_TOKEN_LIMIT 0
if (tree->head == tree->tail && tree->head->type == TOK822_QSTRING
&& VSTRING_LEN(tree->head->vstr) == 0) {
tok822_free(tree->head);
tree->head = tok822_scan(MAIL_ADDR_POSTMASTER, &tree->tail);
tree->head = tok822_scan(MAIL_ADDR_POSTMASTER, &tree->tail,
NO_TOKEN_LIMIT);
rewrite_tree(REWRITE_CANON, tree);
}
@ -195,7 +198,8 @@ void resolve_addr(char *addr, VSTRING *channel, VSTRING *nexthop,
saved_domain = 0;
} else {
tok822_sub_append(tree, tok822_alloc('@', (char *) 0));
tok822_sub_append(tree, tok822_scan(var_myhostname, (TOK822 **) 0));
tok822_sub_append(tree, tok822_scan(var_myhostname, (TOK822 **) 0,
NO_TOKEN_LIMIT));
}
}
tok822_internalize(nextrcpt, tree, TOK822_STR_DEFL);

View File

@ -151,9 +151,12 @@ void rewrite_tree(char *unused_ruleset, TOK822 *tree)
/*
* Append missing @origin
*/
#define NO_TOKEN_LIMIT 0
else if (var_append_at_myorigin != 0) {
domain = tok822_sub_append(tree, tok822_alloc('@', (char *) 0));
tok822_sub_append(tree, tok822_scan(var_myorigin, (TOK822 **) 0));
tok822_sub_append(tree, tok822_scan(var_myorigin, (TOK822 **) 0,
NO_TOKEN_LIMIT));
}
}
@ -165,7 +168,8 @@ void rewrite_tree(char *unused_ruleset, TOK822 *tree)
&& tok822_find_type(domain, TOK822_DOMLIT) == 0
&& tok822_find_type(domain, '.') == 0) {
tok822_sub_append(tree, tok822_alloc('.', (char *) 0));
tok822_sub_append(tree, tok822_scan(var_mydomain, (TOK822 **) 0));
tok822_sub_append(tree, tok822_scan(var_mydomain, (TOK822 **) 0,
NO_TOKEN_LIMIT));
}
/*