diff --git a/postfix/HISTORY b/postfix/HISTORY index 900f0a54f..f29e2f7e2 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -7622,8 +7622,18 @@ Apologies for any names omitted. virtual alias class (error:User unknown) result. File: trivial-rewrite/transport.c. +20030101 + + Documentation update: new-style virtual domains broke the + advanced content filtering example. Files: FILTER_README, + RELEASE_NOTES-2.0. + Open problems: + Med: do not postpone rejected "MAIL FROM" size information, + and find a way to log the sender address in the rejected + command. + Low: after successful delivery, per-queue window += 1/window, after failure, queue window -= 1 (Victor). diff --git a/postfix/README_FILES/SENDER_VERIFICATION_README b/postfix/README_FILES/ADDRESS_VERIFICATION_README similarity index 73% rename from postfix/README_FILES/SENDER_VERIFICATION_README rename to postfix/README_FILES/ADDRESS_VERIFICATION_README index c1454f777..410fa8fae 100644 --- a/postfix/README_FILES/SENDER_VERIFICATION_README +++ b/postfix/README_FILES/ADDRESS_VERIFICATION_README @@ -1,5 +1,5 @@ -Sender address verification -=========================== +Address verification +==================== Sender address verification blocks mail from an unknown sender address until after the address is verified. An address is verified @@ -7,15 +7,36 @@ by probing the nearest MTA for that address, without actually delivering mail to it (SMTP interruptus). Probe messages are like normail mail, but are discarded instead of being deferred or bounced. -Normal mail will suffer only a short one-time delay of up to 9 -seconds while address verification happens for the first time. -When verification takes longer than 9 seconds, the Postfix SMTP -server defers the message with a 450 reply. Normal mail clients -will connect again after some delay. Once an address status is -known, the status is cached and Postfix replies immediately. +The same technique may be useful to block mail for undeliverable +recipients, for example on mail relay hosts that do not have a copy +of all the relayed recipient addresses. -Address verification is turned on with the "reject_unverified_sender" -sender restriction. To find out how this would affect your mail, +With address verification turned on, normal mail will suffer only +a short delay of up to 9 seconds while an address is verified for +the first time. Once an address status is known, the status is +cached and Postfix replies immediately. When verification takes +longer than 9 seconds the Postfix SMTP server defers the sender or +recipient address message with a 450 reply. Normal mail clients +will connect again after some delay. + +Sender and recipient address verification are turned on with the +"reject_unverified_sender" and "reject_unverified_recipient" +restrictions, respectively. + +Recipient address verification is relatively straightforward and +there are no surprises. If a recipient probe fails, then Postfix +rejects mail for the recipient address. If a recipient probe +succeeds, then Postfix accepts mail for the recipient address. + +Turning on sender address verification +====================================== + +Unfortunately, sender address verification cannot simply be turned +on - you are likely to lose legitimate mail from mis-configured +systems. You will almost certainly have to set up white lists for +specific addresses or even for entire domains. + +To find out how sender address verification would affect your mail, specify "warn_if_reject reject_unverified_sender" so that you can see what mail would be blocked: diff --git a/postfix/README_FILES/FILTER_README b/postfix/README_FILES/FILTER_README index 3a8de5787..433b35aa9 100644 --- a/postfix/README_FILES/FILTER_README +++ b/postfix/README_FILES/FILTER_README @@ -1,8 +1,22 @@ +Introduction +============ + This is a very first implementation of Postfix content filtering. A Postfix content filter receives unfiltered mail from Postfix and -either bounces the mail or re-injects filtered mail back into Postfix. +does one of the following: -This document describes two approaches to content filtering. +- re-injects the mail back into Postfix, perhaps after changing content +- rejects the mail (by sending a suitable status code back to + Postfix) so that it is returned to sender. +- sends the mail somewhere else + +This document describes two approaches to content filtering: simple +and advanced. Both filter all the mail by default. + +At the end are examples that show how to filter only mail from +users, about using different filters for different domains that +you provide MX service for, and about selective filtering on the +basis of message envelope and/or header/body patterns. Simple content filtering example ================================ @@ -10,6 +24,7 @@ Simple content filtering example The first example is simple to set up. It uses a shell script that receives unfiltered mail from the Postfix pipe delivery agent, and that feeds filtered mail back into the Postfix sendmail command. + Only mail arriving via SMTP will be content filtered. .................................. @@ -24,7 +39,8 @@ Unfiltered mail----->smtpd \ /local---->Filtered mail | | +-Postfix sendmail<----filter script<--+ -The /some/where/filter program can be a simple shell script like this: +Mail is filtered by a /some/where/filter program. This can be a +simple shell script like this: #!/bin/sh @@ -51,18 +67,24 @@ The /some/where/filter program can be a simple shell script like this: exit $? The idea is to first capture the message to file and then run the -content through a third-party content filter program. If the -mail cannot be captured to file, mail delivery is deferred by -terminating with exit status 75 (EX_TEMPFAIL). If the content -filter program finds a problem, the mail is bounced by terminating -the shell script with exit status 69 (EX_UNAVAILABLE). If the -content is OK, it is given as input to Postfix sendmail, and the -exit status of the filter command is whatever exit status Postfix -sendmail produces. +content through a third-party content filter program. -I suggest that you play with this script for a while until you are -satisfied with the results. Run it with a real message (headers+body) -as input: +- If the mail cannot be captured to file, mail delivery is deferred + by terminating with exit status 75 (EX_TEMPFAIL). Postfix will + try again after some delay. + +- If the content filter program finds a problem, the mail is bounced + by terminating with exit status 69 (EX_UNAVAILABLE). Postfix + will return the message to the sender as undeliverable. + +- If the content is OK, it is given as input to the Postfix sendmail + command, and the exit status of the filter command is whatever + exit status the Postfix sendmail command produces. Postfix will + deliver the message as usual. + +I suggest that you run this script by hand until you are satisfied +with the results. Run it with a real message (headers+body) as +input: % /some/where/filter -f sender recipient... Your database will be searched for the user@domain address as diff --git a/postfix/RELEASE_NOTES-2.0 b/postfix/RELEASE_NOTES-2.0 index 4412f6dfc..7a7c664ff 100644 --- a/postfix/RELEASE_NOTES-2.0 +++ b/postfix/RELEASE_NOTES-2.0 @@ -1,9 +1,13 @@ +============================================================== NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE +============================================================== Before upgrading from Postfix 1.1 you must stop Postfix ("postfix stop"). Some internal protocols have changed. No mail will be lost if you fail to stop and restart Postfix, but Postfix won't be able to receive any new mail, either. +============================================================== NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE +============================================================== In the text below, changes are labeled with the Postfix snapshot that introduced the change, and whether the change introduced a @@ -82,6 +86,14 @@ is now used for address lookups only. For details, see the VIRTUAL_README file. +[Incompat 20021209] If you use the "advanced content filter" +technique, you MUST NOT override the virtual aliases and virtual +mailbox settings in the SMTP server that receives mail from the +content filter, or else mail for virtual recipients will be rejected +with "User unknown". + +For details, see the FILTER_README file. + Incompatible queue file format changes ====================================== @@ -265,7 +277,7 @@ TCP/IP stacks have an atrociously large default timeout value. [Feature 20020505] Finer control over Berkeley DB memory usage, The parameter "berkeley_db_create_buffer_size" (default: 16 MBytes) specifies the buffer size for the postmap and postalias commands. -The parameter "berkeley_db_read_buffer_size" (default: 256 kBytes) +The parameter "berkeley_db_read_buffer_size" (default: 128 kBytes) specifies the buffer size for all other applications. Specify "berkeley_db_read_buffer_size = 1048576" to get the old read buffer size. Contributed by Victor Duchovni. For more information, see @@ -696,6 +708,11 @@ Assorted changes the original recipient address in the X-Original-To: message header. This header can also be emitted by the pipe(8) delivery agent. +[Incompat 20021028] With "domain in one mailbox", one message with +multiple recipients is no longer delivered only once. It is now +delivered as one copy for each original recipient, with the original +recipient address listed in the X-Original-To: message header. + [Feature 20021024] New proxy_interfaces parameter, for sites behind a network address translation gateway or other type of proxy. You should specify all the proxy network addresses here, to avoid avoid diff --git a/postfix/conf/postfix-files b/postfix/conf/postfix-files index c6ef0a34b..64d38d24a 100644 --- a/postfix/conf/postfix-files +++ b/postfix/conf/postfix-files @@ -174,6 +174,7 @@ $sample_directory/sample-transport.cf:f:root:-:644 $sample_directory/sample-verify.cf:f:root:-:644 $sample_directory/sample-virtual.cf:f:root:-:644 $readme_directory/ADDRESS_CLASS_README:f:root:-:644 +$readme_directory/ADDRESS_VERIFICATION_README:f:root:-:644 $readme_directory/DB_README:f:root:-:644 $readme_directory/DEBUG_README:f:root:-:644 $readme_directory/ETRN_README:f:root:-:644 diff --git a/postfix/examples/chroot-setup/Solaris2 b/postfix/examples/chroot-setup/Solaris2 index 2508f73ab..024492cc3 100644 --- a/postfix/examples/chroot-setup/Solaris2 +++ b/postfix/examples/chroot-setup/Solaris2 @@ -25,7 +25,7 @@ fi for dir in etc/default etc/inet dev usr/lib usr/share/lib/zoneinfo ; do if [ ! -d ${CHROOT}/${dir} ]; then mkdir -p ${CHROOT}/${dir} ; fi done -chmod -R 755 ${CHROOT} +#chmod -R 755 ${CHROOT} # AFS support. if [ "`echo $CHROOT | cut -c1-4`" = "/afs" ]; then diff --git a/postfix/html/faq.html b/postfix/html/faq.html index edb261f92..587d0e283 100644 --- a/postfix/html/faq.html +++ b/postfix/html/faq.html @@ -2015,7 +2015,7 @@ systems for performance and/or security reasons.

