From 47602acef6f7c8be826a858ee7e4b2d54ff957b9 Mon Sep 17 00:00:00 2001
From: Wietse Venema
Date: Fri, 23 Mar 2007 00:00:00 -0500
Subject: [PATCH] postfix-2.4.0-RC8
---
postfix/HISTORY | 14 +-
postfix/README_FILES/AAAREADME | 8 -
postfix/README_FILES/ADDRESS_CLASS_README | 5 +-
.../README_FILES/ADDRESS_VERIFICATION_README | 4 +-
postfix/README_FILES/CONNECTION_CACHE_README | 18 +-
postfix/README_FILES/DATABASE_README | 6 +-
postfix/README_FILES/DB_README | 15 +-
postfix/README_FILES/DEBUG_README | 41 +--
postfix/README_FILES/DSN_README | 2 +-
postfix/README_FILES/ETRN_README | 40 +--
postfix/README_FILES/FILTER_README | 82 ++---
postfix/README_FILES/LDAP_README | 8 +-
postfix/README_FILES/MILTER_README | 107 +++----
postfix/README_FILES/PACKAGE_README | 8 +-
postfix/README_FILES/SMTPD_POLICY_README | 2 +-
postfix/README_FILES/TUNING_README | 77 +++--
postfix/TODO | 14 +-
.../MacOSX/Postfix.StartupItem/Postfix | 46 ---
.../StartupParameters.plist | 13 -
postfix/auxiliary/MacOSX/README-INSTALL.OSX | 74 -----
postfix/auxiliary/MacOSX/activate-postfix | 43 ---
postfix/auxiliary/MacOSX/activate-sendmail | 24 --
.../auxiliary/MacOSX/backup-postfix-binaries | 20 --
.../auxiliary/MacOSX/backup-sendmail-binaries | 20 --
postfix/auxiliary/MacOSX/deactivate-postfix | 16 -
postfix/auxiliary/MacOSX/defines | 12 -
postfix/auxiliary/MacOSX/niscript | 164 ----------
postfix/auxiliary/MacOSX/repair-oldsetup | 8 -
postfix/conf/access | 283 +++++++++---------
postfix/conf/header_checks | 257 ++++++++--------
postfix/conf/postfix-files | 4 +-
postfix/examples/smtpd-policy/README.SPF | 6 +
.../smtpd-policy/postfix-policyd-spf.pl | 238 ---------------
postfix/html/ADDRESS_CLASS_README.html | 9 +-
postfix/html/ADDRESS_VERIFICATION_README.html | 5 +-
postfix/html/CONNECTION_CACHE_README.html | 36 ++-
postfix/html/CYRUS_README.html | 24 --
postfix/html/DATABASE_README.html | 8 +-
postfix/html/DB_README.html | 15 +-
postfix/html/DEBUG_README.html | 40 +--
postfix/html/DSN_README.html | 2 +-
postfix/html/ETRN_README.html | 49 +--
postfix/html/FILTER_README.html | 62 ++--
postfix/html/LDAP_README.html | 2 +-
postfix/html/MILTER_README.html | 115 +++----
postfix/html/PACKAGE_README.html | 8 +-
postfix/html/SMTPD_POLICY_README.html | 2 +-
postfix/html/TUNING_README.html | 89 ++++--
postfix/html/ULTRIX_README.html | 71 -----
postfix/html/access.5.html | 281 ++++++++---------
postfix/html/header_checks.5.html | 255 ++++++++--------
postfix/html/index.html | 14 -
postfix/html/ldap_table.5.html | 40 +--
postfix/html/postconf.5.html | 26 +-
postfix/makedefs | 8 +
postfix/man/man5/access.5 | 10 +-
postfix/man/man5/header_checks.5 | 46 +--
postfix/man/man5/ldap_table.5 | 4 +-
postfix/man/man5/postconf.5 | 20 +-
postfix/mantools/postlink | 16 +-
postfix/proto/ADDRESS_CLASS_README.html | 5 +-
.../proto/ADDRESS_VERIFICATION_README.html | 5 +-
postfix/proto/CONNECTION_CACHE_README.html | 30 +-
postfix/proto/CYRUS_README.html | 24 --
postfix/proto/DATABASE_README.html | 8 +-
postfix/proto/DB_README.html | 15 +-
postfix/proto/DEBUG_README.html | 40 +--
postfix/proto/DSN_README.html | 2 +-
postfix/proto/ETRN_README.html | 37 +--
postfix/proto/FILTER_README.html | 62 ++--
postfix/proto/LDAP_README.html | 2 +-
postfix/proto/MACOSX_README | 2 -
postfix/proto/MILTER_README.html | 115 +++----
postfix/proto/Makefile.in | 6 +-
postfix/proto/PACKAGE_README.html | 4 +-
postfix/proto/SMTPD_POLICY_README.html | 2 +-
postfix/proto/TUNING_README.html | 89 ++++--
postfix/proto/ULTRIX_README.html | 71 -----
postfix/proto/access | 10 +-
postfix/proto/header_checks | 46 +--
postfix/proto/ldap_table | 4 +-
postfix/proto/postconf.proto | 26 +-
postfix/src/global/dict_proxy.c | 7 +-
postfix/src/global/mail_version.h | 4 +-
postfix/src/global/mbox_open.c | 2 +-
postfix/src/util/sys_defs.h | 6 +
86 files changed, 1472 insertions(+), 2088 deletions(-)
delete mode 100755 postfix/auxiliary/MacOSX/Postfix.StartupItem/Postfix
delete mode 100644 postfix/auxiliary/MacOSX/Postfix.StartupItem/StartupParameters.plist
delete mode 100644 postfix/auxiliary/MacOSX/README-INSTALL.OSX
delete mode 100755 postfix/auxiliary/MacOSX/activate-postfix
delete mode 100755 postfix/auxiliary/MacOSX/activate-sendmail
delete mode 100755 postfix/auxiliary/MacOSX/backup-postfix-binaries
delete mode 100755 postfix/auxiliary/MacOSX/backup-sendmail-binaries
delete mode 100755 postfix/auxiliary/MacOSX/deactivate-postfix
delete mode 100644 postfix/auxiliary/MacOSX/defines
delete mode 100755 postfix/auxiliary/MacOSX/niscript
delete mode 100755 postfix/auxiliary/MacOSX/repair-oldsetup
create mode 100644 postfix/examples/smtpd-policy/README.SPF
delete mode 100755 postfix/examples/smtpd-policy/postfix-policyd-spf.pl
delete mode 100644 postfix/html/CYRUS_README.html
delete mode 100644 postfix/html/ULTRIX_README.html
delete mode 100644 postfix/proto/CYRUS_README.html
delete mode 100644 postfix/proto/MACOSX_README
delete mode 100644 postfix/proto/ULTRIX_README.html
diff --git a/postfix/HISTORY b/postfix/HISTORY
index 54ec6b0ff..2643b31ad 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -13303,7 +13303,8 @@ Apologies for any names omitted.
instead of appending mail to a deleted file. To minimize
the use of this workaround, Postfix now by default creates
mailbox dotlock files on all systems, and creates dotlock
- files before opening mailbox files. Files: util/sys_defs.h.
+ files before opening mailbox files. Files: util/sys_defs.h,
+ global/mbox_open.c.
20070301
@@ -13374,6 +13375,17 @@ Apologies for any names omitted.
records or content encoding records with other mail. File:
global/rec_type.h.
+20070321
+
+ Bugfix (introduced 20070224): local(8) or virtual(8) could
+ log a misleading error message after failure to open a
+ mailbox file. File: global/mbox_open.c.
+
+ Bugfix (code should have been updated 20070104): the proxymap
+ client did not propagate changes in case folding flags.
+ Currently, nothing in Postfix uses this functionality.
+ File: global/dict_proxy.c.
+
Wish list:
Bind all deliveries to the same local delivery process,
diff --git a/postfix/README_FILES/AAAREADME b/postfix/README_FILES/AAAREADME
index 4a317e155..44e307ca7 100644
--- a/postfix/README_FILES/AAAREADME
+++ b/postfix/README_FILES/AAAREADME
@@ -18,7 +18,6 @@ PPrroobblleemm ssoollvviinngg
* QSHAPE_README: Bottleneck analysis
* TUNING_README: Performance tuning
* DEBUG_README: Debugging strategies
- * Error messages (*)
CCoonntteenntt iinnssppeeccttiioonn
@@ -50,20 +49,16 @@ LLooookkuupp ttaabblleess ((ddaattaabbaasseess))
MMaaiilliinngg lliisstt ssuuppppoorrtt
- * qmail/ezmlm support (*)
* VERP_README: VERP Support
SSppeecciiffiicc eennvviirroonnmmeennttss
* LINUX_README: Linux issues
* NFS_README: NFS issues
- * ULTRIX_README: Ultrix support
OOtthheerr mmaaiill ddeelliivveerryy aaggeennttss
- * Cyrus (*)
* MAILDROP_README: Maildrop
- * LMTP (*)
OOtthheerr ttooppiiccss
@@ -78,6 +73,3 @@ OOtthheerr ttooppiiccss
* XCLIENT_README: XCLIENT Command
* XFORWARD_README: XFORWARD Command
-(*) These documents will be made available via http://www.postfix.org/ and
-mirror sites.
-
diff --git a/postfix/README_FILES/ADDRESS_CLASS_README b/postfix/README_FILES/ADDRESS_CLASS_README
index 9a8b9075c..3eefa48b6 100644
--- a/postfix/README_FILES/ADDRESS_CLASS_README
+++ b/postfix/README_FILES/ADDRESS_CLASS_README
@@ -28,8 +28,9 @@ An address class is defined by three items.
* The list of domains that are a member of the class: for example, all local
domains, or all relay domains.
- * The default delivery method. For example, the local or smtp delivery agent.
- This helps to keep Postfix configurations simple.
+ * The default delivery transport. For example, the local or relay delivery
+ transport (delivery transports are defined in master.cf). This helps to
+ keep Postfix configurations simple.
* The list of valid recipient addresses for that address class. The Postfix
SMTP server rejects invalid recipients with "User unknown in scache(8) <-> smtp(8) --> Internet
-
-
The scache(8) server, introduced with Postfix version 2.2, maintains the shared
connection cache. With Postfix version 2.2, only the smtp(8) client has support
to access this cache.
+ smtp(8) --> Internet
+
+
+ |
+ |
+ |
+ | smtp(8) --> Internet
+ |
+ |
+ v ^
+ |
+
+ scache(8)
+
+
When SMTP connection caching is enabled (see next section), the smtp(8) client
does not disconnect after a mail transaction, but gives the connection to the
scache(8) server which keeps the connection open for a limited amount of time.
diff --git a/postfix/README_FILES/DATABASE_README b/postfix/README_FILES/DATABASE_README
index c1202d22a..b1a9645a1 100644
--- a/postfix/README_FILES/DATABASE_README
+++ b/postfix/README_FILES/DATABASE_README
@@ -44,7 +44,8 @@ Benefits of the Postfix (key, value) query interface:
lookups" below.
* You can use Berkeley DB files with fixed lookup strings for simple address
rewriting operations and you can use regular expression tables for the more
- complicated work.
+ complicated work. In other words, you don't have to put everything into the
+ same table.
PPoossttffiixx lliissttss vveerrssuuss ttaabblleess
@@ -124,7 +125,8 @@ update fails because the disk is full or because something else happens. This
is because commands such as postmap(1) or postalias(1) overwrite existing
files. If the update fails in the middle then you have no usable database, and
Postfix will stop working. This is not an issue with the CDB database type
-available with Postfix 2.2 and later, because CDB database rebuilds are atomic.
+available with Postfix 2.2 and later: CDB creates a new file, and renames the
+file upon successful completion.
With multi-file databases such as DBM, there is no simple solution. With
Berkeley DB and other "one file" databases, it is possible to add some extra
diff --git a/postfix/README_FILES/DB_README b/postfix/README_FILES/DB_README
index 62b852ef3..955a60ace 100644
--- a/postfix/README_FILES/DB_README
+++ b/postfix/README_FILES/DB_README
@@ -25,14 +25,15 @@ This document describes:
BBuuiillddiinngg PPoossttffiixx oonn ssyysstteemmss wwiitthhoouutt BBeerrkkeelleeyy DDBB
-Many commercial UNIXes ship without Berkeley DB support. Examples are Solaris,
-HP-UX, IRIX, UNIXWARE. In order to build Postfix with Berkeley DB support you
-need to download and install the source code from http://www.sleepycat.com/
+Some UNIXes ship without Berkeley DB support; for historical reasons these use
+DBM files instead. A problem with DBM files is that they can store only limited
+amounts of data. To build Postfix with Berkeley DB support you need to download
+and install the source code from http://www.oracle.com/database/berkeley-db/.
Warning: some Linux system libraries use Berkeley DB, as do some third-party
libraries such as SASL. If you compile Postfix with a different Berkeley DB
implementation, then every Postfix program will dump core because either the
-system library, SASL library, or Postfix itself ends up using the wrong
+system library, the SASL library, or Postfix itself ends up using the wrong
version.
The more recent Berkeley DB versions have a compile-time switch, "--with-
@@ -40,8 +41,8 @@ uniquename", which renames the symbols so that multiple versions of Berkeley DB
can co-exist in the same application. Although wasteful, this may be the only
way to keep things from falling apart.
-To build Postfix after you installed the Berkeley DB from http://
-www.sleepycat.com/, use something like:
+To build Postfix after you installed the Berkeley DB from source code, use
+something like:
% make tidy
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
@@ -151,5 +152,5 @@ Add the "-lpthread" library to the "make makefiles" command.
% make makefiles .... AUXLIBS="... -lpthread"
-More information is available at http://www.sleepycat.com/.
+More information is available at http://www.oracle.com/database/berkeley-db/.
diff --git a/postfix/README_FILES/DEBUG_README b/postfix/README_FILES/DEBUG_README
index bb2ee7393..fd447f8c2 100644
--- a/postfix/README_FILES/DEBUG_README
+++ b/postfix/README_FILES/DEBUG_README
@@ -54,8 +54,8 @@ The nature of each problem is indicated as follows:
configuration file settings that you can fix. Postfix cannot proceed until
this is fixed.
- * "eerrrroorr" reports a fatal or non-fatal error condition. Postfix cannot
- proceed until this is fixed.
+ * "eerrrroorr" reports an error condition. For safety reasons, a Postfix process
+ will terminate when more than 13 of these happen.
* "wwaarrnniinngg" indicates a non-fatal error. These are problems that you may not
be able to fix (such as a broken DNS server elsewhere on the network) but
@@ -85,7 +85,7 @@ Postfix can produce two types of mail delivery reports for debugging:
Mail Delivery Status Report will be mailed to .
These reports contain information that is generated by Postfix delivery agents.
-Since these run as daemon processes and do not interact with users directly,
+Since these run as daemon processes that cannot interact with users directly,
the result is sent as mail to the sender of the test message. The format of
these reports is practically identical to that of ordinary non-delivery
notifications.
@@ -136,29 +136,31 @@ change effective immediately, execute the command "ppoossttffiixx rreel
RReeccoorrdd tthhee SSMMTTPP sseessssiioonn wwiitthh aa nneettwwoorrkk ssnniiffffeerr
This example uses ttccppdduummpp. In order to record a conversation you need to
-specify a large enough buffer with the "-s" option or else you will miss some
+specify a large enough buffer with the "--ss" option or else you will miss some
or all of the packet payload.
- # ttccppdduummpp --ww //ffiillee//nnaammee --ss 22000000 hhoosstt eexxaammppllee..ccoomm aanndd ppoorrtt 2255
+ # ttccppdduummpp --ww //ffiillee//nnaammee --ss 00 hhoosstt eexxaammppllee..ccoomm aanndd ppoorrtt 2255
+
+Older tcpdump versions don't support "--ss 00"; in that case, use "--ss 22000000"
+instead.
Run this for a while, stop with Ctrl-C when done. To view the data use a binary
-viewer, or eetthheerreeaall, or use my ttccppdduummppxx utility that is available from ftp://
-ftp.porcupine.org/pub/debugging/.
+viewer, eetthheerreeaall, or good old lleessss.
MMaakkiinngg PPoossttffiixx ddaaeemmoonn pprrooggrraammss mmoorree vveerrbboossee
Append one or more "--vv" options to selected daemon definitions in /etc/postfix/
master.cf and type "ppoossttffiixx rreellooaadd". This will cause a lot of activity to be
-logged to the syslog daemon. Example:
+logged to the syslog daemon. For example, to make the Postfix SMTP server
+process more verbose:
/etc/postfix/master.cf:
smtp inet n - n - - smtpd -v
-This makes the Postfix SMTP server more verbose. To diagnose problems with
-address rewriting one would specify a "--vv" option for the cleanup(8) and/or
-trivial-rewrite(8) daemon, and to diagnose problems with mail delivery one
-would specify a "--vv" option for the qmgr(8) or oqmgr(8) queue manager, or for
-the lmtp(8), local(8), pipe(8), smtp(8), or virtual(8) delivery agent.
+To diagnose problems with address rewriting specify a "--vv" option for the
+cleanup(8) and/or trivial-rewrite(8) daemon, and to diagnose problems with mail
+delivery specify a "--vv" option for the qmgr(8) or oqmgr(8) queue manager, or
+for the lmtp(8), local(8), pipe(8), smtp(8), or virtual(8) delivery agent.
MMaannuuaallllyy ttrraacciinngg aa PPoossttffiixx ddaaeemmoonn pprroocceessss
@@ -361,16 +363,17 @@ When reporting a problem, be sure to include the following information.
* Postfix logging. See the text at the top of the DEBUG_README document to
find out where logging is stored. Please do not frustrate the helpers by
- word wrapping the logging.
+ word wrapping the logging. If the logging is more than a few kbytes of
+ text, consider posting an URL on a web or ftp site.
* Consider using a test email address so that you don't have to reveal email
addresses or passwords of innocent people.
- * If you can't use a test email address, please anonymize information
- consistently. Replace each letter by "A", each digit by "D" so that the
- helpers can still recognize syntactical errors.
+ * If you can't use a test email address, please anonymize email addresses and
+ host names consistently. Replace each letter by "A", each digit by "D" so
+ that the helpers can still recognize syntactical errors.
- * Output from "ppoossttccoonnff --nn". Please do not send your main.cf file or 400+
+ * Output from "ppoossttccoonnff --nn". Please do not send your main.cf file, or 500+
lines of ppoossttccoonnff output.
* Better, provide output from the ppoossttffiinnggeerr tool. This can be found at http:
@@ -383,7 +386,7 @@ When reporting a problem, be sure to include the following information.
* If the problem is about too much mail in the queue, consider including
output from the qqsshhaappee tool, as described in the QSHAPE_README file.
- * If the problem is protocol related (connections time out or an SMTP server
+ * If the problem is protocol related (connections time out, or an SMTP server
complains about syntax errors etc.) consider recording a session with
ttccppdduummpp, as described in the DEBUG_README document.
diff --git a/postfix/README_FILES/DSN_README b/postfix/README_FILES/DSN_README
index a422a3f6f..efd7f4c11 100644
--- a/postfix/README_FILES/DSN_README
+++ b/postfix/README_FILES/DSN_README
@@ -22,7 +22,7 @@ Specifically, DSN support gives an email sender the ability to specify:
confused with the message ID, which identifies the message content.
The implementation of DSN support involves extra parameters to the SMTP MAIL
-FROM and RCPT TO commands, as well as new Postfix sendmail command line options
+FROM and RCPT TO commands, as well as two Postfix sendmail command line options
that provide a sub-set of the functions of the extra SMTP command parameters.
This document has information on the following topics:
diff --git a/postfix/README_FILES/ETRN_README b/postfix/README_FILES/ETRN_README
index 5970aacbb..76bc8dece 100644
--- a/postfix/README_FILES/ETRN_README
+++ b/postfix/README_FILES/ETRN_README
@@ -11,10 +11,6 @@ to the customer, and delivers that mail bbyy ccoonnnneeccttiinngg t
sseerrvveerr. The mail is not delivered via the connection that was used for sending
ETRN.
-Postfix versions before 1.0 (also known as version 20010228) implemented the
-ETRN command in an inefficient manner: they simply attempted to deliver all
-queued mail. This is slow on mail servers that queue mail for many customers.
-
As of version 1.0, Postfix has a fast ETRN implementation that does not require
Postfix to examine every queue file. Instead, Postfix maintains a record of
what queue files contain mail for destinations that are configured for ETRN
@@ -40,11 +36,11 @@ The following is an example SMTP session that shows how an SMTP client requests
the ETRN service. Client commands are shown in bold font.
220 my.server.tld ESMTP Postfix
- hheelloo mmyy..cclliieenntt..ttlldd
+ HHEELLOO mmyy..cclliieenntt..ttlldd
250 Ok
- eettrrnn ssoommee..ccuussttoommeerr..ddoommaaiinn
+ EETTRRNN ssoommee..ccuussttoommeerr..ddoommaaiinn
250 Queuing started
- qquuiitt
+ QQUUIITT
221 Bye
As mentioned in the introduction, the mail is delivered by connecting to the
@@ -53,7 +49,8 @@ send the ETRN command.
The Postfix operator can request delivery for a specific customer by using the
command "sendmail -qRdestination" and, with Postfix version 1.1 and later,
-"postqueue -sdestination".
+"postqueue -sdestination". Access to this feature is controlled with the
+authorized_flush_users configuration parameter (Postfix version 2.2 and later).
HHooww PPoossttffiixx ffaasstt EETTRRNN wwoorrkkss
@@ -85,13 +82,14 @@ service for every possible destination.
* The flush(8) daemon maintains per-destination logfiles with queue file
names. When a request to "deliver mail now" arrives, Postfix will attempt
to deliver all recipients in the queue files that have mail for the
- destination in question. This does not perform well when queue files have
- recipients in many different domains.
+ destination in question. This does not perform well with queue files that
+ have recipients in many different domains, such as queue files with
+ outbound mailing list traffic.
* The flush(8) daemon maintains per-destination logfiles only for
- destinations listed with $fast_flush_domains. With other destinations it
- not possible to trigger delivery with "sendmail -qRdestination" or, with
- Postfix version 1.1 and later, "postqueue -sdestination".
+ destinations listed with $fast_flush_domains. With other destinations you
+ cannot request delivery with "sendmail -qRdestination" or, with Postfix
+ version 1.1 and later, "postqueue -sdestination".
* Up to and including early versions of Postfix version 2.1, the "fast flush"
service may not deliver some messages if the request to "deliver mail now"
@@ -100,6 +98,10 @@ service for every possible destination.
dead domains, and the list of message delivery transports specified with
the defer_transports configuration parameter.
+ * Up to and including Postfix version 2.3, the "fast flush" service may not
+ deliver some messages if the request to "deliver mail now" arrives while an
+ incoming queue scan is already in progress.
+
CCoonnffiigguurriinngg tthhee PPoossttffiixx ffaasstt EETTRRNN sseerrvviiccee
The behavior of the flush(8) daemon is controlled by parameters in the main.cf
@@ -200,9 +202,9 @@ client that is allowed to execute ETRN commands (by default, that's every
client), and type the commands shown in boldface:
220 my.server.tld ESMTP Postfix
- hheelloo mmyy..cclliieenntt..ttlldd
+ HHEELLOO mmyy..cclliieenntt..ttlldd
250 Ok
- eettrrnn ssoommee..ccuussttoommeerr..ddoommaaiinn
+ EETTRRNN ssoommee..ccuussttoommeerr..ddoommaaiinn
250 Queuing started
where "some.customer.domain" is the name of a domain that has a non-empty
@@ -225,9 +227,9 @@ relay to (any domain listed in $relay_domains), but that has no mail queued.
The text in bold face stands for the commands that you type:
220 my.server.tld ESMTP Postfix
- hheelloo mmyy..cclliieenntt..ttlldd
+ HHEELLOO mmyy..cclliieenntt..ttlldd
250 Ok
- eettrrnn ssoommee..ootthheerr..ccuussttoommeerr..ddoommaaiinn
+ EETTRRNN ssoommee..ootthheerr..ccuussttoommeerr..ddoommaaiinn
250 Queuing started
This time, the "ETRN"" command should trigger NO mail deliveries at all. If
@@ -239,9 +241,9 @@ willing to relay to. It does not matter if your server has mail queued for that
destination.
220 my.server.tld ESMTP Postfix
- hheelloo mmyy..cclliieenntt..ttlldd
+ HHEELLOO mmyy..cclliieenntt..ttlldd
250 Ok
- eettrrnn nnoott..aa..ccuussttoommeerr..ddoommaaiinn
+ EETTRRNN nnoott..aa..ccuussttoommeerr..ddoommaaiinn
459 : service unavailable
In this case, Postfix should reject the request as shown above.
diff --git a/postfix/README_FILES/FILTER_README b/postfix/README_FILES/FILTER_README
index 970583712..192ed2a48 100644
--- a/postfix/README_FILES/FILTER_README
+++ b/postfix/README_FILES/FILTER_README
@@ -21,9 +21,9 @@ This document describes implementations that use a single Postfix instance for
everything: receiving, filtering and delivering mail. Applications that use two
separate Postfix instances will be covered by a later version of this document.
-The after-queue content filter is not to be confused with the approach that is
-described in the SMTPD_PROXY_README document, where incoming SMTP mail is
-filtered BEFORE it is stored into the Postfix queue.
+The after-queue content filter is not to be confused with the approaches
+described in the SMTPD_PROXY_README or MILTER_README documents, where incoming
+SMTP mail is filtered BEFORE it is stored into the Postfix queue.
This document describes two approaches to content filter all email, as well as
several options to filter mail selectively:
@@ -50,14 +50,16 @@ several options to filter mail selectively:
PPrriinncciipplleess ooff ooppeerraattiioonn
-An external content filter receives unfiltered mail from Postfix (as described
-further below) and does one of the following:
+An after-queue content filter receives unfiltered mail from Postfix (as
+described further below) and can do one of the following:
1. Re-inject the mail back into Postfix, perhaps after changing content and/or
destination.
- 2. Reject the mail (by sending a suitable status code back to Postfix).
- Postfix will return the mail to the sender.
+ 2. Discard or quarantine the mail.
+
+ 3. Reject the mail (by sending a suitable status code back to Postfix).
+ Postfix will send the mail back to the sender address.
NOTE: in this time of mail worms and forged spam, it is a VERY BAD IDEA to send
viruses back to the sender address, because the sender address is almost
@@ -67,8 +69,9 @@ it.
SSiimmppllee ccoonntteenntt ffiilltteerr eexxaammppllee
-The first example is simple to set up. Postfix receives unfiltered mail from
-the network with the smtpd(8) server, and delivers unfiltered mail to a content
+The first example is simple to set up, but has major limitations that will be
+addressed in a second example. Postfix receives unfiltered mail from the
+network with the smtpd(8) server, and delivers unfiltered mail to a content
filter with the Postfix pipe(8) delivery agent. The content filter injects
filtered mail back into Postfix with the Postfix sendmail(1) command, so that
Postfix can deliver it to the final destination.
@@ -126,33 +129,36 @@ The content filter can be a simple shell script like this:
Notes:
- * Line 8: The -G option does nothing before Postfix 2.3, otherwise it
- disables address rewriting of message headers.
+ * Line 8: The -G option says the filter output is not a local mail
+ submission: don't do silly things like appending the local domain name to
+ addresses in message headers. This option does nothing before Postfix
+ version 2.3.
* Line 8: The -i option says don't stop reading input when a line contains
"." only.
* Line 8: NEVER NEVER NEVER use the "-t" command-line option here. It will
- mis-deliver mail, like sending mailing list mail back to the mailing list.
+ mis-deliver mail, like sending messages from a mailing list back to the
+ mailing list.
* Line 21: The idea is to first capture the message to file and then run the
content through a third-party content filter program.
- * Line 22: If the mail cannot be captured to file, mail delivery is deferred
- by terminating with exit status 75 (EX_TEMPFAIL). Postfix places the
- message in the deferred mail queue and tries again later.
+ * Line 22: If the message cannot be captured to file, mail delivery is
+ deferred by terminating with exit status 75 (EX_TEMPFAIL). Postfix places
+ the message in the deferred mail queue and tries again later.
* Line 25: You will need to specify a real content filter program here that
receives the content on standard input.
* Line 26: 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.
+ by terminating with exit status 69 (EX_UNAVAILABLE). Postfix will send the
+ message back to the sender as undeliverable mail.
- * Note: in this time of mail worms and spam, it is a BAD IDEA to send known
+ * NOTE: in this time of mail worms and spam, it is a BAD IDEA to send known
viruses or spam back to the sender, because that address is likely to be
- forged. It is safer to discard known to be bad content and to quarantine
- suspicious content so that it can be inspected by a human being.
+ forged. It is safer to discard known viruses and to quarantine suspicious
+ content so that it can be inspected by a human being.
* Line 28: 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
@@ -164,7 +170,7 @@ Notes:
I suggest that you first run this script by hand until you are satisfied with
the results. Run it with a real message (headers+body) as input:
- % /path/to/script -f sender recipient...
- This happens because some Milter applications expect that the queue ID is
+ This happens because those Milter applications expect that the queue ID is
known before the MTA accepts the MAIL FROM (sender) command. Postfix, on
the other hand, does not choose a queue file name until after it accepts
- the first valid RCPT TO (recipient) command. Postfix queue file names must
+ the first valid RCPT TO (recipient) command (Postfix queue file names must
be unique across multiple directories, so the name can't be chosen before
- the file is created. If multiple messages were to use the same queue ID
- simultaneously, mail would be lost.
+ the file is created; if multiple messages were to use the same queue ID
+ simultaneously, mail would be lost).
- To work around the ugly message header from Milter applications, we add a
- little code to the Milter source to look up the queue ID after Postfix
- receives the end of the message.
+Fixing the ugly header maybe as simple as upgrading to a recent version of the
+Milter application. For example, current versions of dkim-filter and dk-filter
+have code that looks up the Postfix queue ID at a later protocol stage.
- o Edit the filter source file (typically named dk-filter/dk-filter.c or
- similar).
+To fix the ugly message header with sid-filter applications, we change the
+source code, so that it does the queue ID lookup after Postfix receives the end
+of the message.
- o Look up the mlfi_eom() function and add code near the top shown as bboolldd
- text below:
+ * Edit the filter source file (named sid-filter/sid-filter.c).
- dfc = cc->cctx_msg;
- assert(dfc != NULL);
+ * Look up the smfilter table and replace mlfi_eoh by NULL.
- //** DDeetteerrmmiinnee tthhee jjoobb IIDD ffoorr llooggggiinngg.. **//
- iiff ((ddffcc-->>mmccttxx__jjoobbiidd ==== 00 |||| ssttrrccmmpp((ddffcc-->>mmccttxx__jjoobbiidd,, JJOOBBIIDDUUNNKKNNOOWWNN)) ==== 00))
- {{
- cchhaarr **jjoobbiidd == ssmmffii__ggeettssyymmvvaall((ccttxx,, ""ii""));;
- iiff ((jjoobbiidd !!== 00))
- ddffcc-->>mmccttxx__jjoobbiidd == jjoobbiidd;;
- }}
+ * Look up the mlfi_eom() function and add code near the top that calls
+ mlfi_eoh() as shown by the bboolldd text below:
- /* get hostname; used in the X header and in new MIME boundaries */
+ assert(ctx != NULL);
+ #endif /* !DEBUG */
- NOTES:
+ rreett == mmllffii__eeoohh((ccttxx));;
+ iiff ((rreett !!== SSMMFFIISS__CCOONNTTIINNUUEE))
+ rreettuurrnn rreett;;
- o Different mail filters use slightly different names for variables. If
- the above code does not compile, look for the code at the start of the
- mlfi_eoh() routine.
+NOTES:
- o This fixes only the ugly message header, but not the WARNING message.
- Fortunately, dk-filter logs that message only once.
+ * This was tested with sid-milter-0.2.10 and sid-milter-0.2.14.
- With some Milter applications we can fix both the WARNING and the "unknown-
- msgid" by postponing the call of mlfi_eoh() (or whatever routine logs the
- WARNING) until the end of the message.
+ * This fixes only the ugly message header, but not the WARNING message.
+ Fortunately, sid-milter logs that message only once.
- o Edit the filter source file (typically named sid-filter/sid-filter.c or
- similar).
+To fix the ugly message header with other Milter applications, you will need to
+do something like this:
- o Look up the smfilter table and replace mlfi_eoh (or whatever routine
- logs the WARNING) by NULL.
+ * Edit the filter source file (typically named xxx-filter/xxx-filter.c or
+ similar).
- o Look up the mlfi_eom() function and add code near the top that calls
- mlfi_eoh() as shown by the bboolldd text below:
+ * Look up the mlfi_eom() function and add code near the top shown as bboolldd
+ text below:
- assert(ctx != NULL);
- #endif /* !DEBUG */
+ dfc = cc->cctx_msg;
+ assert(dfc != NULL);
- rreett == mmllffii__eeoohh((ccttxx));;
- iiff ((rreett !!== SSMMFFIISS__CCOONNTTIINNUUEE))
- rreettuurrnn rreett;;
+ //** DDeetteerrmmiinnee tthhee jjoobb IIDD ffoorr llooggggiinngg.. **//
+ iiff ((ddffcc-->>mmccttxx__jjoobbiidd ==== 00 |||| ssttrrccmmpp((ddffcc-->>mmccttxx__jjoobbiidd,, JJOOBBIIDDUUNNKKNNOOWWNN)) ==== 00)) {{
+ cchhaarr **jjoobbiidd == ssmmffii__ggeettssyymmvvaall((ccttxx,, ""ii""));;
+ iiff ((jjoobbiidd !!== 00))
+ ddffcc-->>mmccttxx__jjoobbiidd == jjoobbiidd;;
+ }}
- This works with sid-milter-0.2.10. Other Milter applications will dump core
- when you do this.
+ /* get hostname; used in the X header and in new MIME boundaries */
+
+NOTES:
+
+ * Different mail filters use slightly different names for variables. If the
+ above code does not compile, look for the code at the start of the mlfi_eoh
+ () routine.
+
+ * This fixes only the ugly message header, but not the WARNING message.
+ Fortunately, many Milters log that message only once.
LLiimmiittaattiioonnss
diff --git a/postfix/README_FILES/PACKAGE_README b/postfix/README_FILES/PACKAGE_README
index 71cec7151..d0e57d854 100644
--- a/postfix/README_FILES/PACKAGE_README
+++ b/postfix/README_FILES/PACKAGE_README
@@ -11,10 +11,10 @@ for general use.
GGeenneerraall ddiissttrriibbuuttiioonnss:: pplleeaassee pprroovviiddee aa ssmmaallll ddeeffaauulltt mmaaiinn..ccff ffiillee
The installed main.cf file must be small. PLEASE resist the temptation to list
-all 400+ parameters in the main.cf file. Postfix is supposed to be easy to
-configure. Listing all 400+ in main.cf defeats the purpose. It is an invitation
-for hobbyists to make random changes without understanding what they do, and
-gets them into endless trouble.
+all parameters in the main.cf file. Postfix is supposed to be easy to
+configure. Listing all parameters in main.cf defeats the purpose. It is an
+invitation for hobbyists to make random changes without understanding what they
+do, and gets them into endless trouble.
GGeenneerraall ddiissttrriibbuuttiioonnss:: pplleeaassee iinncclluuddee RREEAADDMMEE oorr HHTTMMLL ffiilleess
diff --git a/postfix/README_FILES/SMTPD_POLICY_README b/postfix/README_FILES/SMTPD_POLICY_README
index 7735aaeaa..5098dd880 100644
--- a/postfix/README_FILES/SMTPD_POLICY_README
+++ b/postfix/README_FILES/SMTPD_POLICY_README
@@ -118,7 +118,7 @@ Notes:
how the client was authenticated via TLS. These attributes are empty in
case of no certificate authentication. As of Postfix 2.2.11 these attribute
values are encoded as xtext: some characters are represented by +XX, where
- XX is the two-digit hecadecimal representation of the character value.
+ XX is the two-digit hexadecimal representation of the character value.
* The "encryption_*" attributes (Postfix 2.3 and later) specify information
about how the connection is encrypted. With plaintext connections the
diff --git a/postfix/README_FILES/TUNING_README b/postfix/README_FILES/TUNING_README
index 000f98d21..c6016d092 100644
--- a/postfix/README_FILES/TUNING_README
+++ b/postfix/README_FILES/TUNING_README
@@ -141,7 +141,8 @@ Postfix version 2.0 and earlier:
MMeeaassuurreess aaggaaiinnsstt cclliieennttss tthhaatt mmaakkee ttoooo mmaannyy ccoonnnneeccttiioonnss
-Note: the anvil(8) service was introduced with Postfix version 2.2.
+Note: these features use the Postfix anvil(8) service, introduced with Postfix
+version 2.2.
The Postfix smtpd(8) server can limit the number of simultaneous connections
from the same SMTP client, as well as the number of connections that a client
@@ -149,29 +150,31 @@ is allowed to make per unit time. These statistics are maintained by the anvil
(8) server (translation: if anvil(8) breaks, then connection limits stop
working).
-IMPORTANT: These limits are designed to protect the smtpd(8) server against
-flagrant abuse. Do not use these limits to regulate legitimate traffic: mail
-will suffer grotesque delays if you do so.
+IMPORTANT: These limits must not be used to regulate legitimate traffic: mail
+will suffer grotesque delays if you do so. The limits are designed to protect
+the smtpd(8) server against abuse by out-of-control clients.
- * An SMTP client may make up to $smtpd_client_connection_count_limit
- simultaneous connections (default: 50). This is half the default process
- limit.
-
- * An SMTP client may make up to $smtpd_client_message_rate_limit message
- delivery requests per unit time (default: no limit).
-
- * An SMTP client may send up to $smtpd_client_recipient_rate_limit recipient
- addresses per unit time (default: no limit).
-
- * An SMTP client may make up to $smtpd_client_connection_rate_limit
- connections per unit time (default: no limit).
-
- * These limits are not applied to SMTP clients in the networks specified with
- $smtpd_client_event_limit_exceptions (default: clients in $mynetworks may
- make an unlimited number of connections).
-
- * The anvil_rate_time_unit parameter specifies the time unit over which
- client connection rates are computed (default: 60s).
+ smtpd_client_connection_count_limit (default: 50)
+ The maximum number of connections than an SMTP client may make
+ simultaneously.
+ smtpd_client_connection_rate_limit (default: no limit)
+ The maximum number of connections that an SMTP client may make in the
+ time interval specified with anvil_rate_time_unit (default: 60s).
+ smtpd_client_message_rate_limit (default: no limit)
+ The maximum number of message delivery requests that an SMTP client may
+ make in the time interval specified with anvil_rate_time_unit (default:
+ 60s).
+ smtpd_client_recipient_rate_limit (default: no limit)
+ The maximum number of recipient addresses that an SMTP client may
+ specify in the time interval specified with anvil_rate_time_unit
+ (default: 60s).
+ smtpd_client_new_tls_session_rate_limit (default: no limit)
+ The maximum number of new TLS sessions (without using the TLS session
+ cache) that an SMTP client may negotiate in the time interval specified
+ with anvil_rate_time_unit (default: 60s).
+ smtpd_client_event_limit_exceptions (default: $mynetworks)
+ SMTP clients that are excluded from connection and rate limits
+ specified above.
GGeenneerraall mmaaiill ddeelliivveerryy ppeerrffoorrmmaannccee ttiippss
@@ -251,7 +254,7 @@ Examples of transport specific concurrency limits are:
limit delivery concurrency to the same recipient: if the recipient has an
expensive shell command in her .forward file, or if the recipient is a
mailing list manager, you don't want to run too many instances of those
- processes the same time.
+ processes at the same time.
* The default smtp_destination_concurrency_limit of 20 seems enough to
noticeably load a system without bringing it to its knees. Be careful when
@@ -334,9 +337,9 @@ message it may blame the message itself, or it may blame the receiving party.
This process is governed by a bunch of little parameters.
- queue_run_delay (default: 1000 seconds)
+ queue_run_delay (default: 300 seconds; before Postfix 2.4: 1000s)
How often the queue manager scans the queue for deferred mail.
- minimal_backoff_time (default: 1000 seconds)
+ minimal_backoff_time (default: 300 seconds; before Postfix 2.4: 1000s)
The minimal amount of time a message won't be looked at, and the
minimal amount of time to stay away from a "dead" destination.
maximal_backoff_time (default: 4000 seconds)
@@ -374,8 +377,8 @@ mail delivery performance actually becomes worse. The symptoms are as follows:
When mail is being deferred frequently, fixing the problem is always better
than increasing the frequency of delivery attempts. However, if you can control
only the delivery attempt frequency, consider using a dedicated fallback_relay
-"graveyard" machine for bad destinations so that they do not ruin the
-performance of normal mail deliveries.
+"graveyard" machine for bad destinations, so that these destinations do not
+ruin the performance of normal mail deliveries.
TTuunniinngg tthhee nnuummbbeerr ooff PPoossttffiixx pprroocceesssseess
@@ -414,6 +417,16 @@ TTuunniinngg tthhee nnuummbbeerr ooff ooppeenn ffiillee
When Postfix opens too many files or sockets, processes will abort with fatal
errors, and the system may log "file table full" errors.
+ * Depending on your Postfix and operating system versions you may need to
+ recompile Postfix if you need more than 1024 file descriptors per process:
+
+ o No recompilation is needed for Postfix version 2.4 and later, when it
+ was compiled for systems that support BSD kqueue(2) (FreeBSD 4.1,
+ NetBSD 2.0, OpenBSD 2.9), Solaris 8 /dev/poll, or Linux 2.6 epoll(4).
+
+ o Otherwise, Postfix needs to be recompiled to override the default
+ FD_SETSIZE value.
+
* Reduce the number of processes as described under "Tuning the number of
Postfix processes" above. Fewer processes need fewer open files and
sockets.
@@ -423,8 +436,8 @@ errors, and the system may log "file table full" errors.
sure to verify the following information with your system tuning guide:
o Some FreeBSD kernel parameters can be specified in /boot/loader.conf,
- and some can be changed with sysctl commands. Which is which depends on
- the version.
+ and some can be specified in /etc/sysctl.conf or changed with sysctl
+ commands. Which is which depends on the version.
kern.ipc.maxsockets="5000"
kern.ipc.nmbclusters="65536"
@@ -432,8 +445,8 @@ errors, and the system may log "file table full" errors.
kern.maxfiles="16384"
kern.maxfilesperproc="16384"
- o Linux kernel parameters can be specified in /etc/sysctl.conf and can
- also be changed with sysctl commands:
+ o Linux kernel parameters can be specified in /etc/sysctl.conf or changed
+ with sysctl commands:
fs.file-max=16384
kernel.threads-max=2048
diff --git a/postfix/TODO b/postfix/TODO
index 2b036642d..d3e5e2e2a 100644
--- a/postfix/TODO
+++ b/postfix/TODO
@@ -1,23 +1,13 @@
What needs to be done before Postfix 2.4.0 is finished:
-- Update MILTER_README (dkim, application patches).
-
- Create RELEASE_NOTES_2.4.
- Update BACKSCATTER_README with PCRE rules.
+- Otherwise done up to and including FILTER_README
+
- Truncate wish list from HISTORY.
- Spell check and double word check the proto files.
- Parameter hyperlink check and HTML check the html outputs.
-
-- Replace SPF policy server script by link to SPF website.
-
-- Remove MacOS X examples. They have not been updated.
-
-- Is "postmap -qf" still needed with regexp/pcre maps?
-
-- Update TUNING_README smtpd_client_*_limit feature list (add TLS).
-
-- Update TUNING_README file descriptor tuning.
diff --git a/postfix/auxiliary/MacOSX/Postfix.StartupItem/Postfix b/postfix/auxiliary/MacOSX/Postfix.StartupItem/Postfix
deleted file mode 100755
index 5c6511426..000000000
--- a/postfix/auxiliary/MacOSX/Postfix.StartupItem/Postfix
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-
-# Gerben Wierda, Oct 2001. Adapted from an existing example. I waive every
-# copyright on this and I also do not give any warranty.
-
-# Updated Sepember 29, 2002
-# To work properly, the POSTFIX variable needs to be set to -YES-
-# in /etc/hostconfig
-
-. /etc/rc.common
-
-if [ "${POSTFIX:=-NO-}" = "-YES-" -a "${MAILSERVER:=-NO-}" = "-YES-" ]
-then
- ConsoleMessage "Cannot run concurrent postfix and sendmail"
- sleep 2
- exit
-fi
-
-##
-# Start mail server
-##
-
-if [ "$1" == "start" ]
-then
- if [ "${POSTFIX:=-NO-}" = "-YES-" ]
- then
- ConsoleMessage "Starting Postfix mail services"
- /usr/sbin/postfix start
- fi
-elif [ "$1" == "stop" ]
-then
- ConsoleMessage "Stopping Postfix mail services"
- /usr/sbin/postfix stop
-elif [ "$1" == "restart" ]
-then
- if [ "${POSTFIX:=-NO-}" = "-YES-" ]
- then
- ConsoleMessage "Reloading Postfix configuration"
- /usr/sbin/postfix reload
- else
- ConsoleMessage "Stopping Postfix mail services"
- /usr/sbin/postfix stop
- fi
-fi
-
-
diff --git a/postfix/auxiliary/MacOSX/Postfix.StartupItem/StartupParameters.plist b/postfix/auxiliary/MacOSX/Postfix.StartupItem/StartupParameters.plist
deleted file mode 100644
index b41a9a02b..000000000
--- a/postfix/auxiliary/MacOSX/Postfix.StartupItem/StartupParameters.plist
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- Description = "Postfix mail server";
- Provides = ("SMTP");
- Requires = ("Resolver");
- Uses = ("Network Time", "NFS");
- Preference = "None";
- Messages =
- {
- start = "Starting Postfix";
- stop = "Stopping Postfix";
- restart = "Reloading Postfix Configuration";
- };
-}
diff --git a/postfix/auxiliary/MacOSX/README-INSTALL.OSX b/postfix/auxiliary/MacOSX/README-INSTALL.OSX
deleted file mode 100644
index aa8db9e5a..000000000
--- a/postfix/auxiliary/MacOSX/README-INSTALL.OSX
+++ /dev/null
@@ -1,74 +0,0 @@
-# Adapted from an existing example by Gerben Wierda, Oct 2001. I waive every
-# copyright on this and I also do not give any warranty.
-
-Let's start with the important warning:
-
-DO NOT USE THE MULTIPLE USERS APPLICATION TO CREATE THE POSTFIX USER!
-
-NOTE: Mac OS X as of version 10.3 comes with Postfix as the standard mailer
-and it is supported in Server Admin on Mac OS X 10.3 Server . The instructions
-below therefore only apply for Mac OS X 10.2.8.
-
-NOTE: As of 29 September 2002, these instructions and the scripts have changed
-to make the solution more robust for Apple updates.
-
-Run the commands below in the order that they are presented
-
-A. INSTALLING POSTFIX for the first time and selecting it as the active
- Mail Transfer Agent (MTA):
-
- # All these commands are written to be run from this directory.
-
- # This repairs the previous Oct 2001 setup if any
- sudo ./repair-oldsetup
-
- # Prepare for reactivating sendmail
- sudo ./backup-sendmail-binaries
-
- # this creates the necessary users & groups for proper operation
- # of postfix:
- sudo ./niscript
-
- # Install postfix:
- # When the script asks you for setgid (the default will be no) tell it
- # maildrop
- (cd ../..; sudo make install)
-
- # Prepare for reactivating postfix
- sudo ./backup-postfix-binaries
-
- # edit /etc/postfix/main.cf to suit your requirements
- ### add your own commands here ###
-
- # Activate postfix startup at boot time. Deactivates sendmail.
- sudo ./activate-postfix
-
- # Test. Read INSTALL for a series of suggested tests.
-
-B. DEACTIVATING POSTFIX
-
- # Deactivate postfix startup at boot time
- sudo ./deactivate-postfix
-
-C. RESTORING Sendmail as the MTA when Postfix is the active MTA
-
- # This repairs the previous Oct 2001 setup if any
- sudo ./repair-oldsetup
-
- # Deactivate postfix startup at boot time
- sudo ./deactivate-postfix
-
- sudo ./activate-sendmail
-
- # Restart your computer
-
-D. RESTORING postfix as the MTA when Sendmail is the active MTA
-
- # NOTE: The first time you activate postfix you have to follow
- # the steps of A.
-
- # This repairs the previous Oct 2001 setup if any
- sudo ./repair-oldsetup
-
- sudo ./activate-postfix
-
diff --git a/postfix/auxiliary/MacOSX/activate-postfix b/postfix/auxiliary/MacOSX/activate-postfix
deleted file mode 100755
index 9d7779e8d..000000000
--- a/postfix/auxiliary/MacOSX/activate-postfix
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-
-# Written by Gerben Wierda, Oct 2001. I waive every copyright on this and
-# I also do not give any warranty.
-
-. ./defines
-
-# Activate binaries
-if [ ! -e ${POSTFIXBACKUPDIR}/sendmail ]
-then
- echo "Something is wrong: there is no existing postfix binary backup"
- exit 1;
-else
- echo "Restoring postfix versions of sendmail programs from backup..."
- (cd ${POSTFIXBACKUPDIR}; tar cf - sendmail) | (cd /usr/sbin; tar xf -)
- (cd ${POSTFIXBACKUPDIR}; tar cf - newaliases) | (cd /usr/bin; tar xf -)
- (cd ${POSTFIXBACKUPDIR}; tar cf - mailq) | (cd /usr/bin; tar xf -)
-fi
-
-if [ -e "${PSI}" ]
-then
- echo "Postfix StartupItem already exists."
-else
- if [ -e "${PSIDISABLED}" ]
- then
- echo "Reinstating disabled Postfix StartupItem..."
- mv "${PSIDISABLED}" "${PSI}"
- else
- echo "Installing new default Postfix StartupItem..."
- cp -R Postfix.StartupItem "${PSI}"
- fi
-fi
-
-# De-activate sendmail in /etc/hostconfig
-/usr/bin/perl -pi -e 's/MAILSERVER=-YES-/MAILSERVER=-NO-/g' /etc/hostconfig
-# Activate postfix in /etc/hostconfig
-if /usr/bin/grep '^POSTFIX=-NO-' /etc/hostconfig >/dev/null 2>&1; then
- /usr/bin/perl -pi -e 's/POSTFIX=-NO-/POSTFIX=-YES-/g' /etc/hostconfig
-else
- echo "POSTFIX=-YES-" >>/etc/hostconfig
-fi
-
-/usr/sbin/postfix start
diff --git a/postfix/auxiliary/MacOSX/activate-sendmail b/postfix/auxiliary/MacOSX/activate-sendmail
deleted file mode 100755
index 72adf94fc..000000000
--- a/postfix/auxiliary/MacOSX/activate-sendmail
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# Written by Gerben Wierda, Oct 2001. I waive every copyright on this and
-# I also do not give any warranty.
-
-. ./defines
-
-. ./deactivate-postfix
-
-# Activate binaries
-if [ ! -e ${SENDMAILBACKUPDIR}/sendmail ]
-then
- echo "Something is wrong: there is no existing sendmail binary backup"
- exit 1;
-else
- echo "Restoring sendmail versions of sendmail programs from backup..."
- (cd ${SENDMAILBACKUPDIR}; tar cf - sendmail) | (cd /usr/sbin; tar xf -)
- (cd ${SENDMAILBACKUPDIR}; tar cf - newaliases) | (cd /usr/bin; tar xf -)
- (cd ${SENDMAILBACKUPDIR}; tar cf - mailq) | (cd /usr/bin; tar xf -)
-fi
-
-# Activate sendmail in /etc/hostconfig
-/usr/bin/perl -pi -e 's/MAILSERVER=-NO-/MAILSERVER=-YES-/g' /etc/hostconfig
-
diff --git a/postfix/auxiliary/MacOSX/backup-postfix-binaries b/postfix/auxiliary/MacOSX/backup-postfix-binaries
deleted file mode 100755
index 37c2b74c2..000000000
--- a/postfix/auxiliary/MacOSX/backup-postfix-binaries
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh
-
-# Written by Gerben Wierda, Oct 2001. I waive every copyright on this and
-# I also do not give any warranty.
-
-# We use tar, as we do not know beforehand if we are dealing with real
-# files or symbolic links. Since we use tar, we cannot change filenames
-# we need to create a directory to hold our backup binaries.
-
-. ./defines
-
-if [ ! -d ${POSTFIXBACKUPDIR} ]
-then
- mkdir -p ${POSTFIXBACKUPDIR}
-fi
-
-(cd /usr/sbin; tar cf - sendmail) | (cd ${POSTFIXBACKUPDIR}; tar xf -)
-(cd /usr/bin; tar cf - newaliases) | (cd ${POSTFIXBACKUPDIR}; tar xf -)
-(cd /usr/bin; tar cf - mailq) | (cd ${POSTFIXBACKUPDIR}; tar xf -)
-
diff --git a/postfix/auxiliary/MacOSX/backup-sendmail-binaries b/postfix/auxiliary/MacOSX/backup-sendmail-binaries
deleted file mode 100755
index ae624f8a2..000000000
--- a/postfix/auxiliary/MacOSX/backup-sendmail-binaries
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh
-
-# Written by Gerben Wierda, Oct 2001. I waive every copyright on this and
-# I also do not give any warranty.
-
-# We use tar, as we do not know beforehand if we are dealing with real
-# files or symbolic links. Since we use tar, we cannot change filenames
-# we need to create a directory to hold our backup binaries.
-
-. ./defines
-
-if [ ! -d ${SENDMAILBACKUPDIR} ]
-then
- mkdir -p ${SENDMAILBACKUPDIR}
-fi
-
-(cd /usr/sbin; tar cf - sendmail) | (cd ${SENDMAILBACKUPDIR}; tar xf -)
-(cd /usr/bin; tar cf - newaliases) | (cd ${SENDMAILBACKUPDIR}; tar xf -)
-(cd /usr/bin; tar cf - mailq) | (cd ${SENDMAILBACKUPDIR}; tar xf -)
-
diff --git a/postfix/auxiliary/MacOSX/deactivate-postfix b/postfix/auxiliary/MacOSX/deactivate-postfix
deleted file mode 100755
index 8b398b176..000000000
--- a/postfix/auxiliary/MacOSX/deactivate-postfix
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-# Written by Gerben Wierda, Sep 2002. I waive every copyright on this and
-# I also do not give any warranty.
-
-. ./defines
-
-if [ -e "${PSI}" ]
-then
- mv "${PSI}" "${PSIDISABLED}"
-fi
-
-# De-activate postfix in /etc/hostconfig
-/usr/bin/perl -pi -e 's/POSTFIX=-YES-/POSTFIX=-NO-/g' /etc/hostconfig
-
-/usr/sbin/postfix stop >/dev/null 2>&1
diff --git a/postfix/auxiliary/MacOSX/defines b/postfix/auxiliary/MacOSX/defines
deleted file mode 100644
index 298a547e5..000000000
--- a/postfix/auxiliary/MacOSX/defines
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-# Written by Gerben Wierda, Oct 2001. I waive every copyright on this and
-# I also do not give any warranty.
-
-SIDIR="/Library/StartupItems"
-
-PSI="${SIDIR}/Postfix"
-PSIDISABLED="${PSI}.disabled"
-
-POSTFIXBACKUPDIR=/usr/sbin/.postfixbackup
-SENDMAILBACKUPDIR=/usr/sbin/.sendmailbackup
diff --git a/postfix/auxiliary/MacOSX/niscript b/postfix/auxiliary/MacOSX/niscript
deleted file mode 100755
index 8031e380e..000000000
--- a/postfix/auxiliary/MacOSX/niscript
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/perl
-
-# niscript.pl by Gerben Wierda
-
-# This little script is an adaptation of the original niscript sh script by
-# Joe Block
-# instead of using fixed uid/gid and thus not robust if you run it on a
-# system where groups and/or users have been added, this script checks
-# if the users/groups are there and if not creates them with free id's.
-
-# 17 Jul 2002 GW: Fixed two bugs
-# 1. Typo in createuser would always have uid 88 for postfix
-# 2. Add to netinfo domain . instead of / so that it also works on systems
-# where the / domain is actually network-wide (not very useful to add
-# a postfix user to all systems in that netinfo domain...)
-
-print <<_WARNING
-
-This script massages your netinfo database. This can severely break
-your system. If your netinfo database breaks, you get to keep the parts.
-
-No Warranty. Really.
-
-This script tries to create two groups (if they do not already exist):
-- postfix
-- maildrop
-and tries to create a user (if it does not already exist)
-- postfix
-which is member of group postfix.
-
-_WARNING
-;
-
-# The script starts to look at id 88 (both for user and group) and up to 65535
-# It dies if no free id is found.
-
-my $postfixgid = undef;
-my $maildropgid = undef;
-my $postfixuid = undef;
-
-# First create
-
-my @groups = readgroups();
-foreach $group (@groups) {
- (my $groupname, undef, my $gid, undef) = split( ':', $group);
- if ($groupname eq 'postfix') {
- warn "You already have a postfix group (with gid $gid)\n";
- $postfixgid = $gid;
- }
- if ($groupname eq 'maildrop') {
- warn "You already have a maildrop group (with gid $gid)\n";
- $maildropgid = $gid;
- }
-}
-
-if (not defined $postfixgid) {
- $postfixgid = creategroup( 'postfix');
-}
-
-if (not defined $maildropgid) {
- $maildropgid = creategroup( 'maildrop');
-}
-
-my @users = readusers();
-foreach $user (@users) {
- (my $username, undef, my $uid, undef) = split( ':', $user);
- if ($username eq 'postfix') {
- warn "You already have a postfix user (with uid $uid)\n";
- $postfixuid = $uid;
- }
-}
-
-if (not defined $postfixuid) {
- $postfixuid = createuser( 'postfix', '"Postfix User"',
- '/usr/bin/false', '/etc/postfix',
- $postfixgid);
- addusertogroup( 'postfix', 'postfix');
-}
-
-warn "\n";
-
-sub creategroup
-{
- my $name = shift;
- open( NIDUMP, "nidump group .|") or die "Cannot run nidump\n";
- my @groups=;
- close( NIDUMP);
-
- my $tryno;
- NEXTNO: for ($tryno = 88; $tryno <= 65535; $tryno++) {
- foreach my $group (@groups) {
- (my $groupname, undef, my $gid, undef) =
- split( ':', $group);
- next NEXTNO if $gid == $tryno;
- }
- last NEXTNO;
- }
- die "Cannot find free gid\n" if $tryno == 65536;
- warn "Will create $name as gid $tryno\n";
- system "niutil -create . /groups/$name";
- system "niutil -createprop . /groups/$name name $name";
- system "niutil -createprop . /groups/$name gid $tryno";
- system "niutil -createprop . /groups/$name passwd '*'";
- return $tryno;
-}
-
-sub addusertogroup
-{
- my $user = shift;
- my $group = shift;
- system "niutil -appendprop . /groups/$group users $user";
-}
-
-sub readgroups
-{
- open( NIDUMP, "nidump group .|") or die "Cannot run nidump\n";
- my @groups=;
- close( NIDUMP);
- return @groups;
-}
-
-sub readusers
-{
- my @passwd;
- open( NIDUMP, "nidump passwd .|") or die "Cannot run nidump\n";
- @passwd=;
- close( NIDUMP);
- return @passwd;
-}
-
-sub createuser
-{
- my $name = shift;
- my $realname = shift;
- my $shell = shift;
- my $home = shift;
- my $gid = shift;
-
- open( NIDUMP, "nidump passwd .|") or die "Cannot run nidump\n";
- my @passwds=;
- close( NIDUMP);
-
- my $tryno;
- NEXTNO: for ($tryno = 88; $tryno <= 65535; $tryno++) {
- foreach my $passwd (@passwds) {
- (my $passwdname, undef, my $uid, undef) =
- split( ':', $passwd);
- next NEXTNO if $uid == $tryno;
- }
- last NEXTNO;
- }
- die "Cannot find free uid\n" if $tryno == 65536;
- warn "Will create $name as uid $tryno\n";
- system "niutil -create . /users/$name";
- system "niutil -createprop . /users/$name realname $realname";
- system "niutil -createprop . /users/$name shell $shell";
- system "niutil -createprop . /users/$name uid $tryno";
- system "niutil -createprop . /users/$name gid $gid";
- system "niutil -createprop . /users/$name home $home";
- system "niutil -createprop . /users/$name _shadow_passwd";
- system "niutil -createprop . /users/$name passwd '*'";
- return $tryno;
-}
-
diff --git a/postfix/auxiliary/MacOSX/repair-oldsetup b/postfix/auxiliary/MacOSX/repair-oldsetup
deleted file mode 100755
index a8e1840c8..000000000
--- a/postfix/auxiliary/MacOSX/repair-oldsetup
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ -d /System/Library/DisabledStartupItems/Sendmail ]
-then
- mv /System/Library/DisabledStartupItems/Sendmail /System/Library/StartupItems
- rmdir /System/Library/DisabledStartupItems/Sendmail
- rm -rf /System/Library/StartupItems/Postfix
-fi
diff --git a/postfix/conf/access b/postfix/conf/access
index ad5c548c4..9d0121bff 100644
--- a/postfix/conf/access
+++ b/postfix/conf/access
@@ -11,34 +11,35 @@
# postmap -q - /etc/postfix/access as the lookup key for such addresses. The value is
-# specified with the smtpd_null_access_lookup_key parameter
+# Note: lookup of the null sender address is not possible
+# with some types of lookup table. By default, Postfix uses
+# <> as the lookup key for such addresses. The value is
+# specified with the smtpd_null_access_lookup_key parameter
# in the Postfix main.cf file.
#
# EMAIL ADDRESS EXTENSION
# When a mail address localpart contains the optional recip-
-# ient delimiter (e.g., user+foo@domain), the lookup order
-# becomes: user+foo@domain, user@domain, domain, user+foo@,
+# ient delimiter (e.g., user+foo@domain), the lookup order
+# becomes: user+foo@domain, user@domain, domain, user+foo@,
# and user@.
#
# HOST NAME/ADDRESS PATTERNS
# With lookups from indexed files such as DB or DBM, or from
-# networked tables such as NIS, LDAP or SQL, the following
+# networked tables such as NIS, LDAP or SQL, the following
# lookup patterns are examined in the order as listed:
#
# domain.tld
@@ -103,9 +104,9 @@
#
# 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-
+# the Postfix parent_domain_matches_subdomains con-
# figuration setting. Otherwise, specify .domain.tld
-# (note the initial dot) in order to match subdo-
+# (note the initial dot) in order to match subdo-
# mains.
#
# net.work.addr.ess
@@ -114,21 +115,21 @@
#
# net.work
#
-# net Matches the specified IPv4 host address or subnet-
-# work. An IPv4 host address is a sequence of four
+# net Matches the specified IPv4 host address or subnet-
+# work. An IPv4 host address is a sequence of four
# decimal octets separated by ".".
#
-# Subnetworks are matched by repeatedly truncating
+# Subnetworks are matched by repeatedly truncating
# the last ".octet" from the remote IPv4 host address
-# string until a match is found in the access table,
+# string until a match is found in the access table,
# or until further truncation is not possible.
#
# NOTE 1: The information in the access map should be
# in canonical form, with unnecessary null characters
-# eliminated. Address information must not be
+# eliminated. Address information must not be
# enclosed with "[]" characters.
#
-# NOTE 2: use the cidr lookup table type to specify
+# NOTE 2: use the cidr lookup table type to specify
# network/netmask patterns. See cidr_table(5) for
# details.
#
@@ -138,12 +139,12 @@
#
# net:work
#
-# net Matches the specified IPv6 host address or subnet-
-# work. An IPv6 host address is a sequence of three
-# to eight hexadecimal octet pairs separated by ":".
+# net Matches the specified IPv6 host address or subnet-
+# work. An IPv6 host address is a sequence of three
+# to eight hexadecimal octet pairs separated by ":".
#
-# Subnetworks are matched by repeatedly truncating
-# the last ":octetpair" from the remote IPv6 host
+# Subnetworks are matched by repeatedly truncating
+# the last ":octetpair" from the remote IPv6 host
# address string until a match is found in the access
# table, or until further truncation is not possible.
#
@@ -153,10 +154,10 @@
#
# NOTE 2: The information in the access map should be
# in canonical form, with unnecessary null characters
-# eliminated. Address information must not be
+# eliminated. Address information must not be
# enclosed with "[]" characters.
#
-# NOTE 3: use the cidr lookup table type to specify
+# NOTE 3: use the cidr lookup table type to specify
# network/netmask patterns. See cidr_table(5) for
# details.
#
@@ -167,48 +168,48 @@
#
# all-numerical
# An all-numerical result is treated as OK. This for-
-# mat is generated by address-based relay authoriza-
+# mat is generated by address-based relay authoriza-
# tion schemes such as pop-before-smtp.
#
# REJECT ACTIONS
-# Postfix version 2.3 and later support enhanced status
-# codes as defined in RFC 3463. When no code is specified
-# at the beginning of the text below, Postfix inserts a
-# default enhanced status code of "5.7.1" in the case of
-# reject actions, and "4.7.1" in the case of defer actions.
+# Postfix version 2.3 and later support enhanced status
+# codes as defined in RFC 3463. When no code is specified
+# at the beginning of the text below, Postfix inserts a
+# default enhanced status code of "5.7.1" in the case of
+# reject actions, and "4.7.1" in the case of defer actions.
# See "ENHANCED STATUS CODES" below.
#
# 4NN text
#
# 5NN text
-# Reject the address etc. that matches the pattern,
+# Reject the address etc. that matches the pattern,
# and respond with the numerical three-digit code and
-# text. 4NN means "try again later", while 5NN means
+# text. 4NN means "try again later", while 5NN means
# "do not try again".
#
-# The reply code "421" causes Postfix to disconnect
+# The reply code "421" causes Postfix to disconnect
# immediately (Postfix version 2.3 and later).
#
# REJECT optional text...
-# Reject the address etc. that matches the pattern.
-# Reply with $reject_code optional text... when the
-# optional text is specified, otherwise reply with a
+# Reject the address etc. that matches the pattern.
+# Reply with $reject_code optional text... when the
+# optional text is specified, otherwise reply with a
# generic error response message.
#
# DEFER_IF_REJECT optional text...
-# Defer the request if some later restriction would
-# result in a REJECT action. Reply with "450 4.7.1
-# optional text... when the optional text is speci-
+# Defer the request if some later restriction would
+# result in a REJECT action. Reply with "450 4.7.1
+# optional text... when the optional text is speci-
# fied, otherwise reply with a generic error response
# message.
#
# This feature is available in Postfix 2.1 and later.
#
# DEFER_IF_PERMIT optional text...
-# Defer the request if some later restriction would
-# result in a an explicit or implicit PERMIT action.
-# Reply with "450 4.7.1 optional text... when the
-# optional text is specified, otherwise reply with a
+# Defer the request if some later restriction would
+# result in a an explicit or implicit PERMIT action.
+# Reply with "450 4.7.1 optional text... when the
+# optional text is specified, otherwise reply with a
# generic error response message.
#
# This feature is available in Postfix 2.1 and later.
@@ -219,158 +220,158 @@
# reject_unauth_destination, and so on).
#
# DISCARD optional text...
-# Claim successful delivery and silently discard the
-# message. Log the optional text if specified, oth-
+# Claim successful delivery and silently discard the
+# message. Log the optional text if specified, oth-
# erwise log a generic message.
#
-# Note: this action currently affects all recipients
-# of the message. To discard only one recipient
-# without discarding the entire message, use the
+# Note: this action currently affects all recipients
+# of the message. To discard only one recipient
+# without discarding the entire message, use the
# transport(5) table to direct mail to the discard(8)
# service.
#
# This feature is available in Postfix 2.0 and later.
#
-# DUNNO Pretend that the lookup key was not found. This
-# prevents Postfix from trying substrings of the
-# lookup key (such as a subdomain name, or a network
+# DUNNO Pretend that the lookup key was not found. This
+# prevents Postfix from trying substrings of the
+# lookup key (such as a subdomain name, or a network
# address subnetwork).
#
# This feature is available in Postfix 2.0 and later.
#
# FILTER transport:destination
-# After the message is queued, send the entire mes-
+# After the message is queued, send the entire mes-
# sage through the specified external content filter.
-# The transport:destination syntax is described in
-# the transport(5) manual page. More information
-# about external content filters is in the Postfix
+# The transport:destination syntax is described in
+# the transport(5) manual page. More information
+# about external content filters is in the Postfix
# FILTER_README file.
#
-# Note: this action overrides the main.cf con-
-# tent_filter setting, and currently affects all
-# recipients of the message.
+# Note: this action overrides the content_filter set-
+# ting, and currently affects all recipients of the
+# message.
#
# This feature is available in Postfix 2.0 and later.
#
# HOLD optional text...
-# Place the message on the hold queue, where it will
-# sit until someone either deletes it or releases it
-# for delivery. Log the optional text if specified,
+# Place the message on the hold queue, where it will
+# sit until someone either deletes it or releases it
+# for delivery. Log the optional text if specified,
# otherwise log a generic message.
#
-# Mail that is placed on hold can be examined with
-# the postcat(1) command, and can be destroyed or
+# Mail that is placed on hold can be examined with
+# the postcat(1) command, and can be destroyed or
# released with the postsuper(1) command.
#
-# Note: use "postsuper -r" to release mail that was
-# kept on hold for a significant fraction of $maxi-
+# 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. Use "postsuper -H" only for mail that will
+# longer. Use "postsuper -H" only for mail that will
# not expire within a few delivery attempts.
#
-# Note: this action currently affects all recipients
+# 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-
-# sage. When more than one PREPEND action executes,
-# the first prepended header appears before the sec-
+# Prepend the specified message header to the mes-
+# sage. When more than one PREPEND action executes,
+# the first prepended header appears before the sec-
# ond etc. prepended header.
#
-# Note: this action must execute before the message
-# content is received; it cannot execute in the con-
+# Note: this action must execute before the message
+# content is received; it cannot execute in the con-
# text of smtpd_end_of_data_restrictions.
#
# 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.
#
# ENHANCED STATUS CODES
-# Postfix version 2.3 and later support enhanced status
-# codes as defined in RFC 3463. When an enhanced status
-# code is specified in an access table, it is subject to
-# modification. The following transformations are needed
-# when the same access table is used for client, helo,
-# sender, or recipient access restrictions; they happen
+# Postfix version 2.3 and later support enhanced status
+# codes as defined in RFC 3463. When an enhanced status
+# code is specified in an access table, it is subject to
+# modification. The following transformations are needed
+# when the same access table is used for client, helo,
+# sender, or recipient access restrictions; they happen
# regardless of whether Postfix replies to a MAIL FROM, RCPT
# TO or other SMTP command.
#
-# o When a sender address matches a REJECT action, the
-# Postfix SMTP server will transform a recipient DSN
-# status (e.g., 4.1.1-4.1.6) into the corresponding
+# o When a sender address matches a REJECT action, the
+# Postfix SMTP server will transform a recipient DSN
+# status (e.g., 4.1.1-4.1.6) into the corresponding
# sender DSN status, and vice versa.
#
-# o When non-address information matches a REJECT
-# action (such as the HELO command argument or the
-# client hostname/address), the Postfix SMTP server
-# will transform a sender or recipient DSN status
-# into a generic non-address DSN status (e.g.,
+# o When non-address information matches a REJECT
+# action (such as the HELO command argument or the
+# client hostname/address), the Postfix SMTP server
+# will transform a sender or recipient DSN status
+# into a generic non-address DSN status (e.g.,
# 4.0.0).
#
# 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 ta-
-# ble, until a pattern is found that matches the search
+# Patterns are applied in the order as specified in the ta-
+# ble, 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_ta-
# ble(5). This feature is not available up to and including
# Postfix version 2.4.
#
-# 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
-# tables, some systems use dbm. Use the command "postconf
-# -m" to find out what lookup tables Postfix supports on
+# 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
# your system.
#
# /etc/postfix/main.cf:
@@ -385,7 +386,7 @@
# 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
@@ -394,13 +395,13 @@
# transport(5), transport:nexthop syntax
#
# README FILES
-# Use "postconf readme_directory" or "postconf html_direc-
+# Use "postconf readme_directory" or "postconf html_direc-
# tory" to locate this information.
# SMTPD_ACCESS_README, built-in SMTP server access control
# 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/conf/header_checks b/postfix/conf/header_checks
index 65469c57a..b9bff2892 100644
--- a/postfix/conf/header_checks
+++ b/postfix/conf/header_checks
@@ -1,7 +1,7 @@
# HEADER_CHECKS(5) HEADER_CHECKS(5)
#
# NAME
-# header_checks - Postfix built-in header/body inspection
+# header_checks - Postfix built-in content inspection
#
# SYNOPSIS
# header_checks = pcre:/etc/postfix/header_checks
@@ -13,48 +13,49 @@
# postmap -fq - pcre:/etc/postfix/filename "fatal_exit: @_");
- syslog(warning => "fatal_exit: @_");
- syslog(info => "fatal_exit: @_");
- die "fatal: @_";
-}
-
-#
-# Unbuffer standard output.
-#
-select((select(STDOUT), $| = 1)[0]);
-
-#
-# This process runs as a daemon, so it can't log to a terminal. Use
-# syslog so that people can actually see our messages.
-#
-setlogsock $syslog_socktype;
-openlog $syslog_ident, $syslog_options, $syslog_facility;
-
-# ----------------------------------------------------------
-# main
-# ----------------------------------------------------------
-
-#
-# Receive a bunch of attributes, evaluate the policy, send the result.
-#
-my %attr;
-while () {
- chomp;
- if (/=/) { my ($k, $v) = split (/=/, $_, 2); $attr{$k} = $v; next }
- elsif (length) { syslog(warning => sprintf("warning: ignoring garbage: %.100s", $_)); next; }
-
- if ($VERBOSE) {
- for (sort keys %attr) {
- syslog(debug => "Attribute: %s=%s", $_, $attr{$_});
- }
- }
-
- fatal_exit ("unrecognized request type: '$attr{request}'") unless $attr{request} eq "smtpd_access_policy";
-
- my $action = $DEFAULT_RESPONSE;
- my %responses;
- foreach my $handler (@HANDLERS) {
- no strict 'refs';
- my $response = $handler->(attr=>\%attr);
- syslog(debug => "handler %s: %s", $handler, $response);
- if ($response and $response !~ /^dunno/i) {
- syslog(info => "handler %s: %s is decisive.", $handler, $response);
- $action = $response; last;
- }
- }
-
- syslog(info => "decided action=%s", $action);
-
- print STDOUT "action=$action\n\n";
- %attr = ();
-}
-
-# ----------------------------------------------------------
-# plugin: SPF
-# ----------------------------------------------------------
-sub sender_permitted_from {
- local %_ = @_;
- my %attr = %{ $_{attr} };
-
- my $query = eval { new Mail::SPF::Query (ip =>$attr{client_address},
- sender=>$attr{sender},
- helo =>$attr{helo_name}) };
- if ($@) {
- syslog(info => "%s: Mail::SPF::Query->new(%s, %s, %s) failed: %s",
- $attr{queue_id}, $attr{client_address}, $attr{sender}, $attr{helo_name}, $@);
- return "DUNNO";
- }
- my ($result, $smtp_comment, $header_comment) = $query->result();
-
- syslog(info => "%s: SPF %s: smtp_comment=%s, header_comment=%s",
- $attr{queue_id}, $result, $smtp_comment, $header_comment);
-
- if ($result eq "fail") { return "REJECT $smtp_comment"; }
- elsif ($result eq "error") { return "DEFER_IF_PERMIT $smtp_comment"; }
- else { return "PREPEND Received-SPF: $result ($header_comment)"; }
-}
-
-# ----------------------------------------------------------
-# plugin: testing
-# ----------------------------------------------------------
-sub testing {
- local %_ = @_;
- my %attr = %{ $_{attr} };
-
- if (lc address_stripped($attr{sender}) eq
- lc address_stripped($attr{recipient})
- and
- $attr{recipient} =~ /policyblock/) {
-
- syslog(info => "%s: testing: will block as requested", $attr{queue_id});
- return "REJECT smtpd-policy blocking $attr{recipient}";
- }
- else {
- syslog(info => "%s: testing: stripped sender=%s, stripped rcpt=%s",
- $attr{queue_id},
- address_stripped($attr{sender}),
- address_stripped($attr{recipient}),
- );
-
- }
- return "DUNNO";
-}
-
-sub address_stripped {
- # my $foo = localpart_lhs('foo+bar@baz.com'); # returns 'foo@baz.com'
- my $string = shift;
- for ($string) {
- s/[+-].*\@/\@/;
- }
- return $string;
-}
diff --git a/postfix/html/ADDRESS_CLASS_README.html b/postfix/html/ADDRESS_CLASS_README.html
index 4c5b9973d..6c1afe66f 100644
--- a/postfix/html/ADDRESS_CLASS_README.html
+++ b/postfix/html/ADDRESS_CLASS_README.html
@@ -53,8 +53,9 @@ address classes are very important for the operation of Postfix.
The list of domains that are a member of the class: for
example, all local domains, or all relay domains.
- The default delivery method. For example, the local or
-smtp delivery agent. This helps to keep Postfix configurations
+
The default delivery transport. For example, the local or
+relay delivery transport (delivery transports are defined in
+master.cf). This helps to keep Postfix configurations
simple.
The list of valid recipient addresses for that address
@@ -95,7 +96,7 @@ empty, then the Postfix SMTP server accepts any address in the
local domain class.
The mail delivery transport is specified with the
-local_transport parameter. The default value is local:$myhostname
+local_transport parameter. The default value is local:$myhostname
for delivery with the local(8) delivery agent.
@@ -265,7 +266,7 @@ default. The Postfix SMTP server uses this to reject mail for
unknown local recipients. See the LOCAL_RECIPIENT_README file hints
and tips.
- Introduction of the relay delivery transport in master.cf.
+
Introduction of the relay delivery transport in master.cf.
This helps to avoid mail delivery scheduling problems on inbound
mail relays when there is a lot of outbound mail, but may require
that you update your "defer_transports" setting.
diff --git a/postfix/html/ADDRESS_VERIFICATION_README.html b/postfix/html/ADDRESS_VERIFICATION_README.html
index 0f14fb030..ce38c1534 100644
--- a/postfix/html/ADDRESS_VERIFICATION_README.html
+++ b/postfix/html/ADDRESS_VERIFICATION_README.html
@@ -229,7 +229,10 @@ MAILER-DAEMON messages.
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.
+succeeds, then Postfix accepts mail for the recipient address.
+However, recipient address verification probes can increase the
+load on down-stream MTAs when you're being flooded by backscatter
+bounces, or when some spammer is mounting a dictionary attack.
By default, address verification results are not saved. To avoid
probing the same address repeatedly, you can store the result in a
diff --git a/postfix/html/CONNECTION_CACHE_README.html b/postfix/html/CONNECTION_CACHE_README.html
index 2c741ced4..fb7a08bc1 100644
--- a/postfix/html/CONNECTION_CACHE_README.html
+++ b/postfix/html/CONNECTION_CACHE_README.html
@@ -92,28 +92,38 @@ by the mail delivering process that creates the connection. To get
the same performance improvement as with a shared connection cache,
non-shared connections need to be kept open for a longer time.
+ The scache(8) server, introduced with Postfix version 2.2,
+maintains the shared connection cache. With Postfix version 2.2,
+only the smtp(8) client has support to access this cache.
+
- The scache(8) server, introduced with Postfix version 2.2,
-maintains the shared connection cache. With Postfix version 2.2,
-only the smtp(8) client has support to access this cache.
-
When SMTP connection caching is enabled (see next section), the
smtp(8) client does not disconnect after a mail transaction, but
gives the connection to the scache(8) server which keeps the
-connection open for a limited amount of time.
+connection open for a limited amount of time.
After handing over the open connection to the scache(8) server,
the smtp(8) client continues with some other mail delivery request.
@@ -144,7 +154,7 @@ destination has a high volume of mail in the main.cf:
smtp_connection_cache_on_demand = yes
@@ -167,7 +177,7 @@ right-hand side of an email address, without the [] around a numeric
IP address),
if mail is sent via a relay host: a relay host name (without
-the [] or non-default TCP port), as specified in main.cf or in the
+the [] or non-default TCP port), as specified in main.cf or in the
transport map,
a /file/name with domain names and/or relay host names as
@@ -184,7 +194,7 @@ lookups is ignored.
-/etc/postfix/main.cf:
+/etc/postfix/main.cf:
smtp_connection_cache_destinations = $relayhost
smtp_connection_cache_destinations = hotmail.com, ...
smtp_connection_cache_destinations = static:all (not recommended)
diff --git a/postfix/html/CYRUS_README.html b/postfix/html/CYRUS_README.html
deleted file mode 100644
index 30ad5bdca..000000000
--- a/postfix/html/CYRUS_README.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-Postfix Cyrus Howto
-
-
-
-
-
-
-
-
Postfix Cyrus Howto
-
-
-
- This document will be made available via http://www.postfix.org/.
-
-
-
-
diff --git a/postfix/html/DATABASE_README.html b/postfix/html/DATABASE_README.html
index 315fe1c20..3ab4fa44e 100644
--- a/postfix/html/DATABASE_README.html
+++ b/postfix/html/DATABASE_README.html
@@ -80,7 +80,8 @@ below.
You can use Berkeley DB files with fixed lookup strings for
simple address rewriting operations and you can use regular expression
-tables for the more complicated work.
+tables for the more complicated work. In other words, you don't
+have to put everything into the same table.
@@ -189,8 +190,9 @@ because something else happens. This is because commands such as
postmap(1) or postalias(1) overwrite existing files. If the update
fails in the middle then you have no usable database, and Postfix
will stop working. This is not an issue with the CDB database type
-available with Postfix 2.2 and later, because CDB
-database rebuilds are atomic.
+available with Postfix 2.2 and later: CDB
+creates a new file, and renames the file upon successful completion.
+
With multi-file databases such as DBM, there is no simple
solution. With Berkeley DB and other "one file" databases, it is
diff --git a/postfix/html/DB_README.html b/postfix/html/DB_README.html
index d89fd5028..421c7e7d3 100644
--- a/postfix/html/DB_README.html
+++ b/postfix/html/DB_README.html
@@ -49,15 +49,17 @@ versions.
- Many commercial UNIXes ship without Berkeley DB support. Examples
-are Solaris, HP-UX, IRIX, UNIXWARE. In order to build Postfix with
+
Some UNIXes ship without Berkeley DB support; for historical
+reasons these use DBM files instead. A problem with DBM files is
+that they can store only limited amounts of data. To build Postfix
+with
Berkeley DB support you need to download and install the source
-code from http://www.sleepycat.com/
+code from http://www.oracle.com/database/berkeley-db/.
Warning: some Linux system libraries use Berkeley DB, as do
some third-party libraries such as SASL. If you compile Postfix
with a different Berkeley DB implementation, then every Postfix
-program will dump core because either the system library, SASL
+program will dump core because either the system library, the SASL
library, or Postfix itself ends up using the wrong version.
The more recent Berkeley DB versions have a compile-time switch,
@@ -67,7 +69,7 @@ Although wasteful, this may be the only way to keep things from
falling apart.
To build Postfix after you installed the Berkeley DB from
-http://www.sleepycat.com/, use something like:
+source code, use something like:
@@ -214,7 +216,8 @@ undefined reference to `pthread_mutex_trylock'
- More information is available at http://www.sleepycat.com/.
+ More information is available at
+http://www.oracle.com/database/berkeley-db/.