mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-30 05:38:06 +00:00
postfix-1.1.11-20020528
This commit is contained in:
parent
de55e170c1
commit
2f5c5bf795
@ -6547,6 +6547,31 @@ Apologies for any names omitted.
|
||||
before and after the filter, with header/body checks turned
|
||||
off in the second cleanup server.
|
||||
|
||||
20020528
|
||||
|
||||
Feature: strict_7bit_headers and strict_8bitmime_body are
|
||||
now separately available. To to turn on both, use
|
||||
strict_8bitmime.
|
||||
|
||||
Cleanup: abandon the use of isspace(3) in the parsing of
|
||||
RFC822 message headers. Files: global/lex_822.h and lots
|
||||
of little places.
|
||||
|
||||
Documentation: replace domain.name by domain.tld in the
|
||||
example config files. The domain exists. They were getting
|
||||
mail from poorly configured Postfix boxes.
|
||||
|
||||
Bugfix: The Postfix sendmail command did not export the
|
||||
MAIL_CONFIG environment setting to the postdrop command.
|
||||
File: global/mail_config.h.
|
||||
|
||||
Incompatibility: by default, turn on the PCRE_DOTALL flag,
|
||||
so that PCRE patterns will match multi-line message headers
|
||||
without causing pain. Suggested by Michael Tokarev. Also
|
||||
documented all those darned undocumented PCRE flags in the
|
||||
pcre_table(5) manual page. Files: util/dict_pcre.c,
|
||||
proto/pcre_table.
|
||||
|
||||
Open problems:
|
||||
|
||||
Medium: old maildrop files are no longer readable by the
|
||||
|
@ -316,7 +316,7 @@ up virtual interfaces for a variety of UNIX versions.
|
||||
|
||||
In the /etc/postfix/main.cf file, I would specify
|
||||
|
||||
myhostname = virtual.host.name
|
||||
myhostname = virtual.host.tld
|
||||
inet_interfaces = $myhostname
|
||||
mydestination = $myhostname
|
||||
|
||||
@ -402,7 +402,7 @@ configuration language uses lazy evaluation, and does not look at
|
||||
a parameter value until it is needed at runtime.
|
||||
|
||||
First of all, you must specify what domain will be appended to an
|
||||
unqualified address (i.e. an address without @domain.name). The
|
||||
unqualified address (i.e. an address without @domain.tld). The
|
||||
"myorigin" parameter defaults to the local hostname, but that is
|
||||
probably OK only for very small sites.
|
||||
|
||||
|
@ -77,7 +77,7 @@ can take a while), you're ready to test the "fast ETRN" service.
|
||||
Telnet to the Postfix SMTP server from a client that is allowed to
|
||||
execute ETRN commands (by default, that's every client), and type:
|
||||
|
||||
helo my.client.name
|
||||
helo my.client.tld
|
||||
etrn some.customer.domain
|
||||
|
||||
where "some.customer.domain" is the name of a domain that has a
|
||||
@ -99,7 +99,7 @@ Repeat the exercise with another domain that your server is willing
|
||||
to relay to (domain listed in "relay_domains"), but that has no mail
|
||||
queued.
|
||||
|
||||
helo my.client.name
|
||||
helo my.client.tld
|
||||
etrn some.other.customer.domain
|
||||
|
||||
This time, the "etrn" command should trigger NO mail deliveries at
|
||||
@ -110,7 +110,7 @@ Finally, repeat the exercise with a destination that your mail
|
||||
server is not willing to relay to. It does not matter if your
|
||||
server has mail queued for that destination.
|
||||
|
||||
helo my.client.name
|
||||
helo my.client.tld
|
||||
etrn not.a.customer.domain
|
||||
|
||||
If your "fast ETRN" caching policy is left at its default setting,
|
||||
|
@ -230,7 +230,7 @@ a dedicated listener on port localhost 10026:
|
||||
localhost:10026 inet n - n - 10 smtpd
|
||||
-o content_filter=
|
||||
-o local_recipient_maps=
|
||||
-o myhostname=localhost.domain.name
|
||||
-o myhostname=localhost.domain.tld
|
||||
-o smtpd_helo_restrictions=
|
||||
-o smtpd_client_restrictions=
|
||||
-o smtpd_sender_restrictions=
|
||||
@ -245,7 +245,7 @@ The "-o local_recipient_maps=" is a safety in case you have specified
|
||||
local_recipient_maps in the main.cf file. That could interfere with
|
||||
content filtering.
|
||||
|
||||
The "-o myhostname=localhost.domain.name" avoids a possible problem
|
||||
The "-o myhostname=localhost.domain.tld" avoids a possible problem
|
||||
if the content filter is picky about the hostname that Postfix
|
||||
sends in SMTP server replies.
|
||||
|
||||
@ -343,7 +343,7 @@ cleanup unix n - n - 0 cleanup
|
||||
# ensures that the original envelope recipient is seen by the
|
||||
# content filter.
|
||||
#
|
||||
scan unix n - n - 10 smtp
|
||||
scan unix - - n - 10 smtp
|
||||
-o disable_dns_lookups=yes
|
||||
#
|
||||
# This is the SMTP listener that receives filtered messages from
|
||||
@ -368,7 +368,7 @@ scan unix n - n - 10 smtp
|
||||
#
|
||||
localhost:10026 inet n - n - - smtpd
|
||||
-o content_filter=
|
||||
-o myhostname=localhost.domain.name
|
||||
-o myhostname=localhost.domain.tld
|
||||
-o local_recipient_maps=
|
||||
-o virtual_maps=
|
||||
-o virtual_mailbox_maps=
|
||||
@ -395,7 +395,7 @@ cleanup2 unix n - n - 0 cleanup
|
||||
# Definitely do not set "disable_dns_lookups = yes" here if you
|
||||
# send mail to the Internet.
|
||||
#
|
||||
smtp unix n - n - - smtp
|
||||
smtp unix - - n - - smtp
|
||||
|
||||
This causes Postfix to add one extra content filtering record to
|
||||
each incoming mail message, with content scan:localhost:10025.
|
||||
|
@ -135,10 +135,20 @@ and so on. In some cases, optimization is turned off automatically.
|
||||
In order to build with non-default settings, for example, with a
|
||||
configuration directory other than /etc/postfix, use:
|
||||
|
||||
% make makefiles CCARGS=-DDEF_CONFIG_DIR=\\\\\\\"/some/where\\\\\\\"
|
||||
% make makefiles CCARGS='-DDEF_CONFIG_DIR=\"/some/where\"'
|
||||
% make
|
||||
|
||||
That's seven backslashes :-) But at least this works with sh and csh.
|
||||
Be sure to get the quotes right. These details matter a lot.
|
||||
|
||||
Other parameters whose defaults can be specified in this way are:
|
||||
|
||||
Macro name default value for
|
||||
-------------------------------------
|
||||
DEF_COMMAND_DIR command_directory
|
||||
DEF_DAEMON_DIR daemon_directory
|
||||
DEF_SENDMAIL_PATH sendmail_path
|
||||
DEF_MAILQ_PATH mailq_path
|
||||
DEF_NEWALIAS_PATH newaliases_path
|
||||
|
||||
In order to build Postfix for very large applications, where you
|
||||
expect to run more than 1000 delivery processes, you may need to
|
||||
@ -209,16 +219,22 @@ In order to install or upgrade Postfix:
|
||||
|
||||
postfix:*:12345:12345:postfix:/no/where:/no/shell
|
||||
|
||||
Note: there should be no whitespace before "postfix:".
|
||||
|
||||
- Make sure there is a corresponding alias in /etc/aliases:
|
||||
|
||||
postfix: root
|
||||
|
||||
Note: there should be no whitespace before "postfix:".
|
||||
|
||||
- Create a group "postdrop" with a group id that is not used by
|
||||
any other user account. Not even by the postfix user account.
|
||||
My group file entry looks like:
|
||||
|
||||
postdrop:*:54321:
|
||||
|
||||
Note: there should be no whitespace before "postdrop:".
|
||||
|
||||
NB: this group was optional with older Postfix releases; it is
|
||||
now required.
|
||||
|
||||
@ -285,7 +301,7 @@ In order to inspect the mail queue, use
|
||||
|
||||
% sendmail -bp
|
||||
|
||||
See also the "Care and feeding" section 13 below.
|
||||
See also the "Care and feeding" section 12 below.
|
||||
|
||||
8 - Configuring Postfix to send and receive mail (virtual interface)
|
||||
====================================================================
|
||||
@ -300,7 +316,7 @@ up virtual interfaces for a variety of UNIX versions.
|
||||
|
||||
In the /etc/postfix/main.cf file, I would specify
|
||||
|
||||
myhostname = virtual.host.name
|
||||
myhostname = virtual.host.tld
|
||||
inet_interfaces = $myhostname
|
||||
mydestination = $myhostname
|
||||
|
||||
@ -327,7 +343,7 @@ In order to inspect the mail queue, use
|
||||
|
||||
% sendmail -bp
|
||||
|
||||
See also the "Care and feeding" section 13 below.
|
||||
See also the "Care and feeding" section 12 below.
|
||||
|
||||
9 - Turning off sendmail forever
|
||||
================================
|
||||
@ -357,7 +373,7 @@ and watch the syslog file for any complaints from the mail system.
|
||||
Typical logfile names are: /var/log/maillog or /var/log/syslog.
|
||||
See /etc/syslog.conf for actual logfile names.
|
||||
|
||||
See also the "Care and feeding" section 13 below.
|
||||
See also the "Care and feeding" section 12 below.
|
||||
|
||||
10 - Mandatory configuration file edits
|
||||
=======================================
|
||||
@ -386,7 +402,7 @@ configuration language uses lazy evaluation, and does not look at
|
||||
a parameter value until it is needed at runtime.
|
||||
|
||||
First of all, you must specify what domain will be appended to an
|
||||
unqualified address (i.e. an address without @domain.name). The
|
||||
unqualified address (i.e. an address without @domain.tld). The
|
||||
"myorigin" parameter defaults to the local hostname, but that is
|
||||
probably OK only for very small sites.
|
||||
|
||||
|
@ -265,8 +265,8 @@ to route mail for multiple domains to their respective mail retrieval
|
||||
|
||||
/etc/postfix/transport:
|
||||
|
||||
domain1.name lmtp1:unix:/path/name
|
||||
domain2.name lmtp2:lmtp2host
|
||||
domain1.tld lmtp1:unix:/path/name
|
||||
domain2.tld lmtp2:lmtp2host
|
||||
|
||||
/etc/postfix/master.cf:
|
||||
|
||||
@ -466,8 +466,8 @@ Cyrus 1.6.24 LMTP server:
|
||||
|
||||
/etc/postfix/transport:
|
||||
|
||||
domain1.name lmtp1:lmtp1host
|
||||
domain2.name lmtp2:lmtp2host
|
||||
domain1.tld lmtp1:lmtp1host
|
||||
domain2.tld lmtp2:lmtp2host
|
||||
|
||||
/etc/postfix/master.cf:
|
||||
|
||||
|
@ -190,9 +190,9 @@ Testing SASL authentication in the Postfix SMTP server
|
||||
To test the whole mess, connect to the SMTP server, and you should
|
||||
be able to have a conversation like this:
|
||||
|
||||
220 server.host.name ESMTP Postfix
|
||||
EHLO client.host.name
|
||||
250-server.host.name
|
||||
220 server.host.tld ESMTP Postfix
|
||||
EHLO client.host.tld
|
||||
250-server.host.tld
|
||||
250-PIPELINING
|
||||
250-SIZE 10240000
|
||||
250-ETRN
|
||||
|
@ -270,11 +270,11 @@ domains):
|
||||
virtual_maps = hash:/etc/postfix/virtual
|
||||
|
||||
/etc/postfix/virtual:
|
||||
user@domain.name user@domain.name, user@autoreply.domain.name
|
||||
user@domain.tld user@domain.tld, user@autoreply.domain.tld
|
||||
|
||||
This delivers mail to the recipient, and sends a copy of the mail
|
||||
to the address that produces automatic replies. The address can be
|
||||
serviced on a different machine, or it can be serviced locally by
|
||||
setting up a transport map entry that pipes all mail for the
|
||||
autoreply.domain.name into some script that sends an automatic
|
||||
autoreply.domain.tld into some script that sends an automatic
|
||||
reply back to the sender.
|
||||
|
@ -12,6 +12,36 @@ snapshot release). Patches change the patchlevel and the release
|
||||
date. Snapshots change only the release date, unless they include
|
||||
the same bugfixes as a patch release.
|
||||
|
||||
Incompatible changes with Postfix snapshot 1.1.11-20020528
|
||||
==========================================================
|
||||
|
||||
With PCRE pattern matching, the `.' metacharacter now matches all
|
||||
characters including newline characters. This makes PCRE pattern
|
||||
matching more convenient to use with multi-line message headers,
|
||||
and also makes PCRE more compatible with regexp pattern matching.
|
||||
The pcre_table(5) manual page has been greatly revised.
|
||||
|
||||
Major changes with Postfix snapshot 1.1.11-20020528
|
||||
===================================================
|
||||
|
||||
Postfix can enforce specific aspects of the MIME standards while
|
||||
receiving mail.
|
||||
|
||||
* Specify "strict_7bit_headers = yes" to disallow 8-bit characters
|
||||
in message headers. These are always illegal.
|
||||
|
||||
* Specify "strict_8bitmime_body = yes" to block mail with 8-bit
|
||||
content that is not properly labeled as 8-bit MIME. This blocks
|
||||
mail from poorly written mail software, including (bounces from
|
||||
qmail, bounces from Postfix before snapshot 20020514, and Majordomo
|
||||
approval requests) that contain valid 8BITMIME mail.
|
||||
|
||||
* Specify "strict_8bitmime = yes" to turn on both strict_7bit_headers
|
||||
and strict_8bitmime_body.
|
||||
|
||||
* Specify "strict_mime_encoding_domain = yes" to block mail from
|
||||
poorly written mail software. More details in conf/sample-mime.cf.
|
||||
|
||||
Incompatible changes with Postfix snapshot 1.1.11-20020527
|
||||
==========================================================
|
||||
|
||||
@ -71,13 +101,6 @@ delivering to an SMTP server that does not announce 8BITMIME support.
|
||||
To disable, specify "disable_mime_output_conversion = yes". However,
|
||||
this conversion is required by RFC standards.
|
||||
|
||||
Postfix can enforce some aspects of the MIME standards while
|
||||
receiving mail. Specify "strict_8bitmime = yes" to disallow 8-bit
|
||||
characters except where allowed by the MIME standard, and specify
|
||||
"strict_mime_encoding_domain = yes" to block mail from poorly
|
||||
written mail software, including majordomo approval requests that
|
||||
contain valid 8BITMIME mail. More details in conf/sample-mime.cf.
|
||||
|
||||
Incompatible changes with Postfix snapshot 1.1.10-20020514
|
||||
==========================================================
|
||||
|
||||
|
@ -53,16 +53,16 @@
|
||||
# user@domain
|
||||
# Matches the specified mail address.
|
||||
#
|
||||
# domain.name
|
||||
# Matches domain.name as the domain part of an email
|
||||
# domain.tld
|
||||
# Matches domain.tld as the domain part of an email
|
||||
# address.
|
||||
#
|
||||
# The pattern domain.name also matches subdomains,
|
||||
# but only when the string smtpd_access_maps is
|
||||
# listed in the Postfix parent_domain_matches_subdo-
|
||||
# mains configuration setting. Otherwise, specify
|
||||
# .domain.name (note the initial dot) in order to
|
||||
# match subdomains.
|
||||
# The pattern domain.tld also matches subdomains, but
|
||||
# only when the string smtpd_access_maps is listed in
|
||||
# the Postfix parent_domain_matches_subdomains con-
|
||||
# figuration setting. Otherwise, specify .domain.tld
|
||||
# (note the initial dot) in order to match subdo-
|
||||
# mains.
|
||||
#
|
||||
# user@ Matches all mail addresses with the specified user
|
||||
# part.
|
||||
@ -85,15 +85,15 @@
|
||||
# networked tables such as NIS, LDAP or SQL, the following
|
||||
# lookup patterns are examined in the order as listed:
|
||||
#
|
||||
# domain.name
|
||||
# Matches domain.name.
|
||||
# domain.tld
|
||||
# Matches domain.tld.
|
||||
#
|
||||
# The pattern domain.name also matches subdomains,
|
||||
# but only when the string smtpd_access_maps is
|
||||
# listed in the Postfix parent_domain_matches_subdo-
|
||||
# mains configuration setting. Otherwise, specify
|
||||
# .domain.name (note the initial dot) in order to
|
||||
# match subdomains.
|
||||
# The pattern domain.tld also matches subdomains, but
|
||||
# only when the string smtpd_access_maps is listed in
|
||||
# the Postfix parent_domain_matches_subdomains con-
|
||||
# figuration setting. Otherwise, specify .domain.tld
|
||||
# (note the initial dot) in order to match subdo-
|
||||
# mains.
|
||||
#
|
||||
# net.work.addr.ess
|
||||
#
|
||||
|
@ -65,15 +65,15 @@ mail_owner = postfix
|
||||
# from gethostname(). $myhostname is used as a default value for many
|
||||
# other configuration parameters.
|
||||
#
|
||||
#myhostname = host.domain.name
|
||||
#myhostname = virtual.domain.name
|
||||
#myhostname = host.domain.tld
|
||||
#myhostname = virtual.domain.tld
|
||||
|
||||
# The mydomain parameter specifies the local internet domain name.
|
||||
# The default is to use $myhostname minus the first component.
|
||||
# $mydomain is used as a default value for many other configuration
|
||||
# parameters.
|
||||
#
|
||||
#mydomain = domain.name
|
||||
#mydomain = domain.tld
|
||||
|
||||
# SENDING MAIL
|
||||
#
|
||||
@ -436,14 +436,14 @@ mail_owner = postfix
|
||||
#
|
||||
# Postfix maintains per-destination logfiles with information about
|
||||
# deferred mail, so that mail can be flushed quickly with the SMTP
|
||||
# "ETRN domain.name" command, or by executing "sendmail -qRdomain.name".
|
||||
# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
|
||||
#
|
||||
# By default, Postfix maintains deferred mail logfile information
|
||||
# only for destinations that Postfix is willing to relay to (as
|
||||
# specified in the relay_domains parameter). For other destinations,
|
||||
# Postfix attempts to deliver ALL queued mail after receiving the
|
||||
# SMTP "ETRN domain.name" command, or after execution of "sendmail
|
||||
# -qRdomain.name". This can be slow when a lot of mail is queued.
|
||||
# SMTP "ETRN domain.tld" command, or after execution of "sendmail
|
||||
# -qRdomain.tld". This can be slow when a lot of mail is queued.
|
||||
#
|
||||
# The fast_flush_domains parameter controls what destinations are
|
||||
# eligible for this "fast ETRN/sendmail -qR" service.
|
||||
|
@ -37,28 +37,87 @@
|
||||
# ally the forward slash is used). The regular expression
|
||||
# can contain whitespace.
|
||||
#
|
||||
# By default, matching is case-insensitive, although follow-
|
||||
# ing the second slash with an `i' flag will reverse this.
|
||||
# Other flags are supported, but the only other useful one
|
||||
# is `U', which makes matching ungreedy (see PCRE documenta-
|
||||
# tion and source for more info).
|
||||
# By default, matching is case-insensitive, and newlines are
|
||||
# not treated as special characters. The behavior is con-
|
||||
# trolled by flags, which are toggled by appending one or
|
||||
# more of the following characters after the pattern:
|
||||
#
|
||||
# Each pattern is applied to the entire lookup key string.
|
||||
# Depending on the application, that string is an entire
|
||||
# i (default: on)
|
||||
# Toggles the case sensitivity flag. By default,
|
||||
# matching is case insensitive.
|
||||
#
|
||||
# m (default: off)
|
||||
# Toggles the PCRE_MULTILINE flag. When the 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,
|
||||
# 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
|
||||
# on, whitespace in the pattern (other than in a
|
||||
# character class) and characters between a # outside
|
||||
# a character class and the next newline character
|
||||
# are ignored. An escaping backslash can be used to
|
||||
# include a whitespace or # character as part of the
|
||||
# pattern.
|
||||
#
|
||||
# A (default: off)
|
||||
# Toggles the PCRE_ANCHORED flag. When this flag is
|
||||
# set, 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.
|
||||
#
|
||||
# E (default: off)
|
||||
# Toggles the PCRE_DOLLAR_ENDONLY flag. When this
|
||||
# flag is set, 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
|
||||
# character (but not before any other newline charac-
|
||||
# ters). This flag is ignored if PCRE_MULTILINE flag
|
||||
# is set.
|
||||
#
|
||||
# U (default: off)
|
||||
# Toggles the ungreedy matching flag. When this flag
|
||||
# is set, 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.
|
||||
#
|
||||
# Each pattern is applied to the entire lookup key string.
|
||||
# Depending on the application, that string is an entire
|
||||
# client hostname, an entire client IP address, or an entire
|
||||
# mail address. Thus, no parent domain or parent network
|
||||
# search is done, and user@domain mail addresses are not
|
||||
# broken up into their user and domain constituent parts,
|
||||
# mail address. Thus, no parent domain or parent network
|
||||
# search is done, and user@domain mail addresses are not
|
||||
# broken up into their user and domain constituent parts,
|
||||
# nor is user+foo broken up into user and foo.
|
||||
#
|
||||
# Patterns are applied in the order as specified in the
|
||||
# table, until a pattern is found that matches the search
|
||||
# Patterns are applied in the order as specified in the
|
||||
# table, until a pattern is found that matches the search
|
||||
# string.
|
||||
#
|
||||
# Substitution of substrings from the matched expression
|
||||
# into the result string is possible using the conventional
|
||||
# perl syntax ($1, $2, etc.). The macros in the result
|
||||
# string may need to be written as ${n} or $(n) if they
|
||||
# Substitution of substrings from the matched expression
|
||||
# into the result string is possible using the conventional
|
||||
# perl syntax ($1, $2, etc.). The macros in the result
|
||||
# string may need to be written as ${n} or $(n) if they
|
||||
# aren't followed by whitespace.
|
||||
#
|
||||
# EXAMPLE SMTPD ACCESS MAP
|
||||
|
@ -44,21 +44,22 @@
|
||||
# By default, matching is case-insensitive, although follow-
|
||||
# ing the second slash with an `i' flag will reverse this.
|
||||
# Other flags are `x' (disable extended expression syntax),
|
||||
# and `m' (enable multi-line mode).
|
||||
# and `m' (enable multi-line mode, that is, treat newline
|
||||
# characters as special).
|
||||
#
|
||||
# Each pattern is applied to the entire lookup key string.
|
||||
# Depending on the application, that string is an entire
|
||||
# Each pattern is applied to the entire lookup key string.
|
||||
# Depending on the application, that string is an entire
|
||||
# client hostname, an entire client IP address, or an entire
|
||||
# mail address. Thus, no parent domain or parent network
|
||||
# search is done, and user@domain mail addresses are not
|
||||
# broken up into their user and domain constituent parts,
|
||||
# mail address. Thus, no parent domain or parent network
|
||||
# search is done, and user@domain mail addresses are not
|
||||
# broken up into their user and domain constituent parts,
|
||||
# nor is user+foo broken up into user and foo.
|
||||
#
|
||||
# Patterns are applied in the order as specified in the
|
||||
# table, until a pattern is found that matches the search
|
||||
# Patterns are applied in the order as specified in the
|
||||
# table, until a pattern is found that matches the search
|
||||
# string.
|
||||
#
|
||||
# Substitution of substrings from the matched expression
|
||||
# Substitution of substrings from the matched expression
|
||||
# into the result string is possible using $1, $2, etc.. The
|
||||
# macros in the result string may need to be written as ${n}
|
||||
# or $(n) if they aren't followed by whitespace.
|
||||
|
@ -34,16 +34,28 @@ mime_boundary_length_limit = 2048
|
||||
#
|
||||
mime_nesting_limit = 20
|
||||
|
||||
# Specify "yes" to reject mail with 8-bit text in message headers,
|
||||
# and with 8-bit text in message bodies that either claim to be 7-bit
|
||||
# format or that default to 7-bit format. This optional restriction
|
||||
# Specify "yes" to reject mail with 8-bit text in message headers.
|
||||
# This optional restriction is enforced while receiving mail.
|
||||
#
|
||||
# This blocks mail from poorly written mail software.
|
||||
#
|
||||
strict_7bit_headers = no
|
||||
|
||||
# Specify "yes" to reject mail with 8-bit text in message bodies that
|
||||
# are not sent as valid 8-bit MIME mail. This optional restriction
|
||||
# is enforced while receiving mail.
|
||||
#
|
||||
# This blocks mail from poorly written mail software. Unfortunately,
|
||||
# this also blocks approval requests from Majordomo when the included
|
||||
# request contains valid 8-bit MIME mail, and it may block 8-bit mail
|
||||
# this also blocks (bounces from qmail, bounces from older Postfix
|
||||
# versions, and approval requests from Majordomo) when the included
|
||||
# message contains valid 8-bit MIME mail, and it may block 8-bit mail
|
||||
# that is piped into /bin/mail or other MIME challenged software.
|
||||
#
|
||||
strict_8bitmime_body = no
|
||||
|
||||
# Specify "yes" to turn on both strict_7bit_headers and
|
||||
# strict_8bitmime_body.
|
||||
#
|
||||
strict_8bitmime = no
|
||||
|
||||
# Specify "yes" to reject mail with invalid Content-Transfer-Encoding:
|
||||
|
@ -209,14 +209,14 @@ mydestination = $myhostname, localhost.$mydomain
|
||||
# $mydomain is used as a default value for many other configuration
|
||||
# parameters.
|
||||
#
|
||||
#mydomain = domain.name
|
||||
#mydomain = domain.tld
|
||||
|
||||
# The myhostname parameter specifies the internet hostname of this
|
||||
# mail system. The default is to use the fully-qualified domain name
|
||||
# from gethostname(). $myhostname is used as a default value for many
|
||||
# other configuration parameters.
|
||||
#
|
||||
#myhostname = host.domain.name
|
||||
#myhostname = host.domain.tld
|
||||
|
||||
# The myorigin parameter specifies the domain that locally-posted
|
||||
# mail appears to come from. The default is to append $myhostname,
|
||||
@ -300,10 +300,10 @@ delay_notice_recipient = postmaster
|
||||
error_notice_recipient = postmaster
|
||||
|
||||
# The parent_domain_matches_subdomains parameter specifies what
|
||||
# Postfix features use "domain.name matches sub.domain.name" style
|
||||
# pattern matching instead of requiring ".domain.name". This is
|
||||
# Postfix features use "domain.tld matches sub.domain.tld" style
|
||||
# pattern matching instead of requiring ".domain.tld". This is
|
||||
# planned backwards compatibility: eventually, all Postfix features
|
||||
# are expected to require ".domain.name" style patterns.
|
||||
# are expected to require ".domain.tld" style patterns.
|
||||
#
|
||||
parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,
|
||||
mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,
|
||||
|
@ -161,9 +161,9 @@
|
||||
# command after a configuration change.
|
||||
#
|
||||
# parent_domain_matches_subdomains
|
||||
# List of Postfix features that use domain.name pat-
|
||||
# terns to match sub.domain.name (as opposed to
|
||||
# requiring .domain.name patterns).
|
||||
# List of Postfix features that use domain.tld pat-
|
||||
# terns to match sub.domain.tld (as opposed to
|
||||
# requiring .domain.tld patterns).
|
||||
#
|
||||
# transport_maps
|
||||
# List of transport lookup tables.
|
||||
|
@ -54,16 +54,16 @@ ACCESS(5) ACCESS(5)
|
||||
<i>user</i>@<i>domain</i>
|
||||
Matches the specified mail address.
|
||||
|
||||
<i>domain.name</i>
|
||||
Matches <i>domain.name</i> as the domain part of an email
|
||||
<i>domain.tld</i>
|
||||
Matches <i>domain.tld</i> as the domain part of an email
|
||||
address.
|
||||
|
||||
The pattern <i>domain.name</i> also matches subdomains,
|
||||
but only when the string <b>smtpd</b><i>_</i><b>access</b><i>_</i><b>maps</b> is
|
||||
listed in the Postfix <b>parent</b><i>_</i><b>domain</b><i>_</i><b>matches</b><i>_</i><b>subdo-</b>
|
||||
<b>mains</b> configuration setting. Otherwise, specify
|
||||
<i>.domain.name</i> (note the initial dot) in order to
|
||||
match subdomains.
|
||||
The pattern <i>domain.tld</i> also matches subdomains, but
|
||||
only when the string <b>smtpd</b><i>_</i><b>access</b><i>_</i><b>maps</b> is listed in
|
||||
the Postfix <b>parent</b><i>_</i><b>domain</b><i>_</i><b>matches</b><i>_</i><b>subdomains</b> con-
|
||||
figuration setting. Otherwise, specify <i>.domain.tld</i>
|
||||
(note the initial dot) in order to match subdo-
|
||||
mains.
|
||||
|
||||
<i>user</i>@ Matches all mail addresses with the specified user
|
||||
part.
|
||||
@ -86,15 +86,15 @@ ACCESS(5) ACCESS(5)
|
||||
networked tables such as NIS, LDAP or SQL, the following
|
||||
lookup patterns are examined in the order as listed:
|
||||
|
||||
<i>domain.name</i>
|
||||
Matches <i>domain.name</i>.
|
||||
<i>domain.tld</i>
|
||||
Matches <i>domain.tld</i>.
|
||||
|
||||
The pattern <i>domain.name</i> also matches subdomains,
|
||||
but only when the string <b>smtpd</b><i>_</i><b>access</b><i>_</i><b>maps</b> is
|
||||
listed in the Postfix <b>parent</b><i>_</i><b>domain</b><i>_</i><b>matches</b><i>_</i><b>subdo-</b>
|
||||
<b>mains</b> configuration setting. Otherwise, specify
|
||||
<i>.domain.name</i> (note the initial dot) in order to
|
||||
match subdomains.
|
||||
The pattern <i>domain.tld</i> also matches subdomains, but
|
||||
only when the string <b>smtpd</b><i>_</i><b>access</b><i>_</i><b>maps</b> is listed in
|
||||
the Postfix <b>parent</b><i>_</i><b>domain</b><i>_</i><b>matches</b><i>_</i><b>subdomains</b> con-
|
||||
figuration setting. Otherwise, specify <i>.domain.tld</i>
|
||||
(note the initial dot) in order to match subdo-
|
||||
mains.
|
||||
|
||||
<i>net.work.addr.ess</i>
|
||||
|
||||
|
@ -410,7 +410,7 @@ or you would have a mailer loop.
|
||||
|
||||
<dt> Host running virtual mailers:
|
||||
|
||||
<dd> <b>inet_interfaces = virtual.host.name</b> (virtual domain)
|
||||
<dd> <b>inet_interfaces = virtual.host.tld</b> (virtual domain)
|
||||
|
||||
<dd> <b>inet_interfaces = $myhostname localhost.$mydomain</b>
|
||||
(non-virtual mailer)
|
||||
|
@ -110,13 +110,24 @@ CLEANUP(8) CLEANUP(8)
|
||||
nested deeper.
|
||||
|
||||
<b>strict</b><i>_</i><b>8bitmime</b>
|
||||
Reject mail with 8-bit text in message headers, and
|
||||
with 8-bit text in content that claims to be 7-bit,
|
||||
or that has no explicit content encoding informa-
|
||||
tion. This blocks mail mail poorly written mail
|
||||
software. Unfortunately, this also breaks majordomo
|
||||
approval requests when the included request con-
|
||||
tains valid 8-bit MIME mail.
|
||||
Turn on both <b>strict</b><i>_</i><b>7bit</b><i>_</i><b>headers</b> and <b>strict</b><i>_</i><b>8bit-</b>
|
||||
<b>mime</b><i>_</i><b>body</b>.
|
||||
|
||||
<b>strict</b><i>_</i><b>7bit</b><i>_</i><b>headers</b>
|
||||
Reject mail with 8-bit text in message headers.
|
||||
This blocks mail from poorly written applications.
|
||||
|
||||
<b>strict</b><i>_</i><b>8bitmime</b><i>_</i><b>body</b>
|
||||
Reject mail with 8-bit text in content that claims
|
||||
to be 7-bit, or in content that has no explicit
|
||||
content encoding information. This blocks mail
|
||||
mail poorly written mail software. Unfortunately,
|
||||
this also breaks majordomo approval requests when
|
||||
the included request contains valid 8-bit MIME
|
||||
mail, and it breaks bounces from mailers that do
|
||||
not properly encapsulate 8-bit content (for exam-
|
||||
ple, bounces from qmail or from old versions of
|
||||
Postfix).
|
||||
|
||||
<b>strict</b><i>_</i><b>mime</b><i>_</i><b>domain</b><i>_</i><b>encoding</b>
|
||||
Reject mail with invalid <b>Content-Transfer-Encoding:</b>
|
||||
|
@ -1747,10 +1747,10 @@ all you need:
|
||||
|
||||
<pre>
|
||||
DNS:
|
||||
the.backed-up.domain.name IN MX 100 your.machine.name
|
||||
the.backed-up.domain.tld IN MX 100 your.machine.tld
|
||||
|
||||
/etc/postfix/main.cf:
|
||||
relay_domains = $mydestination the.backed-up.domain.name
|
||||
relay_domains = $mydestination the.backed-up.domain.tld
|
||||
smtpd_recipient_restrictions = permit_mynetworks check_relay_domains
|
||||
</pre>
|
||||
|
||||
@ -1766,7 +1766,7 @@ need:
|
||||
transport_maps = hash:/etc/postfix/transport
|
||||
|
||||
/etc/postfix/transport:
|
||||
the.backed-up.domain.name smtp:[their.mail.host.name]
|
||||
the.backed-up.domain.tld smtp:[their.mail.host.tld]
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@ -2207,14 +2207,14 @@ mail as user@domain</h3></a>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>In order to send mail as <i>user@domain.name</i>, specify what
|
||||
<li>In order to send mail as <i>user@domain.tld</i>, specify what
|
||||
domain is to be appended to addresses that do not have a domain:
|
||||
|
||||
<p>
|
||||
|
||||
<pre>
|
||||
/etc/postfix/main.cf:
|
||||
myorigin = domain.name
|
||||
myorigin = domain.tld
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@ -2719,7 +2719,7 @@ your system supports, use the command <b>postconf -m</b>.
|
||||
<a name="virtual_logging"><h3>Postfix logs delivery to virtual
|
||||
address with the wrong name</h3></a>
|
||||
|
||||
When Postfix delivers mail for a virtual address <i>vuser@vdomain.name</i>
|
||||
When Postfix delivers mail for a virtual address <i>vuser@vdomain.tld</i>
|
||||
that is aliased to a local user, then Postfix logs the local username
|
||||
instead of the virtual one.
|
||||
|
||||
@ -2742,15 +2742,15 @@ can be expensive if you have many virtual domains.
|
||||
recipient_delimiter = +
|
||||
|
||||
/etc/postfix/virtual_regexp:
|
||||
/^vdomain\.name$/ whatever
|
||||
/(.*)@vdomain\.name$/ localuser+$1=vdomain.name
|
||||
/^vdomain\.tld$/ whatever
|
||||
/(.*)@vdomain\.tld$/ localuser+$1=vdomain.tld
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<p>
|
||||
|
||||
This delivers the mail as
|
||||
<i>localuser+vuser=vdomain.name@your.domain</i>.
|
||||
<i>localuser+vuser=vdomain.tld@your.domain</i>.
|
||||
|
||||
<hr>
|
||||
|
||||
|
@ -136,9 +136,9 @@ FLUSH(8) FLUSH(8)
|
||||
days).
|
||||
|
||||
<b>parent</b><i>_</i><b>domain</b><i>_</i><b>matches</b><i>_</i><b>subdomains</b>
|
||||
List of Postfix features that use <i>domain.name</i> pat-
|
||||
terns to match <i>sub.domain.name</i> (as opposed to
|
||||
requiring <i>.domain.name</i> patterns).
|
||||
List of Postfix features that use <i>domain.tld</i> pat-
|
||||
terns to match <i>sub.domain.tld</i> (as opposed to
|
||||
requiring <i>.domain.tld</i> patterns).
|
||||
|
||||
<b>SEE</b> <b>ALSO</b>
|
||||
<a href="smtpd.8.html">smtpd(8)</a> Postfix SMTP server
|
||||
|
@ -38,28 +38,87 @@ PCRE_TABLE(5) PCRE_TABLE(5)
|
||||
ally the forward slash is used). The regular expression
|
||||
can contain whitespace.
|
||||
|
||||
By default, matching is case-insensitive, although follow-
|
||||
ing the second slash with an `i' flag will reverse this.
|
||||
Other flags are supported, but the only other useful one
|
||||
is `U', which makes matching ungreedy (see PCRE documenta-
|
||||
tion and source for more info).
|
||||
By default, matching is case-insensitive, and newlines are
|
||||
not treated as special characters. The behavior is con-
|
||||
trolled by flags, which are toggled by appending one or
|
||||
more of the following characters after the pattern:
|
||||
|
||||
Each pattern is applied to the entire lookup key string.
|
||||
Depending on the application, that string is an entire
|
||||
<b>i</b> (default: on)
|
||||
Toggles the case sensitivity flag. By default,
|
||||
matching is case insensitive.
|
||||
|
||||
<b>m</b> (default: off)
|
||||
Toggles the PCRE_MULTILINE flag. When the 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,
|
||||
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
|
||||
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
|
||||
are ignored. An escaping backslash can be used to
|
||||
include a whitespace or <b>#</b> character as part of the
|
||||
pattern.
|
||||
|
||||
<b>A</b> (default: off)
|
||||
Toggles the PCRE_ANCHORED flag. When this flag is
|
||||
set, 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.
|
||||
|
||||
<b>E</b> (default: off)
|
||||
Toggles the PCRE_DOLLAR_ENDONLY flag. When this
|
||||
flag is set, 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
|
||||
character (but not before any other newline charac-
|
||||
ters). This flag is ignored if PCRE_MULTILINE flag
|
||||
is set.
|
||||
|
||||
<b>U</b> (default: off)
|
||||
Toggles the ungreedy matching flag. When this flag
|
||||
is set, 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.
|
||||
|
||||
Each pattern is applied to the entire lookup key string.
|
||||
Depending on the application, that string is an entire
|
||||
client hostname, an entire client IP address, or an entire
|
||||
mail address. Thus, no parent domain or parent network
|
||||
search is done, and <i>user@domain</i> mail addresses are not
|
||||
broken up into their <i>user</i> and <i>domain</i> constituent parts,
|
||||
mail address. Thus, no parent domain or parent network
|
||||
search is done, and <i>user@domain</i> mail addresses are not
|
||||
broken up into their <i>user</i> and <i>domain</i> constituent parts,
|
||||
nor is <i>user+foo</i> broken up into <i>user</i> and <i>foo</i>.
|
||||
|
||||
Patterns are applied in the order as specified in the
|
||||
table, until a pattern is found that matches the search
|
||||
Patterns are applied in the order as specified in the
|
||||
table, until a pattern is found that matches the search
|
||||
string.
|
||||
|
||||
Substitution of substrings from the matched expression
|
||||
into the result string is possible using the conventional
|
||||
perl syntax ($1, $2, etc.). The macros in the result
|
||||
string may need to be written as ${n} or $(n) if they
|
||||
Substitution of substrings from the matched expression
|
||||
into the result string is possible using the conventional
|
||||
perl syntax ($1, $2, etc.). The macros in the result
|
||||
string may need to be written as ${n} or $(n) if they
|
||||
aren't followed by whitespace.
|
||||
|
||||
<b>EXAMPLE</b> <b>SMTPD</b> <b>ACCESS</b> <b>MAP</b>
|
||||
|
@ -45,21 +45,22 @@ REGEXP_TABLE(5) REGEXP_TABLE(5)
|
||||
By default, matching is case-insensitive, although follow-
|
||||
ing the second slash with an `i' flag will reverse this.
|
||||
Other flags are `x' (disable extended expression syntax),
|
||||
and `m' (enable multi-line mode).
|
||||
and `m' (enable multi-line mode, that is, treat newline
|
||||
characters as special).
|
||||
|
||||
Each pattern is applied to the entire lookup key string.
|
||||
Depending on the application, that string is an entire
|
||||
Each pattern is applied to the entire lookup key string.
|
||||
Depending on the application, that string is an entire
|
||||
client hostname, an entire client IP address, or an entire
|
||||
mail address. Thus, no parent domain or parent network
|
||||
search is done, and <i>user@domain</i> mail addresses are not
|
||||
broken up into their <i>user</i> and <i>domain</i> constituent parts,
|
||||
mail address. Thus, no parent domain or parent network
|
||||
search is done, and <i>user@domain</i> mail addresses are not
|
||||
broken up into their <i>user</i> and <i>domain</i> constituent parts,
|
||||
nor is <i>user+foo</i> broken up into <i>user</i> and <i>foo</i>.
|
||||
|
||||
Patterns are applied in the order as specified in the
|
||||
table, until a pattern is found that matches the search
|
||||
Patterns are applied in the order as specified in the
|
||||
table, until a pattern is found that matches the search
|
||||
string.
|
||||
|
||||
Substitution of substrings from the matched expression
|
||||
Substitution of substrings from the matched expression
|
||||
into the result string is possible using $1, $2, etc.. The
|
||||
macros in the result string may need to be written as ${n}
|
||||
or $(n) if they aren't followed by whitespace.
|
||||
|
@ -227,9 +227,9 @@ SMTPD(8) SMTPD(8)
|
||||
|
||||
<b>UCE</b> <b>control</b> <b>restrictions</b>
|
||||
<b>parent</b><i>_</i><b>domain</b><i>_</i><b>matches</b><i>_</i><b>subdomains</b>
|
||||
List of Postfix features that use <i>domain.name</i> pat-
|
||||
terns to match <i>sub.domain.name</i> (as opposed to
|
||||
requiring <i>.domain.name</i> patterns).
|
||||
List of Postfix features that use <i>domain.tld</i> pat-
|
||||
terns to match <i>sub.domain.tld</i> (as opposed to
|
||||
requiring <i>.domain.tld</i> patterns).
|
||||
|
||||
<b>smtpd</b><i>_</i><b>client</b><i>_</i><b>restrictions</b>
|
||||
Restrict what clients may connect to this mail sys-
|
||||
|
@ -162,9 +162,9 @@ TRANSPORT(5) TRANSPORT(5)
|
||||
command after a configuration change.
|
||||
|
||||
<b>parent</b><i>_</i><b>domain</b><i>_</i><b>matches</b><i>_</i><b>subdomains</b>
|
||||
List of Postfix features that use <i>domain.name</i> pat-
|
||||
terns to match <i>sub.domain.name</i> (as opposed to
|
||||
requiring <i>.domain.name</i> patterns).
|
||||
List of Postfix features that use <i>domain.tld</i> pat-
|
||||
terns to match <i>sub.domain.tld</i> (as opposed to
|
||||
requiring <i>.domain.tld</i> patterns).
|
||||
|
||||
<b>transport</b><i>_</i><b>maps</b>
|
||||
List of transport lookup tables.
|
||||
|
@ -118,9 +118,9 @@ TRIVIAL-REWRITE(8) TRIVIAL-REWRITE(8)
|
||||
details. The :<i>nexthop</i> part is optional.
|
||||
|
||||
<b>parent</b><i>_</i><b>domain</b><i>_</i><b>matches</b><i>_</i><b>subdomains</b>
|
||||
List of Postfix features that use <i>domain.name</i> pat-
|
||||
terns to match <i>sub.domain.name</i> (as opposed to
|
||||
requiring <i>.domain.name</i> patterns).
|
||||
List of Postfix features that use <i>domain.tld</i> pat-
|
||||
terns to match <i>sub.domain.tld</i> (as opposed to
|
||||
requiring <i>.domain.tld</i> patterns).
|
||||
|
||||
<b>relayhost</b>
|
||||
The default host to send non-local mail to when no
|
||||
|
@ -55,13 +55,13 @@ tables such as NIS, LDAP or SQL, the following lookup patterns are
|
||||
examined in the order as listed:
|
||||
.IP \fIuser\fR@\fIdomain\fR
|
||||
Matches the specified mail address.
|
||||
.IP \fIdomain.name\fR
|
||||
Matches \fIdomain.name\fR as the domain part of an email address.
|
||||
.IP \fIdomain.tld\fR
|
||||
Matches \fIdomain.tld\fR as the domain part of an email address.
|
||||
.sp
|
||||
The pattern \fIdomain.name\fR also matches subdomains, but only
|
||||
The pattern \fIdomain.tld\fR also matches subdomains, but only
|
||||
when the string \fBsmtpd_access_maps\fR is listed in the Postfix
|
||||
\fBparent_domain_matches_subdomains\fR configuration setting.
|
||||
Otherwise, specify \fI.domain.name\fR (note the initial dot) in
|
||||
Otherwise, specify \fI.domain.tld\fR (note the initial dot) in
|
||||
order to match subdomains.
|
||||
.IP \fIuser\fR@
|
||||
Matches all mail addresses with the specified user part.
|
||||
@ -88,13 +88,13 @@ When a mail address localpart contains the optional recipient delimiter
|
||||
With lookups from indexed files such as DB or DBM, or from networked
|
||||
tables such as NIS, LDAP or SQL, the following lookup patterns are
|
||||
examined in the order as listed:
|
||||
.IP \fIdomain.name\fR
|
||||
Matches \fIdomain.name\fR.
|
||||
.IP \fIdomain.tld\fR
|
||||
Matches \fIdomain.tld\fR.
|
||||
.sp
|
||||
The pattern \fIdomain.name\fR also matches subdomains, but only
|
||||
The pattern \fIdomain.tld\fR also matches subdomains, but only
|
||||
when the string \fBsmtpd_access_maps\fR is listed in the Postfix
|
||||
\fBparent_domain_matches_subdomains\fR configuration setting.
|
||||
Otherwise, specify \fI.domain.name\fR (note the initial dot) in
|
||||
Otherwise, specify \fI.domain.tld\fR (note the initial dot) in
|
||||
order to match subdomains.
|
||||
.IP \fInet.work.addr.ess\fR
|
||||
.IP \fInet.work.addr\fR
|
||||
|
@ -36,12 +36,58 @@ delimiter can be any character, except whitespace or characters
|
||||
that have special meaning (traditionally the forward slash is used).
|
||||
The regular expression can contain whitespace.
|
||||
|
||||
By default, matching is case-insensitive, although following
|
||||
the second slash with an `i' flag will reverse this. Other flags
|
||||
are supported, but the only other useful one is `U', which makes
|
||||
matching ungreedy (see PCRE documentation and source for more
|
||||
info).
|
||||
|
||||
By default, matching is case-insensitive, and newlines are not
|
||||
treated as special characters. The behavior is controlled by flags,
|
||||
which are toggled by appending one or more of the following
|
||||
characters after the pattern:
|
||||
.IP "\fBi\fR (default: on)"
|
||||
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
|
||||
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
|
||||
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
|
||||
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,
|
||||
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,
|
||||
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
|
||||
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,
|
||||
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
|
||||
followed by a letter that has no special meaning causes an
|
||||
error, thus reserving these combinations for future expansion.
|
||||
.PP
|
||||
Each pattern is applied to the entire lookup key string.
|
||||
Depending on the application, that string is an entire client
|
||||
hostname, an entire client IP address, or an entire mail address.
|
||||
|
@ -42,7 +42,7 @@ slash is used). The regular expression can contain whitespace.
|
||||
By default, matching is case-insensitive, although following
|
||||
the second slash with an `i' flag will reverse this. Other flags
|
||||
are `x' (disable extended expression syntax), and `m' (enable
|
||||
multi-line mode).
|
||||
multi-line mode, that is, treat newline characters as special).
|
||||
|
||||
Each pattern is applied to the entire lookup key string.
|
||||
Depending on the application, that string is an entire client
|
||||
|
@ -170,9 +170,9 @@ this topic. See the Postfix \fBmain.cf\fR file for syntax details
|
||||
and for default values. Use the \fBpostfix reload\fR command after
|
||||
a configuration change.
|
||||
.IP \fBparent_domain_matches_subdomains\fR
|
||||
List of Postfix features that use \fIdomain.name\fR patterns
|
||||
to match \fIsub.domain.name\fR (as opposed to
|
||||
requiring \fI.domain.name\fR patterns).
|
||||
List of Postfix features that use \fIdomain.tld\fR patterns
|
||||
to match \fIsub.domain.tld\fR (as opposed to
|
||||
requiring \fI.domain.tld\fR patterns).
|
||||
.IP \fBtransport_maps\fR
|
||||
List of transport lookup tables.
|
||||
.PP
|
||||
|
@ -106,12 +106,18 @@ between boundary strings that do not differ in the first
|
||||
The maximal nesting level of multipart mail that the MIME
|
||||
processor can handle. Refuse mail that is nested deeper.
|
||||
.IP \fBstrict_8bitmime\fR
|
||||
Reject mail with 8-bit text in message headers, and with
|
||||
8-bit text in content that claims to be 7-bit, or that has
|
||||
no explicit content encoding information. This blocks mail
|
||||
mail poorly written mail software. Unfortunately, this also
|
||||
breaks majordomo approval requests when the included request
|
||||
contains valid 8-bit MIME mail.
|
||||
Turn on both \fBstrict_7bit_headers\fR and \fBstrict_8bitmime_body\fR.
|
||||
.IP \fBstrict_7bit_headers\fR
|
||||
Reject mail with 8-bit text in message headers. This blocks
|
||||
mail from poorly written applications.
|
||||
.IP \fBstrict_8bitmime_body\fR
|
||||
Reject mail with 8-bit text in content that claims to be 7-bit,
|
||||
or in content that has no explicit content encoding information.
|
||||
This blocks mail mail poorly written mail software. Unfortunately,
|
||||
this also breaks majordomo approval requests when the included
|
||||
request contains valid 8-bit MIME mail, and it breaks bounces from
|
||||
mailers that do not properly encapsulate 8-bit content (for example,
|
||||
bounces from qmail or from old versions of Postfix).
|
||||
.IP \fBstrict_mime_domain_encoding\fR
|
||||
Reject mail with invalid \fBContent-Transfer-Encoding:\fR
|
||||
information for message/* or multipart/*. This blocks mail
|
||||
|
@ -127,9 +127,9 @@ a send request for the corresponding destination.
|
||||
Remove an empty "fast flush" logfile that was not updated in
|
||||
this amount of time (default time unit: days).
|
||||
.IP \fBparent_domain_matches_subdomains\fR
|
||||
List of Postfix features that use \fIdomain.name\fR patterns
|
||||
to match \fIsub.domain.name\fR (as opposed to
|
||||
requiring \fI.domain.name\fR patterns).
|
||||
List of Postfix features that use \fIdomain.tld\fR patterns
|
||||
to match \fIsub.domain.tld\fR (as opposed to
|
||||
requiring \fI.domain.tld\fR patterns).
|
||||
.SH SEE ALSO
|
||||
.na
|
||||
.nf
|
||||
|
@ -195,9 +195,9 @@ it is penalized with tarpit delays.
|
||||
.ad
|
||||
.fi
|
||||
.IP \fBparent_domain_matches_subdomains\fR
|
||||
List of Postfix features that use \fIdomain.name\fR patterns
|
||||
to match \fIsub.domain.name\fR (as opposed to
|
||||
requiring \fI.domain.name\fR patterns).
|
||||
List of Postfix features that use \fIdomain.tld\fR patterns
|
||||
to match \fIsub.domain.tld\fR (as opposed to
|
||||
requiring \fI.domain.tld\fR patterns).
|
||||
.IP \fBsmtpd_client_restrictions\fR
|
||||
Restrict what clients may connect to this mail system.
|
||||
.IP \fBsmtpd_helo_required\fR
|
||||
|
@ -115,9 +115,9 @@ The default transport is \fBsmtp\fR.
|
||||
Syntax is \fItransport\fR:\fInexthop\fR; see \fBtransport\fR(5)
|
||||
for details. The :\fInexthop\fR part is optional.
|
||||
.IP \fBparent_domain_matches_subdomains\fR
|
||||
List of Postfix features that use \fIdomain.name\fR patterns
|
||||
to match \fIsub.domain.name\fR (as opposed to
|
||||
requiring \fI.domain.name\fR patterns).
|
||||
List of Postfix features that use \fIdomain.tld\fR patterns
|
||||
to match \fIsub.domain.tld\fR (as opposed to
|
||||
requiring \fI.domain.tld\fR patterns).
|
||||
.IP \fBrelayhost\fR
|
||||
The default host to send non-local mail to when no entry is matched
|
||||
in the \fBtransport\fR(5) table.
|
||||
|
@ -45,13 +45,13 @@
|
||||
# examined in the order as listed:
|
||||
# .IP \fIuser\fR@\fIdomain\fR
|
||||
# Matches the specified mail address.
|
||||
# .IP \fIdomain.name\fR
|
||||
# Matches \fIdomain.name\fR as the domain part of an email address.
|
||||
# .IP \fIdomain.tld\fR
|
||||
# Matches \fIdomain.tld\fR as the domain part of an email address.
|
||||
# .sp
|
||||
# The pattern \fIdomain.name\fR also matches subdomains, but only
|
||||
# The pattern \fIdomain.tld\fR also matches subdomains, but only
|
||||
# when the string \fBsmtpd_access_maps\fR is listed in the Postfix
|
||||
# \fBparent_domain_matches_subdomains\fR configuration setting.
|
||||
# Otherwise, specify \fI.domain.name\fR (note the initial dot) in
|
||||
# Otherwise, specify \fI.domain.tld\fR (note the initial dot) in
|
||||
# order to match subdomains.
|
||||
# .IP \fIuser\fR@
|
||||
# Matches all mail addresses with the specified user part.
|
||||
@ -74,13 +74,13 @@
|
||||
# With lookups from indexed files such as DB or DBM, or from networked
|
||||
# tables such as NIS, LDAP or SQL, the following lookup patterns are
|
||||
# examined in the order as listed:
|
||||
# .IP \fIdomain.name\fR
|
||||
# Matches \fIdomain.name\fR.
|
||||
# .IP \fIdomain.tld\fR
|
||||
# Matches \fIdomain.tld\fR.
|
||||
# .sp
|
||||
# The pattern \fIdomain.name\fR also matches subdomains, but only
|
||||
# The pattern \fIdomain.tld\fR also matches subdomains, but only
|
||||
# when the string \fBsmtpd_access_maps\fR is listed in the Postfix
|
||||
# \fBparent_domain_matches_subdomains\fR configuration setting.
|
||||
# Otherwise, specify \fI.domain.name\fR (note the initial dot) in
|
||||
# Otherwise, specify \fI.domain.tld\fR (note the initial dot) in
|
||||
# order to match subdomains.
|
||||
# .IP \fInet.work.addr.ess\fR
|
||||
# .IP \fInet.work.addr\fR
|
||||
|
@ -30,12 +30,58 @@
|
||||
# that have special meaning (traditionally the forward slash is used).
|
||||
# The regular expression can contain whitespace.
|
||||
#
|
||||
# By default, matching is case-insensitive, although following
|
||||
# the second slash with an `i' flag will reverse this. Other flags
|
||||
# are supported, but the only other useful one is `U', which makes
|
||||
# matching ungreedy (see PCRE documentation and source for more
|
||||
# info).
|
||||
#
|
||||
# By default, matching is case-insensitive, and newlines are not
|
||||
# treated as special characters. The behavior is controlled by flags,
|
||||
# which are toggled by appending one or more of the following
|
||||
# characters after the pattern:
|
||||
# .IP "\fBi\fR (default: on)"
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# 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,
|
||||
# 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,
|
||||
# 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
|
||||
# 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,
|
||||
# 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
|
||||
# followed by a letter that has no special meaning causes an
|
||||
# error, thus reserving these combinations for future expansion.
|
||||
# .PP
|
||||
# Each pattern is applied to the entire lookup key string.
|
||||
# Depending on the application, that string is an entire client
|
||||
# hostname, an entire client IP address, or an entire mail address.
|
||||
|
@ -36,7 +36,7 @@
|
||||
# By default, matching is case-insensitive, although following
|
||||
# the second slash with an `i' flag will reverse this. Other flags
|
||||
# are `x' (disable extended expression syntax), and `m' (enable
|
||||
# multi-line mode).
|
||||
# multi-line mode, that is, treat newline characters as special).
|
||||
#
|
||||
# Each pattern is applied to the entire lookup key string.
|
||||
# Depending on the application, that string is an entire client
|
||||
|
@ -156,9 +156,9 @@
|
||||
# and for default values. Use the \fBpostfix reload\fR command after
|
||||
# a configuration change.
|
||||
# .IP \fBparent_domain_matches_subdomains\fR
|
||||
# List of Postfix features that use \fIdomain.name\fR patterns
|
||||
# to match \fIsub.domain.name\fR (as opposed to
|
||||
# requiring \fI.domain.name\fR patterns).
|
||||
# List of Postfix features that use \fIdomain.tld\fR patterns
|
||||
# to match \fIsub.domain.tld\fR (as opposed to
|
||||
# requiring \fI.domain.tld\fR patterns).
|
||||
# .IP \fBtransport_maps\fR
|
||||
# List of transport lookup tables.
|
||||
# .PP
|
||||
|
@ -139,6 +139,7 @@ bounce_notify_util.o: ../../include/mail_date.h
|
||||
bounce_notify_util.o: ../../include/mail_proto.h
|
||||
bounce_notify_util.o: ../../include/iostuff.h
|
||||
bounce_notify_util.o: ../../include/attr.h
|
||||
bounce_notify_util.o: ../../include/lex_822.h
|
||||
bounce_notify_util.o: bounce_service.h
|
||||
bounce_notify_verp.o: bounce_notify_verp.c
|
||||
bounce_notify_verp.o: ../../include/sys_defs.h
|
||||
|
@ -155,6 +155,7 @@
|
||||
#include <bounce_log.h>
|
||||
#include <mail_date.h>
|
||||
#include <mail_proto.h>
|
||||
#include <lex_822.h>
|
||||
|
||||
/* Application-specific. */
|
||||
|
||||
@ -558,7 +559,7 @@ int bounce_original(VSTREAM *bounce, BOUNCE_INFO *bounce_info,
|
||||
* raw record output here so that we don't throw away binary transparency
|
||||
* yet.
|
||||
*/
|
||||
#define IS_HEADER(s) (ISSPACE(*(s)) || is_header(s))
|
||||
#define IS_HEADER(s) (IS_SPACE_TAB(*(s)) || is_header(s))
|
||||
|
||||
bounce_length = 0;
|
||||
while (status == 0 && (rec_type = rec_get(bounce_info->orig_fp, bounce_info->buf, 0)) > 0) {
|
||||
|
@ -298,6 +298,7 @@ cleanup_message.o: ../../include/mail_proto.h
|
||||
cleanup_message.o: ../../include/iostuff.h
|
||||
cleanup_message.o: ../../include/attr.h
|
||||
cleanup_message.o: ../../include/mime_state.h
|
||||
cleanup_message.o: ../../include/lex_822.h
|
||||
cleanup_message.o: cleanup.h
|
||||
cleanup_message.o: ../../include/maps.h
|
||||
cleanup_message.o: ../../include/dict.h
|
||||
|
@ -92,12 +92,18 @@
|
||||
/* The maximal nesting level of multipart mail that the MIME
|
||||
/* processor can handle. Refuse mail that is nested deeper.
|
||||
/* .IP \fBstrict_8bitmime\fR
|
||||
/* Reject mail with 8-bit text in message headers, and with
|
||||
/* 8-bit text in content that claims to be 7-bit, or that has
|
||||
/* no explicit content encoding information. This blocks mail
|
||||
/* mail poorly written mail software. Unfortunately, this also
|
||||
/* breaks majordomo approval requests when the included request
|
||||
/* contains valid 8-bit MIME mail.
|
||||
/* Turn on both \fBstrict_7bit_headers\fR and \fBstrict_8bitmime_body\fR.
|
||||
/* .IP \fBstrict_7bit_headers\fR
|
||||
/* Reject mail with 8-bit text in message headers. This blocks
|
||||
/* mail from poorly written applications.
|
||||
/* .IP \fBstrict_8bitmime_body\fR
|
||||
/* Reject mail with 8-bit text in content that claims to be 7-bit,
|
||||
/* or in content that has no explicit content encoding information.
|
||||
/* This blocks mail mail poorly written mail software. Unfortunately,
|
||||
/* this also breaks majordomo approval requests when the included
|
||||
/* request contains valid 8-bit MIME mail, and it breaks bounces from
|
||||
/* mailers that do not properly encapsulate 8-bit content (for example,
|
||||
/* bounces from qmail or from old versions of Postfix).
|
||||
/* .IP \fBstrict_mime_domain_encoding\fR
|
||||
/* Reject mail with invalid \fBContent-Transfer-Encoding:\fR
|
||||
/* information for message/* or multipart/*. This blocks mail
|
||||
|
@ -79,6 +79,7 @@
|
||||
#include <ext_prop.h>
|
||||
#include <mail_proto.h>
|
||||
#include <mime_state.h>
|
||||
#include <lex_822.h>
|
||||
|
||||
/* Application-specific. */
|
||||
|
||||
@ -101,7 +102,7 @@ static void cleanup_out_header(CLEANUP_STATE *state, VSTRING *header_buf)
|
||||
*/
|
||||
for (line = start; line; line = next_line) {
|
||||
next_line = split_at(line, '\n');
|
||||
if (line == start || ISSPACE(*line)) {
|
||||
if (line == start || IS_SPACE_TAB(*line)) {
|
||||
cleanup_out_string(state, REC_TYPE_NORM, line);
|
||||
} else {
|
||||
cleanup_out_format(state, REC_TYPE_NORM, "\t%s", line);
|
||||
@ -654,9 +655,10 @@ void cleanup_message(CLEANUP_STATE *state, int type, char *buf, int len)
|
||||
} else {
|
||||
/* Turn off strict MIME checks if bouncing or forwarding mail. */
|
||||
if (state->flags & CLEANUP_FLAG_FILTER) {
|
||||
if (var_strict_8bitmime)
|
||||
mime_options |= (MIME_OPT_REPORT_8BIT_IN_HEADER
|
||||
| MIME_OPT_REPORT_8BIT_IN_7BIT_BODY);
|
||||
if (var_strict_8bitmime || var_strict_7bit_hdrs)
|
||||
mime_options |= MIME_OPT_REPORT_8BIT_IN_HEADER;
|
||||
if (var_strict_8bitmime || var_strict_8bit_body)
|
||||
mime_options |= MIME_OPT_REPORT_8BIT_IN_7BIT_BODY;
|
||||
if (var_strict_encoding)
|
||||
mime_options |= MIME_OPT_REPORT_ENCODING_DOMAIN;
|
||||
}
|
||||
|
@ -111,9 +111,9 @@
|
||||
/* Remove an empty "fast flush" logfile that was not updated in
|
||||
/* this amount of time (default time unit: days).
|
||||
/* .IP \fBparent_domain_matches_subdomains\fR
|
||||
/* List of Postfix features that use \fIdomain.name\fR patterns
|
||||
/* to match \fIsub.domain.name\fR (as opposed to
|
||||
/* requiring \fI.domain.name\fR patterns).
|
||||
/* List of Postfix features that use \fIdomain.tld\fR patterns
|
||||
/* to match \fIsub.domain.tld\fR (as opposed to
|
||||
/* requiring \fI.domain.tld\fR patterns).
|
||||
/* SEE ALSO
|
||||
/* smtpd(8) Postfix SMTP server
|
||||
/* qmgr(8) Postfix queue manager
|
||||
|
@ -57,7 +57,8 @@ HDRS = been_here.h bounce.h canon_addr.h cleanup_user.h clnt_stream.h \
|
||||
rewrite_clnt.h sent.h smtp_stream.h split_addr.h string_list.h \
|
||||
sys_exits.h timed_ipc.h tok822.h xtext.h bounce_log.h flush_clnt.h \
|
||||
mbox_conf.h mbox_open.h abounce.h qmqp_proto.h verp_sender.h \
|
||||
match_parent_style.h quote_flags.h mime_state.h header_token.h
|
||||
match_parent_style.h quote_flags.h mime_state.h header_token.h \
|
||||
lex_822.h
|
||||
TESTSRC = rec2stream.c stream2rec.c recdump.c
|
||||
WARN = -W -Wformat -Wimplicit -Wmissing-prototypes \
|
||||
-Wparentheses -Wstrict-prototypes -Wswitch -Wuninitialized \
|
||||
@ -458,6 +459,7 @@ header_token.o: ../../include/sys_defs.h
|
||||
header_token.o: ../../include/msg.h
|
||||
header_token.o: ../../include/vstring.h
|
||||
header_token.o: ../../include/vbuf.h
|
||||
header_token.o: lex_822.h
|
||||
header_token.o: header_token.h
|
||||
is_header.o: is_header.c
|
||||
is_header.o: ../../include/sys_defs.h
|
||||
@ -794,6 +796,7 @@ mime_state.o: is_header.h
|
||||
mime_state.o: header_opts.h
|
||||
mime_state.o: mail_params.h
|
||||
mime_state.o: header_token.h
|
||||
mime_state.o: lex_822.h
|
||||
mime_state.o: mime_state.h
|
||||
mkmap_db.o: mkmap_db.c
|
||||
mkmap_db.o: ../../include/sys_defs.h
|
||||
@ -1076,6 +1079,7 @@ tok822_parse.o: ../../include/sys_defs.h
|
||||
tok822_parse.o: ../../include/vstring.h
|
||||
tok822_parse.o: ../../include/vbuf.h
|
||||
tok822_parse.o: ../../include/msg.h
|
||||
tok822_parse.o: lex_822.h
|
||||
tok822_parse.o: quote_822_local.h
|
||||
tok822_parse.o: quote_flags.h
|
||||
tok822_parse.o: tok822.h
|
||||
|
@ -90,16 +90,11 @@
|
||||
|
||||
/* Global library. */
|
||||
|
||||
#include <lex_822.h>
|
||||
#include <header_token.h>
|
||||
|
||||
/* Application-specific. */
|
||||
|
||||
/*
|
||||
* Special characters and linear white space, as per RFC 822.
|
||||
*/
|
||||
#define RFC822_SPECIALS "()<>@,;:\\\".[]"
|
||||
#define RFC822_LWSP(ch) (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r')
|
||||
|
||||
/*
|
||||
* Silly little macros.
|
||||
*/
|
||||
@ -127,7 +122,7 @@ int header_token(HEADER_TOKEN *token, int token_len,
|
||||
cp = CU_CHAR_PTR(*ptr);
|
||||
tok_count = 0;
|
||||
if (user_specials == 0)
|
||||
user_specials = RFC822_SPECIALS;
|
||||
user_specials = LEX_822_SPECIALS;
|
||||
|
||||
/*
|
||||
* Main parsing loop.
|
||||
@ -138,7 +133,7 @@ int header_token(HEADER_TOKEN *token, int token_len,
|
||||
/*
|
||||
* Skip RFC 822 linear white space.
|
||||
*/
|
||||
if (RFC822_LWSP(ch))
|
||||
if (IS_SPACE_TAB_CR_LF(ch))
|
||||
continue;
|
||||
|
||||
/*
|
||||
@ -182,7 +177,7 @@ int header_token(HEADER_TOKEN *token, int token_len,
|
||||
break;
|
||||
if (ch == '\n') { /* unfold */
|
||||
len = LEN(token_buffer);
|
||||
while (len > 0 && RFC822_LWSP(STR(token_buffer)[len - 1]))
|
||||
while (len > 0 && IS_SPACE_TAB_CR_LF(STR(token_buffer)[len - 1]))
|
||||
len--;
|
||||
if (len < LEN(token_buffer))
|
||||
vstring_truncate(token_buffer, len);
|
||||
@ -226,7 +221,7 @@ int header_token(HEADER_TOKEN *token, int token_len,
|
||||
token[tok_count].type = HEADER_TOK_TOKEN;
|
||||
VSTRING_ADDCH(token_buffer, ch);
|
||||
}
|
||||
while ((ch = *cp) != 0 && !RFC822_LWSP(ch)
|
||||
while ((ch = *cp) != 0 && !IS_SPACE_TAB_CR_LF(ch)
|
||||
&& !ISCNTRL(ch) && !strchr(user_specials, ch)) {
|
||||
cp++;
|
||||
if (tok_count < token_len)
|
||||
|
36
postfix/src/global/lex_822.h
Normal file
36
postfix/src/global/lex_822.h
Normal file
@ -0,0 +1,36 @@
|
||||
#ifndef _SPACE_822_H_INCLUDED_
|
||||
#define _SPACE_822_H_INCLUDED_
|
||||
|
||||
/*++
|
||||
/* NAME
|
||||
/* lex_822 3h
|
||||
/* SUMMARY
|
||||
/* RFC822 lexicals
|
||||
/* SYNOPSIS
|
||||
/* #include <lex_822.h>
|
||||
/* DESCRIPTION
|
||||
/* .nf
|
||||
|
||||
/*
|
||||
* The predicate macros.
|
||||
*/
|
||||
#define IS_SPACE_TAB(ch) (ch == ' ' || ch == '\t')
|
||||
#define IS_SPACE_TAB_CR_LF(ch) (IS_SPACE_TAB(ch) || ch == '\r' || ch == '\n')
|
||||
|
||||
/*
|
||||
* Special characters as per RFC 822.
|
||||
*/
|
||||
#define LEX_822_SPECIALS "()<>@,;:\\\".[]"
|
||||
|
||||
/* LICENSE
|
||||
/* .ad
|
||||
/* .fi
|
||||
/* The Secure Mailer license must be distributed with this software.
|
||||
/* AUTHOR(S)
|
||||
/* Wietse Venema
|
||||
/* IBM T.J. Watson Research
|
||||
/* P.O. Box 704
|
||||
/* Yorktown Heights, NY 10598, USA
|
||||
/*--*/
|
||||
|
||||
#endif
|
@ -93,6 +93,8 @@
|
||||
/* int var_disable_mime_input;
|
||||
/* int var_disable_mime_oconv;
|
||||
/* int var_strict_8bitmime;
|
||||
/* int var_strict_7bit_hdrs;
|
||||
/* int var_strict_8bit_body;
|
||||
/* int var_strict_encoding;
|
||||
/*
|
||||
/* void mail_params_init()
|
||||
@ -243,6 +245,8 @@ int var_header_limit;
|
||||
int var_disable_mime_input;
|
||||
int var_disable_mime_oconv;
|
||||
int var_strict_8bitmime;
|
||||
int var_strict_7bit_hdrs;
|
||||
int var_strict_8bit_body;
|
||||
int var_strict_encoding;
|
||||
|
||||
#define MAIN_CONF_FILE "main.cf"
|
||||
@ -501,6 +505,8 @@ void mail_params_init()
|
||||
VAR_SOFT_BOUNCE, DEF_SOFT_BOUNCE, &var_soft_bounce,
|
||||
VAR_OWNREQ_SPECIAL, DEF_OWNREQ_SPECIAL, &var_ownreq_special,
|
||||
VAR_STRICT_8BITMIME, DEF_STRICT_8BITMIME, &var_strict_8bitmime,
|
||||
VAR_STRICT_7BIT_HDRS, DEF_STRICT_7BIT_HDRS, &var_strict_7bit_hdrs,
|
||||
VAR_STRICT_8BIT_BODY, DEF_STRICT_8BIT_BODY, &var_strict_8bit_body,
|
||||
VAR_STRICT_ENCODING, DEF_STRICT_ENCODING, &var_strict_encoding,
|
||||
VAR_DISABLE_MIME_INPUT, DEF_DISABLE_MIME_INPUT, &var_disable_mime_input,
|
||||
VAR_DISABLE_MIME_OCONV, DEF_DISABLE_MIME_OCONV, &var_disable_mime_oconv,
|
||||
|
@ -1283,7 +1283,7 @@ extern int var_fflush_refresh;
|
||||
extern char *var_import_environ;
|
||||
|
||||
#define VAR_EXPORT_ENVIRON "export_environment"
|
||||
#define DEF_EXPORT_ENVIRON "TZ"
|
||||
#define DEF_EXPORT_ENVIRON "TZ MAIL_CONFIG"
|
||||
extern char *var_export_environ;
|
||||
|
||||
/*
|
||||
@ -1535,6 +1535,14 @@ extern bool var_disable_mime_oconv;
|
||||
#define DEF_STRICT_8BITMIME 0
|
||||
extern bool var_strict_8bitmime;
|
||||
|
||||
#define VAR_STRICT_7BIT_HDRS "strict_7bit_headers"
|
||||
#define DEF_STRICT_7BIT_HDRS 0
|
||||
extern bool var_strict_7bit_hdrs;
|
||||
|
||||
#define VAR_STRICT_8BIT_BODY "strict_8bitmime_body"
|
||||
#define DEF_STRICT_8BIT_BODY 0
|
||||
extern bool var_strict_8bit_body;
|
||||
|
||||
#define VAR_STRICT_ENCODING "strict_mime_encoding_domain"
|
||||
#define DEF_STRICT_ENCODING 0
|
||||
extern bool var_strict_encoding;
|
||||
|
@ -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 "20020527"
|
||||
#define MAIL_RELEASE_DATE "20020528"
|
||||
|
||||
#define VAR_MAIL_VERSION "mail_version"
|
||||
#define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE
|
||||
|
@ -6,7 +6,8 @@
|
||||
/* SYNOPSIS
|
||||
/* #include <mime_state.h>
|
||||
/*
|
||||
/* MIME_STATE *mime_state_alloc(flags, head_out, body_out, context)
|
||||
/* MIME_STATE *mime_state_alloc(flags, head_out, head_end,
|
||||
/* body_out, body_end, context)
|
||||
/* int flags;
|
||||
/* void (*head_out)(void *ptr, int header_class,
|
||||
/* HEADER_OPTS *header_info, VSTRING *buf);
|
||||
@ -159,7 +160,7 @@
|
||||
/* span multiple input records.
|
||||
/*
|
||||
/* This module will not glue together RFC 2231 formatted (boundary)
|
||||
/* parameter values. RFC 2231 says claims compatibility with existing
|
||||
/* parameter values. RFC 2231 claims compatibility with existing
|
||||
/* MIME processors. Splitting boundary strings is not backwards
|
||||
/* compatible.
|
||||
/*
|
||||
@ -226,6 +227,7 @@
|
||||
#include <header_opts.h>
|
||||
#include <mail_params.h>
|
||||
#include <header_token.h>
|
||||
#include <lex_822.h>
|
||||
#include <mime_state.h>
|
||||
|
||||
/* Application-specific. */
|
||||
@ -269,7 +271,7 @@ struct MIME_STATE {
|
||||
*/
|
||||
int static_flags; /* static processing options */
|
||||
MIME_STATE_HEAD_OUT head_out; /* header output routine */
|
||||
MIME_STATE_ANY_END head_end; /* end of prinary header routine */
|
||||
MIME_STATE_ANY_END head_end; /* end of primary header routine */
|
||||
MIME_STATE_BODY_OUT body_out; /* body output routine */
|
||||
MIME_STATE_ANY_END body_end; /* end of body output routine */
|
||||
void *app_context; /* application context */
|
||||
@ -590,10 +592,10 @@ static void mime_state_downgrade(MIME_STATE *state, int rec_type,
|
||||
|
||||
/*
|
||||
* Insert a soft line break when the output reaches a critical length
|
||||
* before we reach the end of the input line.
|
||||
* before we reach a hard line break.
|
||||
*/
|
||||
for (cp = CU_CHAR_PTR(text); cp < CU_CHAR_PTR(text + len); cp++) {
|
||||
/* Critical length before the end of the input line. */
|
||||
/* Critical length before hard line break. */
|
||||
if (LEN(state->output_buffer) > 72) {
|
||||
VSTRING_ADDCH(state->output_buffer, '=');
|
||||
state->body_out(state->app_context, REC_TYPE_NORM,
|
||||
@ -616,6 +618,8 @@ static void mime_state_downgrade(MIME_STATE *state, int rec_type,
|
||||
* the output length will grow from 73 characters to 75 characters.
|
||||
*/
|
||||
if (rec_type == REC_TYPE_NORM) {
|
||||
if (ch == 0 && LEN(state->output_buffer) > 0)
|
||||
ch = END(state->output_buffer)[-1];
|
||||
if (ch == ' ' || ch == '\t') {
|
||||
vstring_truncate(state->output_buffer,
|
||||
LEN(state->output_buffer) - 1);
|
||||
@ -681,7 +685,7 @@ int mime_state_update(MIME_STATE *state, int rec_type,
|
||||
}
|
||||
SAVE_PREV_REC_TYPE_AND_RETURN_ERR_FLAGS(state, rec_type);
|
||||
}
|
||||
if (ISSPACE(*text)) {
|
||||
if (IS_SPACE_TAB(*text)) {
|
||||
if (LEN(state->output_buffer) < var_header_limit) {
|
||||
vstring_strcat(state->output_buffer, "\n");
|
||||
vstring_strcat(state->output_buffer, text);
|
||||
@ -747,7 +751,7 @@ int mime_state_update(MIME_STATE *state, int rec_type,
|
||||
*/
|
||||
if ((header_len = is_header(text)) > 0) {
|
||||
vstring_strncpy(state->output_buffer, text, header_len);
|
||||
for (text += header_len; ISSPACE(*text); text++)
|
||||
for (text += header_len; IS_SPACE_TAB(*text); text++)
|
||||
/* void */ ;
|
||||
vstring_strcat(state->output_buffer, text);
|
||||
SAVE_PREV_REC_TYPE_AND_RETURN_ERR_FLAGS(state, rec_type);
|
||||
|
@ -107,6 +107,7 @@
|
||||
|
||||
/* Global library. */
|
||||
|
||||
#include "lex_822.h"
|
||||
#include "quote_822_local.h"
|
||||
#include "tok822.h"
|
||||
|
||||
@ -121,7 +122,7 @@
|
||||
} else if (!(cond)) { \
|
||||
break; \
|
||||
} \
|
||||
VSTRING_ADDCH(t->vstr, ISSPACE(c) ? ' ' : c); \
|
||||
VSTRING_ADDCH(t->vstr, IS_SPACE_TAB_CR_LF(c) ? ' ' : c); \
|
||||
s++; \
|
||||
} \
|
||||
VSTRING_TERMINATE(t->vstr); \
|
||||
@ -155,10 +156,9 @@
|
||||
/*
|
||||
* Single-character operators. We include the % and ! operators because not
|
||||
* all the world is RFC822. XXX Make this operator list configurable when we
|
||||
* have a real rewriting language.
|
||||
* have a real rewriting language. Include | for aliases file parsing.
|
||||
*/
|
||||
static char tok822_opchar[] = "|\"(),.:;<>@[]%!";
|
||||
|
||||
static char tok822_opchar[] = "|%!" LEX_822_SPECIALS;
|
||||
static void tok822_quote_atom(TOK822 *);
|
||||
static const char *tok822_comment(TOK822 *, const char *);
|
||||
static TOK822 *tok822_group(int, TOK822 *, TOK822 *, int);
|
||||
@ -331,7 +331,7 @@ TOK822 *tok822_scan(const char *str, TOK822 **tailp)
|
||||
* white space as part of the token stream. Thanks a lot, people.
|
||||
*/
|
||||
while ((ch = *(unsigned char *) str++) != 0) {
|
||||
if (ISSPACE(ch))
|
||||
if (IS_SPACE_TAB_CR_LF(ch))
|
||||
continue;
|
||||
if (ch == '(') {
|
||||
tp = tok822_alloc(TOK822_COMMENT, (char *) 0);
|
||||
@ -347,7 +347,7 @@ TOK822 *tok822_scan(const char *str, TOK822 **tailp)
|
||||
} else {
|
||||
tp = tok822_alloc(TOK822_ATOM, (char *) 0);
|
||||
str -= 1; /* \ may be first */
|
||||
COLLECT(tp, str, ch, !ISSPACE(ch) && !strchr(tok822_opchar, ch));
|
||||
COLLECT(tp, str, ch, !IS_SPACE_TAB_CR_LF(ch) && !strchr(tok822_opchar, ch));
|
||||
tok822_quote_atom(tp);
|
||||
}
|
||||
if (head == 0) {
|
||||
@ -463,7 +463,7 @@ static void tok822_quote_atom(TOK822 *tp)
|
||||
* (and still passing it on as 8-bit data) we leave 8-bit data alone.
|
||||
*/
|
||||
for (cp = vstring_str(tp->vstr); (ch = *(unsigned char *) cp) != 0; cp++) {
|
||||
if ( /* !ISASCII(ch) || */ ISSPACE(ch)
|
||||
if ( /* !ISASCII(ch) || */ ch == ' '
|
||||
|| ISCNTRL(ch) || strchr(tok822_opchar, ch)) {
|
||||
tp->type = TOK822_QSTRING;
|
||||
break;
|
||||
|
@ -75,4 +75,5 @@ pickup.o: ../../include/mail_params.h
|
||||
pickup.o: ../../include/mail_conf.h
|
||||
pickup.o: ../../include/record.h
|
||||
pickup.o: ../../include/rec_type.h
|
||||
pickup.o: ../../include/lex_822.h
|
||||
pickup.o: ../../include/mail_server.h
|
||||
|
@ -106,6 +106,7 @@
|
||||
#include <mail_conf.h>
|
||||
#include <record.h>
|
||||
#include <rec_type.h>
|
||||
#include <lex_822.h>
|
||||
|
||||
/* Single-threaded server skeleton. */
|
||||
|
||||
@ -223,7 +224,7 @@ static int copy_segment(VSTREAM *qfile, VSTREAM *cleanup, PICKUP_INFO *info,
|
||||
*/
|
||||
if (check_first) {
|
||||
check_first = 0;
|
||||
if (VSTRING_LEN(buf) > 0 && ISSPACE(vstring_str(buf)[0]))
|
||||
if (VSTRING_LEN(buf) > 0 && IS_SPACE_TAB(vstring_str(buf)[0]))
|
||||
rec_put(cleanup, REC_TYPE_NORM, "", 0);
|
||||
}
|
||||
if ((REC_PUT_BUF(cleanup, type, buf)) < 0)
|
||||
|
@ -94,6 +94,7 @@ qmqpd.o: ../../include/match_ops.h
|
||||
qmqpd.o: ../../include/quote_822_local.h
|
||||
qmqpd.o: ../../include/quote_flags.h
|
||||
qmqpd.o: ../../include/match_parent_style.h
|
||||
qmqpd.o: ../../include/lex_822.h
|
||||
qmqpd.o: ../../include/mail_server.h
|
||||
qmqpd.o: qmqpd.h
|
||||
qmqpd_peer.o: qmqpd_peer.c
|
||||
|
@ -136,6 +136,7 @@
|
||||
#include <namadr_list.h>
|
||||
#include <quote_822_local.h>
|
||||
#include <match_parent_style.h>
|
||||
#include <lex_822.h>
|
||||
|
||||
/* Single-threaded server skeleton. */
|
||||
|
||||
@ -380,7 +381,7 @@ static void qmqpd_write_content(QMQPD_STATE *state)
|
||||
continue;
|
||||
}
|
||||
first = 0;
|
||||
if (len > 0 && ISSPACE(start[0]))
|
||||
if (len > 0 && IS_SPACE_TAB(start[0]))
|
||||
rec_put(state->cleanup, REC_TYPE_NORM, "", 0);
|
||||
}
|
||||
if (rec_put(state->cleanup, rec_type, start, len) < 0) {
|
||||
|
@ -132,6 +132,7 @@ smtpd.o: ../../include/match_list.h
|
||||
smtpd.o: ../../include/match_ops.h
|
||||
smtpd.o: ../../include/quote_822_local.h
|
||||
smtpd.o: ../../include/quote_flags.h
|
||||
smtpd.o: ../../include/lex_822.h
|
||||
smtpd.o: ../../include/mail_server.h
|
||||
smtpd.o: smtpd_token.h
|
||||
smtpd.o: smtpd.h
|
||||
|
@ -181,9 +181,9 @@
|
||||
/* .ad
|
||||
/* .fi
|
||||
/* .IP \fBparent_domain_matches_subdomains\fR
|
||||
/* List of Postfix features that use \fIdomain.name\fR patterns
|
||||
/* to match \fIsub.domain.name\fR (as opposed to
|
||||
/* requiring \fI.domain.name\fR patterns).
|
||||
/* List of Postfix features that use \fIdomain.tld\fR patterns
|
||||
/* to match \fIsub.domain.tld\fR (as opposed to
|
||||
/* requiring \fI.domain.tld\fR patterns).
|
||||
/* .IP \fBsmtpd_client_restrictions\fR
|
||||
/* Restrict what clients may connect to this mail system.
|
||||
/* .IP \fBsmtpd_helo_required\fR
|
||||
@ -313,6 +313,7 @@
|
||||
#include <verp_sender.h>
|
||||
#include <string_list.h>
|
||||
#include <quote_822_local.h>
|
||||
#include <lex_822.h>
|
||||
|
||||
/* Single-threaded server skeleton. */
|
||||
|
||||
@ -1011,7 +1012,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
|
||||
continue;
|
||||
}
|
||||
first = 0;
|
||||
if (len > 0 && ISSPACE(start[0]))
|
||||
if (len > 0 && IS_SPACE_TAB(start[0]))
|
||||
rec_put(state->cleanup, REC_TYPE_NORM, "", 0);
|
||||
}
|
||||
if (prev_rec_type != REC_TYPE_CONT
|
||||
|
@ -99,9 +99,9 @@
|
||||
/* Syntax is \fItransport\fR:\fInexthop\fR; see \fBtransport\fR(5)
|
||||
/* for details. The :\fInexthop\fR part is optional.
|
||||
/* .IP \fBparent_domain_matches_subdomains\fR
|
||||
/* List of Postfix features that use \fIdomain.name\fR patterns
|
||||
/* to match \fIsub.domain.name\fR (as opposed to
|
||||
/* requiring \fI.domain.name\fR patterns).
|
||||
/* List of Postfix features that use \fIdomain.tld\fR patterns
|
||||
/* to match \fIsub.domain.tld\fR (as opposed to
|
||||
/* requiring \fI.domain.tld\fR patterns).
|
||||
/* .IP \fBrelayhost\fR
|
||||
/* The default host to send non-local mail to when no entry is matched
|
||||
/* in the \fBtransport\fR(5) table.
|
||||
|
@ -283,7 +283,7 @@ DICT *dict_pcre_open(const char *map, int unused_flags, int dict_flags)
|
||||
*p++ = '\0'; /* Null term the regexp */
|
||||
|
||||
/* Now parse any regexp options */
|
||||
re_options = PCRE_CASELESS;
|
||||
re_options = PCRE_CASELESS | PCRE_DOTALL;
|
||||
while (*p && !ISSPACE(*p)) {
|
||||
switch (*p) {
|
||||
case 'i':
|
||||
|
Loading…
x
Reference in New Issue
Block a user