-The Postfix warning message means that new mail notificiation failed +The Postfix warning message means that new mail notification failed because the comsat network service is turned off.

@@ -2034,7 +2034,7 @@ specify: Note: recent versions of procmail also produce biff notifications. To silence biff completely you may also have -to updte procmail configuration files. +to update procmail configuration files.

@@ -2317,7 +2317,7 @@ is unable to access the UNIX password database.

  • If you're running the Postfix SMTP server chrooted (see master.cf) then you may have to copy the password file and -perhaps a bunch of other files into Postfix queue directory; a +perhaps a bunch of other files into the Postfix queue directory; a typical destination would be /var/spool/postfix/etc. See also the chroot setup scripts in the examples directory of the Postfix source code distribution. @@ -2638,19 +2638,19 @@ destinations don't work in virtual domains

    -Quick answer: set up a transport map entry that gives the mail to -the Postfix local delivery agent: +Quick answer: set up "punch through" virtual aliases that redirect +the mail to local Postfix aliases:

         /etc/postfix/main.cf:
    -        transport_maps = hash:/etc/postfix/transport
    +        virtual_alias_maps = hash:/etc/postfix/virtual
     
    -    /etc/postfix/transport:
    -        listname@virtual.tld            local:
    -        owner-listname@virtual.tld      local:
    -        listname-request@virtual.tld    local:
    +    /etc/postfix/virtual:
    +        listname@virtual.tld            listname
    +        owner-listname@virtual.tld      owner-listname
    +        listname-request@virtual.tld    listname-request
     
         /etc/aliases:
             listname: "|whatever"
    @@ -2660,6 +2660,13 @@ the Postfix local delivery agent:
     
     

    +This redirects mail for virtual address listname@virtual.tld +etc. to local address listname@your.domain.tld etc.. Mail +for these local aliases is then delivered to external commands or +files etc. by the Postfix local delivery agent. + +

    + Long answer:

    diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index cb185a208..6186cb532 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, unless they include the same bugfix as a patch release. */ -#define MAIL_RELEASE_DATE "20021223" +#define MAIL_RELEASE_DATE "20030101" #define VAR_MAIL_VERSION "mail_version" #define DEF_MAIL_VERSION "2.0.0-" MAIL_RELEASE_DATE diff --git a/postfix/src/trivial-rewrite/resolve.c b/postfix/src/trivial-rewrite/resolve.c index 0be7fb623..f583778ac 100644 --- a/postfix/src/trivial-rewrite/resolve.c +++ b/postfix/src/trivial-rewrite/resolve.c @@ -400,12 +400,18 @@ void resolve_addr(char *addr, VSTRING *channel, VSTRING *nexthop, */ if (virt_alias_doms && string_list_match(virt_alias_doms, rcpt_domain)) { - if (var_helpful_warnings - && virt_mailbox_doms - && string_list_match(virt_mailbox_doms, rcpt_domain)) - msg_warn("do not list domain %s in BOTH %s and %s", - rcpt_domain, VAR_VIRT_ALIAS_DOMS, - VAR_VIRT_MAILBOX_DOMS); + if (var_helpful_warnings) { + if (virt_mailbox_doms + && string_list_match(virt_mailbox_doms, rcpt_domain)) + msg_warn("do not list domain %s in BOTH %s and %s", + rcpt_domain, VAR_VIRT_ALIAS_DOMS, + VAR_VIRT_MAILBOX_DOMS); + if (relay_domains + && domain_list_match(relay_domains, rcpt_domain)) + msg_warn("do not list domain %s in BOTH %s and %s", + rcpt_domain, VAR_VIRT_ALIAS_DOMS, + VAR_RELAY_DOMAINS); + } vstring_strcpy(channel, MAIL_SERVICE_ERROR); vstring_sprintf(nexthop, "User unknown%s", var_show_unk_rcpt_table ? @@ -422,6 +428,13 @@ void resolve_addr(char *addr, VSTRING *channel, VSTRING *nexthop, */ else if (virt_mailbox_doms && string_list_match(virt_mailbox_doms, rcpt_domain)) { + if (var_helpful_warnings) { + if (relay_domains + && domain_list_match(relay_domains, rcpt_domain)) + msg_warn("do not list domain %s in BOTH %s and %s", + rcpt_domain, VAR_VIRT_MAILBOX_DOMS, + VAR_RELAY_DOMAINS); + } vstring_strcpy(channel, var_virt_transport); vstring_strcpy(nexthop, rcpt_domain); blame = VAR_VIRT_TRANSPORT;