From aed716ca61422d4ed1f86655ef6a3f8c73160d3e Mon Sep 17 00:00:00 2001
From: Wietse Venema
This document describes two approaches to content filter -all email, as well as several options filter mail selectively:
+all email, as well as several options to filter mail selectively:To turn off content filtering, edit the master.cf file, remove -the "-o content_filter=filter:dummy" text from the entry that -defines the Postfix SMTP server, and execute another "postfix -reload".
+With the shell script as shown above you will lose a factor of four in Postfix performance for transit mail that arrives and leaves @@ -392,6 +413,21 @@ filtering loop. The advanced content filtering method (see below) makes it possible to turn off header_checks or body_checks patterns for filtered mail.
+To turn off "simple" content filtering:
+ +Edit the master.cf file, remove the "-o +content_filter=filter:dummy" text from the entry that defines the +Postfix SMTP server.
+ +Execute "postsuper -r ALL" to remove content +filter information from existing queue files.
+ +Execute another "postfix reload".
+ +The second example is more complex, but can give better @@ -552,11 +588,6 @@ masquerading, etc.
-To turn off content filtering, delete or comment out the two -above main.cf lines. All other changes made for advanced content -filtering have no effect when content filtering is turned off. -
-To turn off "advanced" content filtering:
+ +Delete or comment out the two following main.cf lines. +The other changes made for advanced content filtering have no effect +when content filtering is turned off.
+ +++ ++/etc/postfix/main.cf: + content_filter = scan:localhost:10025 + receive_override_options = no_address_mappings ++
Execute "postsuper -r ALL" to remove content +filter information from existing queue files.
+ +Execute another "postfix reload".
+ +The easiest approach is to configure ONE Postfix instance with diff --git a/postfix/html/access.5.html b/postfix/html/access.5.html index 85c5a4e20..89b5711f0 100644 --- a/postfix/html/access.5.html +++ b/postfix/html/access.5.html @@ -210,86 +210,91 @@ ACCESS(5) ACCESS(5) the postcat(1) command, and can be destroyed or released with the postsuper(1) command. - Note: this action currently affects all recipients + Note: use "postsuper -r" to release mail that was + kept on hold for a significant fraction of $maxi- + mal_queue_lifetime or $bounce_queue_lifetime or + longer. + + Note: this action currently affects all recipients of the message. This feature is available in Postfix 2.0 and later. PREPEND headername: headervalue - Prepend the specified message header to the mes- + Prepend the specified message header to the mes- sage. When this action is used multiple times, the - first prepended header appears before the second + first prepended header appears before the second etc. prepended header. - Note: this action does not support multi-line mes- + Note: this action does not support multi-line mes- sage headers. This feature is available in Postfix 2.1 and later. REDIRECT user@domain - After the message is queued, send the message to + After the message is queued, send the message to the specified address instead of the intended recipient(s). - Note: this action overrides the FILTER action, and + Note: this action overrides the FILTER action, and currently affects all recipients of the message. This feature is available in Postfix 2.1 and later. WARN optional text... Log a warning with the optional text, together with - client information and if available, with helo, + client information and if available, with helo, sender, recipient and protocol information. This feature is available in Postfix 2.1 and later. REGULAR EXPRESSION TABLES - This section describes how the table lookups change when + This section describes how the table lookups change when the table is given in the form of regular expressions. For - a description of regular expression lookup table syntax, + a description of regular expression lookup table syntax, see regexp_table(5) or pcre_table(5). - Each pattern is a regular expression that is applied to + Each pattern is a regular expression that is applied to the entire string being looked up. Depending on the appli- - cation, that string is an entire client hostname, an + cation, 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, - user@domain mail addresses are not broken up into their + 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. - Actions are the same as with indexed file lookups, with - the additional feature that parenthesized substrings from + Actions are the same as with indexed file lookups, with + the additional feature that parenthesized substrings from the pattern can be interpolated as $1, $2 and so on. TCP-BASED TABLES - This section describes how the table lookups change when + This section describes how the table lookups change when lookups are directed to a TCP-based server. For a descrip- - tion of the TCP client/server lookup protocol, see - tcp_table(5). This feature is not available in Postfix + tion of the TCP client/server lookup protocol, see + tcp_table(5). This feature is not available in Postfix version 2.1. - Each lookup operation uses the entire query string once. - Depending on the application, that string is an entire + Each lookup operation uses the entire query string once. + 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, user@domain mail addresses are not broken - up into their user@ and domain constituent parts, nor is + mail address. Thus, no parent domain or parent network + search is done, 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. Actions are the same as with indexed file lookups. EXAMPLE - The following example uses an indexed file, so that the - order of table entries does not matter. The example per- - mits access by the client at address 1.2.3.4 but rejects - all other clients in 1.2.3.0/24. Instead of "hash" lookup + The following example uses an indexed file, so that the + order of table entries does not matter. The example per- + mits access by the client at address 1.2.3.4 but rejects + all other clients in 1.2.3.0/24. Instead of "hash" lookup tables, some systems use "dbm". Use the command "postconf - -m" to find out what lookup tables Postfix supports on + -m" to find out what lookup tables Postfix supports on your system. /etc/postfix/main.cf: @@ -304,7 +309,7 @@ ACCESS(5) ACCESS(5) editing the file. BUGS - The table format does not understand quoting conventions. + The table format does not understand quoting conventions. SEE ALSO postmap(1), Postfix lookup table manager @@ -317,7 +322,7 @@ ACCESS(5) ACCESS(5) DATABASE_README, Postfix lookup table overview LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) diff --git a/postfix/html/discard.8.html b/postfix/html/discard.8.html index 930d7b56c..3cf8db671 100644 --- a/postfix/html/discard.8.html +++ b/postfix/html/discard.8.html @@ -27,8 +27,8 @@ DISCARD(8) DISCARD(8) informs the queue manager that delivery should be tried again at a later time. - Delivery status reports are sent to the bounce(8), - defer(8) or trace(8) daemon as appropriate. + Delivery status reports are sent to the trace(8) daemon as + appropriate. SECURITY The discard mailer is not security-sensitive. It does not diff --git a/postfix/html/header_checks.5.html b/postfix/html/header_checks.5.html index 203d03c89..3d13e7bb5 100644 --- a/postfix/html/header_checks.5.html +++ b/postfix/html/header_checks.5.html @@ -185,70 +185,75 @@ HEADER_CHECKS(5) HEADER_CHECKS(5) the postcat(1) command, and can be destroyed or released with the postsuper(1) command. - Note: this action affects all recipients of the + Note: use "postsuper -r" to release mail that was + kept on hold for a significant fraction of $maxi- + mal_queue_lifetime or $bounce_queue_lifetime or + longer. + + Note: this action affects all recipients of the message. This feature is available in Postfix 2.0 and later. - IGNORE Delete the current line from the input and inspect + IGNORE Delete the current line from the input and inspect the next input line. PREPEND text... Prepend one line with the specified text and inspect the next input line. - Note: the prepended text is output immediately + Note: the prepended text is output immediately before the input that triggered the PREPEND action. A body action cannot prepend a message header. - Note: this action cannot be used to prepend multi- + Note: this action cannot be used to prepend multi- line text. This feature is available in Postfix 2.1 and later. REDIRECT user@domain - Write a message redirection request to the queue - file and inspect the next input line. After the + Write a message redirection request to the queue + file and inspect the next input line. After the message is queued, it will be sent to the specified address instead of the intended recipient(s). - Note: this action overrides the FILTER action, and - affects all recipients of the message. If multiple - REDIRECT actions fire, only the last one is exe- + Note: this action overrides the FILTER action, and + affects all recipients of the message. If multiple + REDIRECT actions fire, only the last one is exe- cuted. This feature is available in Postfix 2.1 and later. REJECT optional text... - Reject the entire message. Reply with optional + Reject the entire message. Reply with optional text... when the optional text is specified, other- wise reply with a generic error message. - Note: this action disables further header or - body_checks inspection of the current message and + Note: this action disables further header or + body_checks inspection of the current message and affects all recipients. WARN optional text... - Log a warning with the optional text... (or log a - generic message) and inspect the next input line. + Log a warning with the optional text... (or log a + generic message) and inspect the next input line. This action is useful for debugging and for testing a pattern before applying more drastic actions. BUGS - Many people overlook the main limitations of header and - body_checks rules. These rules operate on one logical - message header or one body line at a time, and a decision - made for one line is not carried over to the next line. + Many people overlook the main limitations of header and + body_checks rules. These rules operate on one logical + message header or one body line at a time, and a decision + made for one line is not carried over to the next line. If text in the message body is encoded (RFC 2045) then the - rules have to specified for the encoded form. Likewise, + rules have to specified for the encoded form. Likewise, when message headers are encoded (RFC 2047) then the rules need to be specified for the encoded form. - Message headers added by the cleanup(8) daemon itself are + Message headers added by the cleanup(8) daemon itself are excluded from inspection. Examples of such message headers are From:, To:, Message-ID:, Date:. - Message headers deleted by the cleanup(8) daemon will be + Message headers deleted by the cleanup(8) daemon will be examined before they are deleted. Examples are: Bcc:, Con- tent-Length:, Return-Path:. @@ -256,11 +261,11 @@ HEADER_CHECKS(5) HEADER_CHECKS(5) body_checks Lookup tables with content filter rules for message body lines. These filters see one physical line at - a time, in chunks of at most $line_length_limit + a time, in chunks of at most $line_length_limit bytes. body_checks_size_limit - The amount of content per message body segment + The amount of content per message body segment (attachment) that is subjected to $body_checks fil- tering. @@ -270,32 +275,32 @@ HEADER_CHECKS(5) HEADER_CHECKS(5) nested_header_checks (default: $header_checks) Lookup tables with content filter rules for message - header lines: respectively, these are applied to - the initial message headers (not including MIME - headers), to the MIME headers anywhere in the mes- - sage, and to the initial headers of attached mes- + header lines: respectively, these are applied to + the initial message headers (not including MIME + headers), to the MIME headers anywhere in the mes- + sage, and to the initial headers of attached mes- sages. - Note: these filters see one logical message header - at a time, even when a message header spans multi- - ple lines. Message headers that are longer than + Note: these filters see one logical message header + at a time, even when a message header spans multi- + ple lines. Message headers that are longer than $header_size_limit characters are truncated. disable_mime_input_processing - While receiving mail, give no special treatment to - MIME related message headers; all text after the + While receiving mail, give no special treatment to + MIME related message headers; all text after the initial message headers is considered to be part of - the message body. This means that header_checks is - applied to all the initial message headers, and + the message body. This means that header_checks is + applied to all the initial message headers, and that body_checks is applied to the remainder of the message. - Note: when used in this manner, body_checks will - process a multi-line message header one line at a + Note: when used in this manner, body_checks will + process a multi-line message header one line at a time. EXAMPLES - Header pattern to block attachments with bad file name + Header pattern to block attachments with bad file name extensions. /etc/postfix/main.cf: @@ -333,7 +338,7 @@ HEADER_CHECKS(5) HEADER_CHECKS(5) BACKSCATTER_README, blocking returned forged mail LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html index d9d1c55d9..841d702ce 100644 --- a/postfix/html/postconf.5.html +++ b/postfix/html/postconf.5.html @@ -727,11 +727,13 @@ List of users who are authorized to flush the queue.
-By default all users are allowed to flush the queue. Otherwise if the -invoking user is neither the super-user nor the $mail_owner user, access -is denied unless the real uid of the process trying to flush the queue -is listed in the system password file and the corresponding login name -is on the access list.
+By default, all users are allowed to flush the queue. Access is +always granted if the invoking user is the super-user or the +$mail_owner user. Otherwise, the real UID of the process is looked +up in the system password file, and access is granted only if the +corresponding login name is on the access list. The username +"unknown" is used for processes whose real UID is not found in the +password file.Specify a list of user names, "/file/name" or "type:table" patterns, @@ -757,11 +759,13 @@ List of users who are authorized to view the queue.
-By default all users are allowed to view the queue. Otherwise if the -invoking user is neither the super-user nor the $mail_owner user, access -is denied unless the real uid of the process trying to view the queue -is listed in the system password file and the corresponding login name -is on the access list.
+By default, all users are allowed to view the queue. Access is +always granted if the invoking user is the super-user or the +$mail_owner user. Otherwise, the real UID of the process is looked +up in the system password file, and access is granted only if the +corresponding login name is on the access list. The username +"unknown" is used for processes whose real UID is not found in the +password file.Specify a list of user names, "/file/name" or "type:table" patterns, @@ -779,20 +783,21 @@ This feature is available in Postfix 2.2 and later. -
-List of users who are authorized to use the sendmail(1) command -(and the privileged postdrop(1) helper command) to submit mail. +List of users who are authorized to submit mail with the sendmail(1) +command (and with the privileged postdrop(1) helper command).
-By default all users are allowed to submit mail. Otherwise, access is denied -unless the real uid of the process trying to submit mail is listed in -the system password file and the corresponding login name is on the -access list. To deny mail submission access to all users specify an -empty list.
+By default, all users are allowed to submit mail. Otherwise, the +real UID of the process is looked up in the system password file, +and access is granted only if the corresponding login name is on +the access list. The username "unknown" is used for processes +whose real UID is not found in the password file. To deny mail +submission access to all users specify an empty list.
Specify a list of user names, "/file/name" or "type:table" patterns,
diff --git a/postfix/html/postdrop.1.html b/postfix/html/postdrop.1.html
index 2dbcea3ca..5226950aa 100644
--- a/postfix/html/postdrop.1.html
+++ b/postfix/html/postdrop.1.html
@@ -98,10 +98,10 @@ POSTDROP(1) POSTDROP(1)
Available in Postfix version 2.2 and later:
- authorized_sendmail_users (static:anyone)
- List of users who are authorized to use the send-
- mail(1) command (and the privileged postdrop(1)
- helper command) to submit mail.
+ authorized_submit_users (static:anyone)
+ List of users who are authorized to submit mail
+ with the sendmail(1) command (and with the privi-
+ leged postdrop(1) helper command).
FILES
/var/spool/postfix/maildrop, maildrop queue
diff --git a/postfix/html/postsuper.1.html b/postfix/html/postsuper.1.html
index 940c75540..ff965336b 100644
--- a/postfix/html/postsuper.1.html
+++ b/postfix/html/postsuper.1.html
@@ -102,65 +102,70 @@ POSTSUPER(1) POSTSUPER(1)
a queue_id of - is specified, the program reads
queue IDs from standard input.
- Specify -H ALL to release all mail that is "on
- hold". As a safety measure, the word ALL must be
+ Note: use "postsuper -r" to release mail that was
+ kept on hold for a significant fraction of $maxi-
+ mal_queue_lifetime or $bounce_queue_lifetime or
+ longer.
+
+ Specify -H ALL to release all mail that is "on
+ hold". As a safety measure, the word ALL must be
specified in upper case.
- -p Purge old temporary files that are left over after
+ -p Purge old temporary files that are left over after
system or software crashes.
-r queue_id
- Requeue the message with the named queue ID from
- the named mail queue(s) (default: hold, incoming,
- active and deferred). To requeue multiple mes-
- sages, specify multiple -r command-line options.
+ Requeue the message with the named queue ID from
+ the named mail queue(s) (default: hold, incoming,
+ active and deferred). To requeue multiple mes-
+ sages, specify multiple -r command-line options.
Alternatively, if a queue_id of - is specified, the
program reads queue IDs from standard input.
Specify -r ALL to requeue all messages. As a safety
- measure, the word ALL must be specified in upper
+ measure, the word ALL must be specified in upper
case.
- A requeued message is moved to the maildrop queue,
- from where it is copied by the pickup daemon to a
- new file whose name is guaranteed to match the new
+ A requeued message is moved to the maildrop queue,
+ from where it is copied by the pickup daemon to a
+ new file whose name is guaranteed to match the new
queue file inode number. The new queue file is sub-
- jected again to mail address rewriting and substi-
+ jected again to mail address rewriting and substi-
tution. This is useful when rewriting rules or vir-
tual mappings have changed.
- Warning: Postfix queue IDs are reused. There is a
- very small possibility that postsuper requeues the
- wrong message file when it is executed while the
- Postfix mail system is running, but no harm should
+ Warning: Postfix queue IDs are reused. There is a
+ very small possibility that postsuper requeues the
+ wrong message file when it is executed while the
+ Postfix mail system is running, but no harm should
be done.
- -s Structure check and structure repair. This should
+ -s Structure check and structure repair. This should
be done once before Postfix startup.
- o Rename files whose name does not match the
+ o Rename files whose name does not match the
message file inode number. This operation is
- necessary after restoring a mail queue from
+ necessary after restoring a mail queue from
a different machine, or from backup media.
o Move queue files that are in the wrong place
in the file system hierarchy and remove sub-
directories that are no longer needed. File
- position rearrangements are necessary after
+ position rearrangements are necessary after
a change in the hash_queue_names and/or
hash_queue_depth configuration parameters.
-v Enable verbose logging for debugging purposes. Mul-
- tiple -v options make the software increasingly
+ tiple -v options make the software increasingly
verbose.
DIAGNOSTICS
- Problems are reported to the standard error stream and to
+ Problems are reported to the standard error stream and to
syslogd(8).
- postsuper reports the number of messages deleted with -d,
+ postsuper reports the number of messages deleted with -d,
the number of messages requeued with -r, and the number of
- messages whose queue file name was fixed with -s. The
+ messages whose queue file name was fixed with -s. The
report is written to the standard error stream and to sys-
logd(8).
@@ -169,36 +174,36 @@ POSTSUPER(1) POSTSUPER(1)
Directory with the main.cf file.
BUGS
- Mail that is not sanitized by Postfix (i.e. mail in the
+ Mail that is not sanitized by Postfix (i.e. mail in the
maildrop queue) cannot be placed "on hold".
CONFIGURATION PARAMETERS
- The following main.cf parameters are especially relevant
+ The following main.cf parameters are especially relevant
to this program. The text below provides only a parameter
- summary. See postconf(5) for more details including exam-
+ summary. See postconf(5) for more details including exam-
ples.
config_directory (see 'postconf -d' output)
- The default location of the Postfix main.cf and
+ The default location of the Postfix main.cf and
master.cf configuration files.
hash_queue_depth (1)
- The number of subdirectory levels for queue direc-
- tories listed with the hash_queue_names parameter.
+ The number of subdirectory levels for queue direc-
+ tories listed with the hash_queue_names parameter.
hash_queue_names (see 'postconf -d' output)
- The names of queue directories that are split
+ The names of queue directories that are split
across multiple subdirectory levels.
queue_directory (see 'postconf -d' output)
- The location of the Postfix top-level queue direc-
+ The location of the Postfix top-level queue direc-
tory.
syslog_facility (mail)
The syslog facility of Postfix logging.
syslog_name (postfix)
- The mail system name that is prepended to the pro-
+ The mail system name that is prepended to the pro-
cess name in syslog records, so that "smtpd"
becomes, for example, "postfix/smtpd".
@@ -207,7 +212,7 @@ POSTSUPER(1) POSTSUPER(1)
postqueue(1), unprivileged queue operations
LICENSE
- The Secure Mailer license must be distributed with this
+ The Secure Mailer license must be distributed with this
software.
AUTHOR(S)
diff --git a/postfix/html/sendmail.1.html b/postfix/html/sendmail.1.html
index 1977303b6..38e052cc5 100644
--- a/postfix/html/sendmail.1.html
+++ b/postfix/html/sendmail.1.html
@@ -301,10 +301,10 @@ SENDMAIL(1) SENDMAIL(1)
authorized_mailq_users (static:anyone)
List of users who are authorized to view the queue.
- authorized_sendmail_users (static:anyone)
- List of users who are authorized to use the send-
- mail(1) command (and the privileged postdrop(1)
- helper command) to submit mail.
+ authorized_submit_users (static:anyone)
+ List of users who are authorized to submit mail
+ with the sendmail(1) command (and with the privi-
+ leged postdrop(1) helper command).
RESOURCE AND RATE CONTROLS
bounce_size_limit (50000)
diff --git a/postfix/html/smtp-sink.1.html b/postfix/html/smtp-sink.1.html
index 7f5027898..41b36d94d 100644
--- a/postfix/html/smtp-sink.1.html
+++ b/postfix/html/smtp-sink.1.html
@@ -41,7 +41,8 @@ SMTP-SINK(1) SMTP-SINK(1)
-F Disable XFORWARD support.
- -h Use hostname in the SMTP greeting, in the HELO
+ -h hostname
+ Use hostname in the SMTP greeting, in the HELO
response, and in the EHLO response. The default
hostname is "smtp-sink".
diff --git a/postfix/man/man1/postdrop.1 b/postfix/man/man1/postdrop.1
index 700748cd9..6c42b1cbb 100644
--- a/postfix/man/man1/postdrop.1
+++ b/postfix/man/man1/postdrop.1
@@ -89,9 +89,9 @@ The time limit for sending a trigger to a Postfix daemon (for
example, the pickup(8) or qmgr(8) daemon).
.PP
Available in Postfix version 2.2 and later:
-.IP "\fBauthorized_sendmail_users (static:anyone)\fR"
-List of users who are authorized to use the sendmail(1) command
-(and the privileged postdrop(1) helper command) to submit mail.
+.IP "\fBauthorized_submit_users (static:anyone)\fR"
+List of users who are authorized to submit mail with the sendmail(1)
+command (and with the privileged postdrop(1) helper command).
.SH "FILES"
.na
.nf
diff --git a/postfix/man/man1/postsuper.1 b/postfix/man/man1/postsuper.1
index 76fb3bc63..fa2f7d639 100644
--- a/postfix/man/man1/postsuper.1
+++ b/postfix/man/man1/postsuper.1
@@ -96,6 +96,10 @@ mail queue(s) (default: \fBhold\fR) to the \fBdeferred\fR queue.
If a \fIqueue_id\fR of \fB-\fR is specified, the program reads
queue IDs from standard input.
.sp
+Note: use "\fBpostsuper -r\fR" to release mail that was kept on
+hold for a significant fraction of \fB$maximal_queue_lifetime\fR
+or \fB$bounce_queue_lifetime\fR or longer.
+.sp
Specify \fB-H ALL\fR to release all mail that is "on hold".
As a safety measure, the word \fBALL\fR must be specified in upper
case.
diff --git a/postfix/man/man1/sendmail.1 b/postfix/man/man1/sendmail.1
index 594b099ee..3e7b1d72f 100644
--- a/postfix/man/man1/sendmail.1
+++ b/postfix/man/man1/sendmail.1
@@ -257,9 +257,10 @@ Available in Postfix version 2.2 and later:
List of users who are authorized to flush the queue.
.IP "\fBauthorized_mailq_users (static:anyone)\fR"
List of users who are authorized to view the queue.
-.IP "\fBauthorized_sendmail_users (static:anyone)\fR"
-List of users who are authorized to use the sendmail(1) command
-(and the privileged postdrop(1) helper command) to submit mail.
+.IP "\fBauthorized_submit_users (static:anyone)\fR"
+List of users who are authorized to submit mail with the
+sendmail(1) command (and with the privileged postdrop(1)
+helper command).
.SH "RESOURCE AND RATE CONTROLS"
.na
.nf
diff --git a/postfix/man/man1/smtp-sink.1 b/postfix/man/man1/smtp-sink.1
index e62ffe93d..6b1262dca 100644
--- a/postfix/man/man1/smtp-sink.1
+++ b/postfix/man/man1/smtp-sink.1
@@ -39,7 +39,7 @@ Do not announce ESMTP support.
Reject the specified commands with a hard (5xx) error code.
.IP \fB-F\fR
Disable XFORWARD support.
-.IP \fB-h\fI hostname\fR
+.IP "\fB-h\fI hostname\fR"
Use \fIhostname\fR in the SMTP greeting, in the HELO response,
and in the EHLO response. The default hostname is "smtp-sink".
.IP \fB-L\fR
diff --git a/postfix/man/man5/access.5 b/postfix/man/man5/access.5
index 87fd65d32..0ae0f66a3 100644
--- a/postfix/man/man5/access.5
+++ b/postfix/man/man5/access.5
@@ -196,6 +196,10 @@ Mail that is placed on hold can be examined with the
\fBpostcat\fR(1) command, and can be destroyed or released with
the \fBpostsuper\fR(1) command.
.sp
+Note: use "\fBpostsuper -r\fR" to release mail that was kept on
+hold for a significant fraction of \fB$maximal_queue_lifetime\fR
+or \fB$bounce_queue_lifetime\fR or longer.
+.sp
Note: this action currently affects all recipients of the message.
.sp
This feature is available in Postfix 2.0 and later.
diff --git a/postfix/man/man5/header_checks.5 b/postfix/man/man5/header_checks.5
index 2d8e51ff5..0c2e77d83 100644
--- a/postfix/man/man5/header_checks.5
+++ b/postfix/man/man5/header_checks.5
@@ -173,6 +173,10 @@ Mail that is placed on hold can be examined with the
\fBpostcat\fR(1) command, and can be destroyed or released with
the \fBpostsuper\fR(1) command.
.sp
+Note: use "\fBpostsuper -r\fR" to release mail that was kept on
+hold for a significant fraction of \fB$maximal_queue_lifetime\fR
+or \fB$bounce_queue_lifetime\fR or longer.
+.sp
Note: this action affects all recipients of the message.
.sp
This feature is available in Postfix 2.0 and later.
diff --git a/postfix/man/man5/postconf.5 b/postfix/man/man5/postconf.5
index d796dba4f..2f25f165f 100644
--- a/postfix/man/man5/postconf.5
+++ b/postfix/man/man5/postconf.5
@@ -381,11 +381,13 @@ This feature is available in Postfix 2.1 and later.
.SH authorized_flush_users (default: static:anyone)
List of users who are authorized to flush the queue.
.PP
-By default all users are allowed to flush the queue. Otherwise if the
-invoking user is neither the super-user nor the $mail_owner user, access
-is denied unless the real uid of the process trying to flush the queue
-is listed in the system password file and the corresponding login name
-is on the access list.
+By default, all users are allowed to flush the queue. Access is
+always granted if the invoking user is the super-user or the
+$mail_owner user. Otherwise, the real UID of the process is looked
+up in the system password file, and access is granted only if the
+corresponding login name is on the access list. The username
+"unknown" is used for processes whose real UID is not found in the
+password file.
.PP
Specify a list of user names, "/file/name" or "type:table" patterns,
separated by commas and/or whitespace. The list is matched left to
@@ -399,11 +401,13 @@ This feature is available in Postfix 2.2 and later.
.SH authorized_mailq_users (default: static:anyone)
List of users who are authorized to view the queue.
.PP
-By default all users are allowed to view the queue. Otherwise if the
-invoking user is neither the super-user nor the $mail_owner user, access
-is denied unless the real uid of the process trying to view the queue
-is listed in the system password file and the corresponding login name
-is on the access list.
+By default, all users are allowed to view the queue. Access is
+always granted if the invoking user is the super-user or the
+$mail_owner user. Otherwise, the real UID of the process is looked
+up in the system password file, and access is granted only if the
+corresponding login name is on the access list. The username
+"unknown" is used for processes whose real UID is not found in the
+password file.
.PP
Specify a list of user names, "/file/name" or "type:table" patterns,
separated by commas and/or whitespace. The list is matched left to
@@ -414,15 +418,16 @@ matches a lookup key (the lookup result is ignored). Continue long
lines by starting the next line with whitespace.
.PP
This feature is available in Postfix 2.2 and later.
-.SH authorized_sendmail_users (default: static:anyone)
-List of users who are authorized to use the sendmail(1) command
-(and the privileged postdrop(1) helper command) to submit mail.
-.PP
-By all users are allowed to submit mail. Otherwise, access is denied
-unless the real uid of the process trying to submit mail is listed in
-the system password file and the corresponding login name is on the
-access list. To deny mail submission access to all users specify an
-empty list.
+.SH authorized_submit_users (default: static:anyone)
+List of users who are authorized to submit mail with the sendmail(1)
+command (and with the privileged postdrop(1) helper command).
+.PP
+By default, all users are allowed to submit mail. Otherwise, the
+real UID of the process is looked up in the system password file,
+and access is granted only if the corresponding login name is on
+the access list. The username "unknown" is used for processes
+whose real UID is not found in the password file. To deny mail
+submission access to all users specify an empty list.
.PP
Specify a list of user names, "/file/name" or "type:table" patterns,
separated by commas and/or whitespace. The list is matched left to right,
diff --git a/postfix/man/man8/discard.8 b/postfix/man/man8/discard.8
index 2854b02cd..ec6ae9dda 100644
--- a/postfix/man/man8/discard.8
+++ b/postfix/man/man8/discard.8
@@ -25,8 +25,8 @@ information as the reason for discarding the mail, updates the
queue file and marks recipients as finished or informs the
queue manager that delivery should be tried again at a later time.
-Delivery status reports are sent to the \fBbounce\fR(8),
-\fBdefer\fR(8) or \fBtrace\fR(8) daemon as appropriate.
+Delivery status reports are sent to the \fBtrace\fR(8)
+daemon as appropriate.
.SH "SECURITY"
.na
.nf
diff --git a/postfix/mantools/postlink b/postfix/mantools/postlink
index 97be27f65..7f7a8dc7c 100755
--- a/postfix/mantools/postlink
+++ b/postfix/mantools/postlink
@@ -61,7 +61,7 @@ while (<>) {
}
s;\bautho[-]*\n*[
This document describes two approaches to content filter -all email, as well as several options filter mail selectively:
+all email, as well as several options to filter mail selectively:To turn off content filtering, edit the master.cf file, remove -the "-o content_filter=filter:dummy" text from the entry that -defines the Postfix SMTP server, and execute another "postfix -reload".
+With the shell script as shown above you will lose a factor of four in Postfix performance for transit mail that arrives and leaves @@ -392,6 +413,21 @@ filtering loop. The advanced content filtering method (see below) makes it possible to turn off header_checks or body_checks patterns for filtered mail.
+To turn off "simple" content filtering:
+ +Edit the master.cf file, remove the "-o +content_filter=filter:dummy" text from the entry that defines the +Postfix SMTP server.
+ +Execute "postsuper -r ALL" to remove content +filter information from existing queue files.
+ +Execute another "postfix reload".
+ +The second example is more complex, but can give better @@ -552,11 +588,6 @@ masquerading, etc.
-To turn off content filtering, delete or comment out the two -above main.cf lines. All other changes made for advanced content -filtering have no effect when content filtering is turned off. -
-To turn off "advanced" content filtering:
+ +Delete or comment out the two following main.cf lines. +The other changes made for advanced content filtering have no effect +when content filtering is turned off.
+ +++ ++/etc/postfix/main.cf: + content_filter = scan:localhost:10025 + receive_override_options = no_address_mappings ++
Execute "postsuper -r ALL" to remove content +filter information from existing queue files.
+ +Execute another "postfix reload".
+ +The easiest approach is to configure ONE Postfix instance with diff --git a/postfix/proto/access b/postfix/proto/access index 9d11b0ca8..46c1fbe32 100644 --- a/postfix/proto/access +++ b/postfix/proto/access @@ -174,7 +174,11 @@ # # Mail that is placed on hold can be examined with the # \fBpostcat\fR(1) command, and can be destroyed or released with -# the \fBpostsuper\fR(1) command. +# the \fBpostsuper\fR(1) command. +# .sp +# Note: use "\fBpostsuper -r\fR" to release mail that was kept on +# hold for a significant fraction of \fB$maximal_queue_lifetime\fR +# or \fB$bounce_queue_lifetime\fR or longer. # .sp # Note: this action currently affects all recipients of the message. # .sp diff --git a/postfix/proto/header_checks b/postfix/proto/header_checks index 1b841581c..d5b883c51 100644 --- a/postfix/proto/header_checks +++ b/postfix/proto/header_checks @@ -159,6 +159,10 @@ # \fBpostcat\fR(1) command, and can be destroyed or released with # the \fBpostsuper\fR(1) command. # .sp +# Note: use "\fBpostsuper -r\fR" to release mail that was kept on +# hold for a significant fraction of \fB$maximal_queue_lifetime\fR +# or \fB$bounce_queue_lifetime\fR or longer. +# .sp # Note: this action affects all recipients of the message. # .sp # This feature is available in Postfix 2.0 and later. diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto index d06ffffbb..776577656 100644 --- a/postfix/proto/postconf.proto +++ b/postfix/proto/postconf.proto @@ -5517,11 +5517,13 @@ List of users who are authorized to flush the queue.
-By default all users are allowed to flush the queue. Otherwise if the -invoking user is neither the super-user nor the $mail_owner user, access -is denied unless the real uid of the process trying to flush the queue -is listed in the system password file and the corresponding login name -is on the access list.
+By default, all users are allowed to flush the queue. Access is +always granted if the invoking user is the super-user or the +$mail_owner user. Otherwise, the real UID of the process is looked +up in the system password file, and access is granted only if the +corresponding login name is on the access list. The username +"unknown" is used for processes whose real UID is not found in the +password file.Specify a list of user names, "/file/name" or "type:table" patterns, @@ -5543,11 +5545,13 @@ List of users who are authorized to view the queue.
-By default all users are allowed to view the queue. Otherwise if the -invoking user is neither the super-user nor the $mail_owner user, access -is denied unless the real uid of the process trying to view the queue -is listed in the system password file and the corresponding login name -is on the access list.
+By default, all users are allowed to view the queue. Access is +always granted if the invoking user is the super-user or the +$mail_owner user. Otherwise, the real UID of the process is looked +up in the system password file, and access is granted only if the +corresponding login name is on the access list. The username +"unknown" is used for processes whose real UID is not found in the +password file.Specify a list of user names, "/file/name" or "type:table" patterns, @@ -5562,19 +5566,20 @@ lines by starting the next line with whitespace.
This feature is available in Postfix 2.2 and later. -%PARAM authorized_sendmail_users static:anyone +%PARAM authorized_submit_users static:anyone-List of users who are authorized to use the sendmail(1) command -(and the privileged postdrop(1) helper command) to submit mail. +List of users who are authorized to submit mail with the sendmail(1) +command (and with the privileged postdrop(1) helper command).
-By default all users are allowed to submit mail. Otherwise, access is denied -unless the real uid of the process trying to submit mail is listed in -the system password file and the corresponding login name is on the -access list. To deny mail submission access to all users specify an -empty list.
+By default, all users are allowed to submit mail. Otherwise, the +real UID of the process is looked up in the system password file, +and access is granted only if the corresponding login name is on +the access list. The username "unknown" is used for processes +whose real UID is not found in the password file. To deny mail +submission access to all users specify an empty list.
Specify a list of user names, "/file/name" or "type:table" patterns,
diff --git a/postfix/proto/postconf.spec b/postfix/proto/postconf.spec
index 930a2656b..87c59b108 100644
--- a/postfix/proto/postconf.spec
+++ b/postfix/proto/postconf.spec
@@ -37,7 +37,7 @@
%PARAM alternate_config_directories
%PARAM authorized_flush_users
%PARAM authorized_mailq_users
-%PARAM authorized_sendmail_users
+%PARAM authorized_submit_users
%PARAM default_privs
%PARAM import_environment
%PARAM proxy_read_maps
diff --git a/postfix/src/discard/.indent.pro b/postfix/src/discard/.indent.pro
new file mode 120000
index 000000000..5c837eca6
--- /dev/null
+++ b/postfix/src/discard/.indent.pro
@@ -0,0 +1 @@
+../../.indent.pro
\ No newline at end of file
diff --git a/postfix/src/discard/.printfck b/postfix/src/discard/.printfck
new file mode 100644
index 000000000..66016ed45
--- /dev/null
+++ b/postfix/src/discard/.printfck
@@ -0,0 +1,25 @@
+been_here_xt 2 0
+bounce_append 5 0
+cleanup_out_format 1 0
+defer_append 5 0
+mail_command 1 0
+mail_print 1 0
+msg_error 0 0
+msg_fatal 0 0
+msg_info 0 0
+msg_panic 0 0
+msg_warn 0 0
+opened 4 0
+post_mail_fprintf 1 0
+qmgr_message_bounce 2 0
+rec_fprintf 2 0
+sent 4 0
+smtp_cmd 1 0
+smtp_mesg_fail 2 0
+smtp_printf 1 0
+smtp_rcpt_fail 3 0
+smtp_site_fail 2 0
+udp_syslog 1 0
+vstream_fprintf 1 0
+vstream_printf 0 0
+vstring_sprintf 1 0
diff --git a/postfix/src/discard/Makefile.in b/postfix/src/discard/Makefile.in
index f8a09a779..7d5ef4c97 100644
--- a/postfix/src/discard/Makefile.in
+++ b/postfix/src/discard/Makefile.in
@@ -46,7 +46,7 @@ tidy: clean
depend: $(MAKES)
(sed '1,/^# do not edit/!d' Makefile.in; \
set -e; for i in [a-z][a-z0-9]*.c; do \
- $(CC) -E $(DEFS) $(INCL) $$i | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
+ $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
-e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' -e 'p' -e '}'; \
done) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
@$(EXPORT) make -f Makefile.in Makefile 1>&2
diff --git a/postfix/src/discard/discard.c b/postfix/src/discard/discard.c
index f6ad47d5d..0d3b87260 100644
--- a/postfix/src/discard/discard.c
+++ b/postfix/src/discard/discard.c
@@ -19,8 +19,8 @@
/* queue file and marks recipients as finished or informs the
/* queue manager that delivery should be tried again at a later time.
/*
-/* Delivery status reports are sent to the \fBbounce\fR(8),
-/* \fBdefer\fR(8) or \fBtrace\fR(8) daemon as appropriate.
+/* Delivery status reports are sent to the \fBtrace\fR(8)
+/* daemon as appropriate.
/* SECURITY
/* .ad
/* .fi
diff --git a/postfix/src/global/Makefile.in b/postfix/src/global/Makefile.in
index 445c642e1..1dd4f6c0a 100644
--- a/postfix/src/global/Makefile.in
+++ b/postfix/src/global/Makefile.in
@@ -1414,6 +1414,7 @@ user_acl.o: string_list.h
user_acl.o: ../../include/match_list.h
user_acl.o: ../../include/match_ops.h
user_acl.o: mypwd.h
+user_acl.o: mail_params.h
user_acl.o: user_acl.h
verify.o: verify.c
verify.o: ../../include/sys_defs.h
diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h
index 05102375d..1fc90b6a9 100644
--- a/postfix/src/global/mail_params.h
+++ b/postfix/src/global/mail_params.h
@@ -77,17 +77,19 @@ extern gid_t var_default_gid;
/*
* Access control for local privileged operations:
*/
+#define STATIC_ANYONE_ACL "static:anyone"
+
#define VAR_FLUSH_ACL "authorized_flush_users"
-#define DEF_FLUSH_ACL "static:anyone"
+#define DEF_FLUSH_ACL STATIC_ANYONE_ACL
extern char *var_flush_acl;
#define VAR_SHOWQ_ACL "authorized_mailq_users"
-#define DEF_SHOWQ_ACL "static:anyone"
+#define DEF_SHOWQ_ACL STATIC_ANYONE_ACL
extern char *var_showq_acl;
-#define VAR_SENDMAIL_ACL "authorized_sendmail_users"
-#define DEF_SENDMAIL_ACL "static:anyone"
-extern char *var_sendmail_acl;
+#define VAR_SUBMIT_ACL "authorized_submit_users"
+#define DEF_SUBMIT_ACL STATIC_ANYONE_ACL
+extern char *var_submit_acl;
/*
* What goes on the right-hand side of addresses of mail sent from this
diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h
index 09bf110f1..7d5fa76e2 100644
--- a/postfix/src/global/mail_version.h
+++ b/postfix/src/global/mail_version.h
@@ -20,7 +20,7 @@
* Patches change the patchlevel and the release date. Snapshots change the
* release date only.
*/
-#define MAIL_RELEASE_DATE "20040918"
+#define MAIL_RELEASE_DATE "20040919"
#define MAIL_VERSION_NUMBER "2.2"
#define VAR_MAIL_VERSION "mail_version"
diff --git a/postfix/src/global/user_acl.c b/postfix/src/global/user_acl.c
index 445d7657b..c5bef0d8f 100644
--- a/postfix/src/global/user_acl.c
+++ b/postfix/src/global/user_acl.c
@@ -2,25 +2,26 @@
/* NAME
/* user_acl 3
/* SUMMARY
-/* Convert uid to username and check against given ACL.
+/* user name based access control
/* SYNOPSIS
/* #include