diff --git a/postfix/0README b/postfix/0README index 01ac09a24..9023f6fd7 100644 --- a/postfix/0README +++ b/postfix/0README @@ -21,9 +21,7 @@ Purpose of the Postfix mail system ================================== Postfix aims to be an alternative to the widely-used sendmail -program. Sendmail is responsible for 70% of all e-mail delivered -on the Internet. With an estimated 100 million users, that's an -estimated 10 billion (10^10) messages daily. A stunning number. +program. Although IBM supported the Postfix development, it abstains from control over its evolution. The goal is to have Postfix installed @@ -71,15 +69,6 @@ you are welcome to send a postcard to: Roadmap of the Postfix source distribution ========================================== -Point your browser at html/index.html for Postfix documentation, -for manual pages, and for the unavoidable Postfix FAQ. Expect to -see updated versions on-line at http://www.postfix.org/ - -Point your MANPATH environment variable at the `man' directory (use -an absolute path) for UNIX-style on-line manual pages. These pages -are also available through the HTML interface, which allows you to -navigate faster. - The RELEASE_NOTES file describes new features, and lists incompatible changes with respect to previous Postfix versions. @@ -91,10 +80,17 @@ not yet implement, and how well it works with other software. The HISTORY file gives a detailed log of changes to the software. +Point your browser at html/index.html for Postfix documentation, +for manual pages, and for the unavoidable Postfix FAQ. Expect to +see updated versions on-line at http://www.postfix.org/ + +Point your MANPATH environment variable at the `man' directory (use +an absolute path) for UNIX-style on-line manual pages. These pages +are also available through the HTML interface, which allows you to +navigate faster. + The PORTING file discusses how to go about porting Postfix to other -UNIX platforms. Some people are looking into a port to Windows NT. -We'll see. This software uses every trick in the book that I learned -about UNIX. +UNIX platforms. The TODO file lists things that still need to be done. If you want to set your teeth into one of those problems, drop me a note at diff --git a/postfix/HISTORY b/postfix/HISTORY index 0ab32a6be..4613ef2c2 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -4856,7 +4856,7 @@ Apologies for any names omitted. 20010203 - Update: null candidate patch from Patrick Rak. Files: + Update: null candidate patch from Patrik Rak. Files: nqmgr/qmgr_entry.c nqmgr/qmgr_job.c nqmgr/qmgr_message.c. Cleanup: added one gruesome command to the postlink script @@ -4869,3 +4869,46 @@ Apologies for any names omitted. Laid the ground work for logging of table accesses. This will give more insight into how Postfix uses its lookup tables. User interface comes later. File: util/dict_debug.c. + +20010215 + + The showq output format assumes queue IDs of up to 10 + characters. It can be more with large file systems. + Workaround for 11 character queue IDs by Lamont Jones. + File: showq/showq.c. + +20010216 + + Bugfix: the pipe delivery agent expanded $size as if it + were a recipient, instead of expanding it as $nexthop or + as $sender. Reported by Michael Tokarev. File: pipe/pipe.c. + +20010221 + + Bugfix: poor LMTP performance for domains that are listed + in $mydestination, because Postfix would send one recipient + at a time, with multiple deliveries of recipients of the + same message in parallel; a similar problem could exist + with firewall relay hosts that forward mail for $mydestination + to an inside machine. This behavior is now changed to depend + on the transport-specific xxx_destination_recipient_limit + parameter. This also means that you can now get qmail behavior + for SMTP deliveries by setting smtp_destination_recipient_limit=1. + File: {qmgr,nqmgr}/qmgr_message.c. + + Workaround: Solaris socketpair() can fail with EINTR. Added + a sane_socketpair.c module that joins the ranks of the other + sane_whatever workarounds. Reported by Andrew McNamara. + File: util/sane_socketpair.[hc] + +20010222 + + Documentation: the default main.cf file has a prominent + warning that mynetworks should be properly configured in + order to reject unauthorized mail relay requests from + strangers. + + Documentation: the INSTALL document, section "mandatory + configuration file edits" has a section that explains that + mynetworks should be properly configured in order to reject + unauthorized mail relay requests from strangers. diff --git a/postfix/INSTALL b/postfix/INSTALL index 49cf95a8a..c56c93055 100644 --- a/postfix/INSTALL +++ b/postfix/INSTALL @@ -66,11 +66,13 @@ If your system is supported, it is one of Linux RedHat 4.x Linux RedHat 5.x Linux RedHat 6.x + Linux RedHat 7.x Linux Slackware 3.5 Linux Slackware 4.0 Linux Slackware 7.0 Linux SuSE 5.x Linux SuSE 6.x + Linux SuSE 7.x Mac OS X server NEXTSTEP 3.x NetBSD 1.x @@ -83,7 +85,7 @@ If your system is supported, it is one of Rhapsody 5.x SunOS 4.1.x SunOS 5.4..5.8 (Solaris 2.4..8) - Ultrix 4.x + Ultrix 4.x (well, that was long ago) or something closely resemblant. @@ -202,7 +204,8 @@ In order to install or upgrade Postfix: - Run the INSTALL.sh script as the super-user: - # sh INSTALL.sh + # make install (interactive version, first time install) + # make install 1 (i.e., send + multiple recipients per delivery), the per-transport destination + concurrency limit controls the number of simultaneous deliveries + to the same domain. This is the default behavior for all other + Postfix delivery agents. + +The default settings are: local_destination_recipient_limit = 1, +local_destination_concurrency_limit = 2. Other delivery transports +have default recipient limits (50) and have default per-destination +concurrency limits (10). Major changes with snapshot-20010202 ==================================== diff --git a/postfix/TODO b/postfix/TODO index 280c4c224..04708b4df 100644 --- a/postfix/TODO +++ b/postfix/TODO @@ -7,55 +7,30 @@ expanded via :include:). postconf -f filename -more general relocated feature - perhaps better to bounce recipients +get rid of the relocated feature - perhaps better to bounce recipients at the SMTP port. -use $mydomain when hostname is not FQDN. - -generic daemon that listens on fifo and runs command - make sendmail/smtpd/cleanup output directory/fifo configurable if postdrop scrutinizes input, skip the overhead in the pickup daemon. -luser relay - add a threshold to sendmail etc. stderr logging, so that class "info" messages don't go to stderr. -need a configurable mailbox locking method with system-specific -default, so people don't have to recompile just to turn of fcntl() -locks to work around SUN mailtool. - implement an UCE control to accept mail if the sender domain sender lists us as MX host (rafal wiosna). By the same token, implement a control to accept mail when the client hostname/parent domain lists us as their MX host. -with recipient delimiter enabled, append the unmatched recipient -of @virtual.domain patterns as extension to right-hand recipient, -for qmail-like virtual mapping. - received: headers should be generated by the cleanup daemon, and client attributes ("with", "from", etc.) should be passed along with the message. This guarantees that forwarded/aliased mail gets stamped with the queue ID. -trivial-rewrite etc.: after reload, close the listen socket and -wait until all clients disconnect. - -In qmgr_entry.c, turn off random walk by default. - toss double-bounce mail even when mail for the local machine is redirected to another box. See mail_addr_double_bounce(). -represent peer as object, not as name + addr arguments - -ignore sender: header when different from envelope? - -smtp client: optionally log every MX host contacted - remote showq access (cookie in maildrop or print some text to inform the user) @@ -63,48 +38,23 @@ defer: explain mail was bounced after N days multiple rewrite processes? -log relay address in addition to host. - gethostbyaddr() uses native name services, which can be slow. can we detect a client that ignores error responses? way to block inbound mail based on recipient suffix? -when client begins with non-SMTP data, log warning - -when non-SMTP follows ".", log warning. - -On linux syslogd needs -/file/name - can Postfix implement one switchboard instead of having all these little lookup tables? make canonical/virtual/etc. table lookup order configurable -allow /file/name or maptype_mapname in $mydestination - -make protocol errors soft errore? There are a lot of broken mailers -out there that sometimes croak and sometimes work. - -require @ in sender/rcpt (another restriction) - -figure out a way to pump recipients into qmgr before concurrency -starts to drop. - pass on client etc/ attributes along with message to delivery agent -pass on configurable info into external process environment - scrutinize file opens in delivery agents just like in qmgr (better: open the file and see if someone compromised the vmailer account and is racing against us). -cleanup: don't run out of memory with large amounts of bcc addresses - -cleanup: permit non-empty extra segment, so that mail posting -software can pass in bcc recipients. - suspend/resume signals + master status (suspended/running) in PID file. Maybe use FIFO instead. But, that means requests do not arrive when the master is stuck. @@ -134,24 +84,9 @@ access. trivial-rewrite: optionally, use DNS to fully qualify hostnames. -smtp: optionally deal with MX records containing an address instead -of a name. - pickup/cleanup/qmgr/local: add options record to control internal features such as canonical/virtual mapping, VERPs etcetera. -smtpd: when deciding if a destination is local, also look at the -virtual map. Perhaps we should move canonical and virtual lookups -back into the rewrite service, but under a different name, so they -do not get in the way if we do not want them. - -Queue manager: do not allocate queue slots when a destination -already has more than some threshold. This is to prevent a dead or -slow destination from filling up the queue manager's active queue, -preventing delivery to other destinations. However, such `fairness' -strategies should not cause Postfix to lose the benchmark race, so -we must be fair and smart at the same time :-) - Add hook for (domain, user database) support. This is needed if you have lots of real domains and can't afford a separate master.cf delivery agent entry for each domain. @@ -159,9 +94,6 @@ delivery agent entry for each domain. Add support for DBZ databases, using the code from INN. Reportedly, GDB handles large numbers of keys poorly. -Make the number of time bits in the queue ID configurable, or at -least a little larger. - Change the front-end to cleanup protocol so that the front-end sends the expected message size, and so that the cleanup service can report if there is enough space. This is useful only for the @@ -196,40 +128,11 @@ postfix-script: detect and/or build missing alias database. In order to do this we must extract the alias_maps parameter from the main.cf file, and create any missing files with the right ownerships. -SunOS 5.4 sendmail seems to include the null byte in alias keys -and values, like almost every UNIX system; SunOS 5.5 sendmail does -not include these nulls. Need to add support for SunOS 5.4. NIS -alias maps always include the null terminator... - implement the return-receipt-to notification service. -Implement real address rewriting. - -default alias for mail to non-existent users. How useful is this -when the postmaster already gets notices of mail that could not be -delivered by the local mail system? And how do we pass around the -original envelope recipient once it has been "aliased" to the -address for non-existent users? - -owner-default alias to capture all mailing list errors. Or perhaps -they should just set up the appropriate owner-foo aliases in their -alias database? - -make mail_params module the main config interface; no calls from -config.c to routines in mail_params.c - -resolve/rewrite clients should share connection - -postfix-script: make sure permissions of queue (and anything below) -are sane. - bounce/defer: provide attribute-value interface, for better logging (expanded-from etc.) and non-delivery reports. -Postfix-Options: header, to turn on qmail-like VERPs. But, these -must be accessible only for locally-posted mail (not mail that -arrives via UUCP). - Maintain per-client short-term host status, so we can slow down unreasonable clients @@ -248,27 +151,10 @@ True ETRN means kick the host out of the queue manager's "dead hosts" table & move mail from the "hold" queue for that site to the incoming queue. -Option to make a copy of all mail passing through the mail system. - -The message ID is built by concatenating the time of day in seconds -with the queue id. We must ensure that a queue id is unique for at -least one second, otherwise multiple messages will have the same -message ID. Queue ids will always collide after a while. The NFS -generation number for the queue file would be useful, but there is -no portable interface to get it, and we cannot depend on the system -having NFS support enabled. If a 1-microsecond resolution is -sufficient, we could compose the queue ID from the inode number -plus 6 decimal digits or 5 hex ones for the time in microseconds. -Or, use a smarter encoding with more bits per character. - postfix-script: make sure that each queue file matches its file id or we might lose mail. postfix-script: do database fixups as the unprivileged user -Put a version file in the conf directory or add option to vmail -control command to print the version (requires vmconf tool that -can query main.cf.). - Maintain a pool of pre-allocated queue files, to eliminate file creation and deletion overhead. diff --git a/postfix/VIRTUAL_README b/postfix/VIRTUAL_README index 00db8dd23..12005afb0 100644 --- a/postfix/VIRTUAL_README +++ b/postfix/VIRTUAL_README @@ -8,6 +8,10 @@ Purpose of this software You can use the virtual delivery agent for mailbox delivery of some or all domains that are handled by a machine. +This mechanism is different from virtual domains that are implemented +by translating each virtual address into a real local user. For +that, see the virtual(5) manual page. + This is what Andrew McNamara wrote when he made the virtual delivery agent available. @@ -16,12 +20,12 @@ It looks up the location, uid and gid of user mailboxes via separate maps, and the mailbox location map can specify either mailbox or maildir delivery (controlled by trailing slash on mailbox name). -The agent does not support aliases or .forwards (use the virtual -table instead), and therefore doesn't support file or program -aliases. This choice was made to simplify and streamline the code -(it allowed me to dispense with 70% of local's code - mostly the -bits that are a security headache) - if you need this functionality, -this agent isn't for you. +The agent does not support user+foo address extensions, aliases or +.forward files (use the virtual table instead), and therefore +doesn't support file or program aliases. This choice was made to +simplify and streamline the code (it allowed me to dispense with +70% of local's code - mostly the bits that are a security headache) +- if you need this functionality, this agent isn't for you. It also doesn't support writing to a common spool as root and then chowning the mailbox to the user - I felt this functionality didn't @@ -30,8 +34,7 @@ fit with my overall aims." [End of Andrew McNamara's words] The result is the most secure local delivery agent that you will -find with Postfix. All deliveries are done with the privileges of -the recipient. +find with Postfix. This delivery agent requires three different lookup tables in order to define its recipients. This is because Postfix table lookups @@ -61,7 +64,8 @@ virtual_mailbox_maps If a recipient is not found the mail is returned to the sender. - For security reasons, regexp maps are not allowed here. + For security reasons, regexp maps are not allowed here, because + their $1 etc. substitutions would open a security hole. The mail administrator is expected to create and chown recipient mailbox files or maildir directories ahead of time. @@ -77,14 +81,16 @@ virtual_uid_maps Recipients are looked up in this map to determine the UID (owner privileges) to be used when writing to the target mailbox. - For security reasons, regexp maps are not allowed here. + For security reasons, regexp maps are not allowed here, because + their $1 etc. substitutions would open a security hole. virtual_gid_maps Recipients are looked up in this map to determine the GID (group privileges) to be used when writing to the target mailbox. - For security reasons, regexp maps are not allowed here. + For security reasons, regexp maps are not allowed here, because + their $1 etc. substitutions would open a security hole. virtual_mailbox_lock @@ -107,8 +113,9 @@ Example 1: using the virtual delivery agent for all local mail ============================================================== This example does not use the Postfix local delivery agent at all. -With this configuration Postfix does no alias expansion, no .forward -file expansion, and no lookups of recipients in /etc/passwd. +With this configuration Postfix does no user+foo address extension, +no alias expansion, no .forward file expansion, and no lookups of +recipients in /etc/passwd. Instead of "hash" specify "dbm" or "btree", depending on your system type. The command "postconf -m" displays possible lookup table diff --git a/postfix/conf/main.cf b/postfix/conf/main.cf index 38ae9fcd8..b170c6c54 100644 --- a/postfix/conf/main.cf +++ b/postfix/conf/main.cf @@ -115,14 +115,67 @@ mail_owner = postfix # a name matches a lookup key. Continue long lines by starting the # next line with whitespace. # -# DO NOT LIST VIRTUAL DOMAINS HERE. LIST THEM IN THE VIRTUAL FILE -# INSTEAD. BE SURE TO READ THE ENTIRE VIRTUAL MANUAL PAGE. -# #mydestination = $myhostname, localhost.$mydomain #mydestination = $myhostname, localhost.$mydomain $mydomain #mydestination = $myhostname, localhost.$mydomain, $mydomain, # mail.$mydomain, www.$mydomain, ftp.$mydomain +# RELAY CONTROL + +# The mynetworks parameter specifies the list of networks that make +# up the local neighborhood. The list is used by the anti-UCE software +# to distinguish local clients from strangers. See permit_mynetworks +# and smtpd_recipient_restrictions in the file sample-smtpd.cf file. +# +# The default is a list of all networks attached to the machine: a +# complete class A network (X.0.0.0/8), a complete class B network +# (X.X.0.0/16), and so on. +# +# YOU MUST CHANGE THIS DEFAULT SETTING IF YOUR ADDRESS BLOCK IS PART +# OF A LARGER ADDRESS RANGE THAT IS OWNED BY YOUR PROVIDER - IT WOULD +# CAUSE POSTFIX TO RELAY MAIL FROM ALL THEIR CUSTOMERS. +# +# If you need stricter control than the default, specify a list of +# network/mask patterns, where the mask specifies the number of bits +# in the network part of a host address. +# +# You can also specify the absolute pathname of a pattern file instead +# of listing the patterns here. +# +#mynetworks = 168.100.189.0/28, 127.0.0.0/8 +#mynetworks = $config_directory/mynetworks + +# The relay_domains parameter restricts what clients this mail system +# will relay mail from, or what destinations this system will relay +# mail to. See the smtpd_recipient_restrictions restriction in the +# file sample-smtpd.cf for detailed information. +# +# By default, Postfix relays mail +# - from "trusted" clients whose IP address matches $mynetworks, +# - from "trusted" clients matching $relay_domains or subdomains thereof, +# - from untrusted clients to destinations that match $relay_domains +# or subdomains thereof, except addresses with sender-specified routing. +# The default relay_domains value is $mydestination. +# +# In addition to the above, the Postfix SMTP server by default accepts mail +# that Postfix is final destination for: +# - destinations that match $inet_interfaces, +# - destinations that match $mydestination +# - destinations that match $virtual_maps. +# These destinations do not need to be listed in $relay_domains. +# +# Specify a list of hosts or domains, /file/name patterns or type:name +# lookup tables, separated by commas and/or whitespace. Continue +# long lines by starting the next line with whitespace. A file name +# is replaced by its contents; a type:name table is matched when a +# (parent) domain appears as lookup key. +# +# NOTE: Postfix will not automatically forward mail for domains that +# list this system as their primary or backup MX host. See the +# permit_mx_backup restriction in the file sample-smtpd.cf. +# +#relay_domains = $mydestination + # INTERNET OR INTRANET # The relayhost parameter specifies the default host to send mail to @@ -322,53 +375,6 @@ mail_owner = postfix #header_checks = regexp:/etc/postfix/filename #header_checks = pcre:/etc/postfix/filename -# The relay_domains parameter restricts what clients this mail system -# will relay mail from, or what destinations this system will relay -# mail to. See the smtpd_recipient_restrictions restriction in the -# file sample-smtpd.cf. -# -# By default, Postfix relays mail -# - from trusted clients whose IP address matches $mynetworks, -# - from trusted clients matching $relay_domains or subdomains thereof, -# - from untrusted clients to destinations that match $relay_domains -# or subdomains thereof, except addresses with sender-specified routing. -# The default relay_domains value is $mydestination. -# -# In addition to the above, the Postfix SMTP server by default accepts mail -# that Postfix is final destination for: -# - destinations that match $inet_interfaces, -# - destinations that match $mydestination -# - destinations that match $virtual_maps. -# These destinations do not need to be listed in $relay_domains. -# -# Specify a list of hosts or domains, /file/name patterns or type:name -# lookup tables, separated by commas and/or whitespace. Continue -# long lines by starting the next line with whitespace. A file name -# is replaced by its contents; a type:name table is matched when a -# (parent) domain appears as lookup key. -# -# NOTE: Postfix will not automatically forward mail for domains that -# list this system as their primary or backup MX host. See the -# permit_mx_backup restriction in the file sample-smtpd.cf. -# -#relay_domains = $mydestination - -# The mynetworks parameter specifies the list of networks that are -# local to this machine. The list is used by the anti-UCE software -# to distinguish local clients from strangers. See permit_mynetworks -# and smtpd_recipient_restrictions in the file sample-smtpd.cf file. -# -# The default is a list of all networks attached to the machine: a -# complete class A network (X.0.0.0/8), a complete class B network -# (X.X.0.0/16), and so on. If you want stricter control, specify a -# list of network/mask patterns, where the mask specifies the number -# of bits in the network part of a host address. You can also specify -# the absolute pathname of a pattern file instead of listing the -# patterns here. -# -#mynetworks = 168.100.189.0/28, 127.0.0.0/8 -#mynetworks = $config_directory/mynetworks - # FAST ETRN SERVICE # # Postfix maintains per-destination logfiles with information about diff --git a/postfix/conf/postfix-script-nosgid b/postfix/conf/postfix-script-nosgid index 25235a208..d2374041a 100755 --- a/postfix/conf/postfix-script-nosgid +++ b/postfix/conf/postfix-script-nosgid @@ -145,7 +145,9 @@ reload) exit 1 } $INFO refreshing the Postfix mail system + $command_directory/postsuper active || exit 1 kill -HUP `sed 1q pid/master.pid` + $command_directory/postsuper & ;; flush) @@ -252,7 +254,8 @@ EOF # See if all queue files are in the right place. - $command_directory/postsuper || exit 1 + $command_directory/postsuper active + $command_directory/postsuper & find corrupt -type f -exec $WARN damaged message: {} \; diff --git a/postfix/conf/postfix-script-sgid b/postfix/conf/postfix-script-sgid index 2cf7f5c38..f86fdc3c9 100755 --- a/postfix/conf/postfix-script-sgid +++ b/postfix/conf/postfix-script-sgid @@ -145,7 +145,9 @@ reload) exit 1 } $INFO refreshing the Postfix mail system + $command_directory/postsuper active || exit 1 kill -HUP `sed 1q pid/master.pid` + $command_directory/postsuper & ;; flush) @@ -253,8 +255,8 @@ EOF # See if all queue files are in the right place. - - $command_directory/postsuper || exit 1 + $command_directory/postsuper active + $command_directory/postsuper & find corrupt -type f -exec $WARN damaged message: {} \; diff --git a/postfix/html/faq.html b/postfix/html/faq.html index e8919e7ca..6f2dc9829 100644 --- a/postfix/html/faq.html +++ b/postfix/html/faq.html @@ -26,6 +26,8 @@
  • Sendmail incompatibility +
  • Running hundreds of Postfix processes +
  • Postfix performance
  • Receiving mail via the network @@ -99,8 +101,28 @@ distribution list +

    Running hundreds of Postfix processes

    + +
    + +

    Postfix performance

    +
    + +