]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-19991219
authorWietse Venema <wietse@porcupine.org>
Sun, 19 Dec 1999 05:00:00 +0000 (00:00 -0500)
committerWietse Venema <wietse@porcupine.org>
Thu, 17 Jan 2013 23:09:48 +0000 (18:09 -0500)
13 files changed:
postfix/HISTORY
postfix/INSTALL
postfix/INSTALL.sh
postfix/RELEASE_NOTES
postfix/conf/main.cf
postfix/conf/postfix-script-nosgid
postfix/conf/postfix-script-sgid
postfix/conf/sample-local.cf
postfix/global/mail_version.h
postfix/html/faq.html
postfix/html/uce.html
postfix/makedefs
postfix/smtpd/smtpd.c

index 1f20a16175b228ea610fb86011163a447702297b..ab839d5dc3055a0febf8aff46054f8b7ceb66cb4 100644 (file)
@@ -3298,7 +3298,7 @@ Apologies for any names omitted.
 
        Bugfix: the local delivery agent's recipient duplicate
        filter did not work when configured to use unlimited memory
-       (which is not a recommended setting). Patrik Rak @ein.cz.
+       (which is not a recommended setting). Patrik Rak @raxoft.cz.
 
 19991125
 
@@ -3322,7 +3322,7 @@ Apologies for any names omitted.
        now frees in-memory recipients as soon as a message is
        delivered to one destination, rather than waiting until
        all in-memory destinations of that message have been tried.
-       Patch by Patrik Rak @ ein.cz.  Files: qmgr/qmgr_entry.c,
+       Patch by Patrik Rak @ raxoft.cz.  Files: qmgr/qmgr_entry.c,
        qmgr/qmgr_message.c.
 
        Performance: when delivering mail to a huge list of
@@ -3346,7 +3346,7 @@ Apologies for any names omitted.
        Bugfix: the local delivery agent would deliver to the user
        instead of the .forward file when the .forward file was
        already visited via some non-recursive path. Patch by Patrik
-       Rak @ ein.cz. Files: global/been_here.c, local/dotforward.c.
+       Rak @ raxoft.cz. Files: global/been_here.c, local/dotforward.c.
 
        Robustness: attempt to deliver all addresses in the expansion
        of an alias or .forward file, even when some addresses must
@@ -3381,8 +3381,8 @@ Apologies for any names omitted.
 19991216
 
        Feature: allow an empty inet_interfaces parameter, just
-       like an empty mydestination parameter. It's needed for a
-       true null client that delivers no mail locally at all.
+       like an empty mydestination parameter. It's needed for true
+       null clients and for firewalls that deliver no local mail.
 
        Feature: "disable_vrfy_command = yes" disables some forms
        of address harvesting used by spammers.
@@ -3409,4 +3409,21 @@ Apologies for any names omitted.
        Feature: the sendmail -f option now understands '<user>'
        and even understands address forms with RFC 822-style
        comments.
-       
+
+19991217
+
+       Cleanup: no more UCE checks for VRFY commands.
+
+19991218
+
+       Cleanup: INSTALL.sh produces relative symlinks, which is
+       necessary when install_root is not /.
+
+19991219
+
+       Documentation: completely reorganized the FAQ and added
+       many new entries.
+
+       Cleanup: INSTALL.sh uses a configurable directory for
+       scratch files, so that it can install from a file system
+       that is not writable by the super-user.
index 55c951e3b1d1809f0e775a82c57916b0eeb308af..db176903ba571cec0cddcb062e20f9924efec30d 100644 (file)
@@ -76,6 +76,7 @@ If your system is supported, it is one of
     OPENSTEP 4.x
     OSF1.V3 (Digital UNIX)
     OSF1.V4 aka Digital UNIX V4
+    OSF1.V5 aka Digital UNIX V5
     OpenBSD 2.x
     Reliant UNIX 5.x
     Rhapsody 5.x
index afc31fb56347f3d2f1cd1f89ef4b9cbfb2af3d1c..481f7957ced37e43d152509922c5ea9ea9492bf7 100644 (file)
@@ -20,6 +20,8 @@ Before installing files, this script prompts you for some definitions.
 Most definitions will be remembered, so you have to specify them
 only once. All definitions have a reasonable default value.
 
+    tempdir - where to write scratch files
+
     install_root - prefix for installed file names (for package building)
 
     config_directory - directory with Postfix configuration files.
@@ -39,24 +41,40 @@ only once. All definitions have a reasonable default value.
 EOF
 
 # By now, shells must have functions. Ultrix users must use sh5 or lose.
-
-# Apparently, some broken LINUX file utilities won't move symlinks across
-# file systems. Upgrade to a better system. Don't waste my time.
+# The following shell functions replace files/symlinks while minimizing
+# the time that a file does not exist, and avoid copying over programs
+# in order to not disturb running programs.
 
 compare_or_replace() {
     cmp $2 $3 >/dev/null 2>&1 || {
-       rm -f junk || exit 1
-       cp $2 junk || exit 1
-       mv -f junk $3 || exit 1
+       rm -f $tempdir/junk || exit 1
+       cp $2 $tempdir/junk || exit 1
+       chmod $1 $tempdir/junk || exit 1
+       mv -f $tempdir/junk $3 || exit 1
        chmod $1 $3 || exit 1
     }
 }
 
 compare_or_symlink() {
     cmp $1 $2 >/dev/null 2>&1 || {
-       rm -f junk || exit 1
-       ln -s $1 junk || exit 1
-       mv -f junk $2 || exit 1
+       rm -f $tempdir/junk || exit 1
+       target=`echo $1 | sed '
+           s;^'$install_root';;
+           s;//;/;g
+           s;/\./;/;g
+           s;^/*;;
+           H
+           s;/[^/]*$;/;
+           s;[^/]*/;../;g
+           G
+           s/\n//
+       '`
+       ln -s $target $tempdir/junk || exit 1
+       mv -f $tempdir/junk $2 || { 
+           echo Error: your mv command is unable to rename symlinks. 1>&2
+           echo If you run Linux, upgrade to GNU fileutils-4.0 or better. 1>&2
+           exit 1
+       }
     }
 }
 
@@ -74,8 +92,9 @@ case `echo -n` in
  *) n=; c='\c';;
 esac
 
-# Default settings. These are clobbered by remembered settings.
+# Default settings. Most are clobbered by remembered settings.
 
+tempdir=`pwd`
 install_root=/
 config_directory=/etc/postfix
 daemon_directory=/usr/libexec/postfix
@@ -90,7 +109,7 @@ manpages=/usr/local/man
 
 # Find out the location of configuration files.
 
-for name in install_root config_directory
+for name in tempdir install_root config_directory
 do
     while :
     do
@@ -105,11 +124,11 @@ done
 
 # Sanity checks
 
-for path in $install_root $config_directory
+for path in $tempdir $install_root $config_directory
 do
    case $path in
    /*) ;;
-    *) echo "$path should be an absolute path name" 1>&2; exit 1;;
+    *) echo Error: $path should be an absolute path name. 1>&2; exit 1;;
    esac
 done
 
@@ -157,29 +176,39 @@ do
    case $path in
    /*) ;;
    no) ;;
-    *) echo "$path should be an absolute path name" 1>&2; exit 1;;
+    *) echo Error: $path should be an absolute path name. 1>&2; exit 1;;
    esac
 done
 
-rm -f junk || exit 1
-touch junk
+test -d $tempdir || mkdir -p $tempdir || exit 1
+
+( rm -f $tempdir/junk && touch $tempdir/junk ) || {
+    echo Error: you have no write permission to $tempdir. 1>&2
+    echo Specify an alternative directory for scratch files. 1>&2
+    exit 1
+}
+
+chown root $tempdir/junk >/dev/null 2>&1 || {
+    echo Error: you have no permission to change file ownership. 1>&2
+    exit 1
+}
 
-chown "$mail_owner" junk >/dev/null 2>&1 || {
-    echo "Error: $mail_owner needs an entry in the passwd file" 1>&2
-    echo "Remember, $mail_owner must have a dedicated user id and group id." 1>&2
+chown "$mail_owner" $tempdir/junk >/dev/null 2>&1 || {
+    echo Error: $mail_owner needs an entry in the passwd file. 1>&2
+    echo Remember, $mail_owner must have a dedicated user id and group id. 1>&2
     exit 1
 }
 
 case $setgid in
 no) ;;
- *) chgrp "$setgid" junk >/dev/null 2>&1 || {
-        echo "Error: $setgid needs an entry in the group file" 1>&2
-        echo "Remember, $setgid must have a dedicated group id." 1>&2
+ *) chgrp "$setgid" $tempdir/junk >/dev/null 2>&1 || {
+        echo Error: $setgid needs an entry in the group file. 1>&2
+        echo Remember, $setgid must have a dedicated group id. 1>&2
         exit 1
     }
 esac
 
-rm -f junk
+rm -f $tempdir/junk
 
 # Avoid clumsiness.
 
@@ -217,8 +246,8 @@ done
 
 test -f bin/sendmail && {
     compare_or_replace a+x,go-w bin/sendmail $SENDMAIL_PATH || exit 1
-    compare_or_symlink $sendmail_path $NEWALIASES_PATH
-    compare_or_symlink $sendmail_path $MAILQ_PATH
+    compare_or_symlink $SENDMAIL_PATH $NEWALIASES_PATH
+    compare_or_symlink $SENDMAIL_PATH $MAILQ_PATH
 }
 
 compare_or_replace a+r,go-w conf/LICENSE $CONFIG_DIRECTORY/LICENSE || exit 1
@@ -250,9 +279,9 @@ bin/postconf -c $CONFIG_DIRECTORY -e \
 for name in sendmail_path newaliases_path mailq_path setgid manpages
 do
     eval echo $name=\$$name
-done) >junk || exit 1
-compare_or_move a+x,go-w junk $CONFIG_DIRECTORY/install.cf || exit 1
-rm -f junk
+done) >$tempdir/junk || exit 1
+compare_or_move a+x,go-w $tempdir/junk $CONFIG_DIRECTORY/install.cf || exit 1
+rm -f $tempdir/junk
 
 # Use set-gid privileges instead of writable maildrop (optional).
 
index 8efe894a3a95a663108e7a01ad71297e51a0c191..49d31bf8a66769c2844c68ec86c1102bc13573f5 100644 (file)
@@ -1,4 +1,4 @@
-Incompatible changes with snapshot 19991216
+Incompatible changes with snapshot 19991219
 ===========================================
 
 - The experimental permit_recipient_map feature is gone. It was
@@ -27,9 +27,14 @@ parent domain of a transport map entry, you must now add a
 corresponding "domain.name local:" entry in your transport_maps.
 See the html/faq.html sections for firewalls and intranets.
 
-Major changes with snapshot 19991216
+Major changes with snapshot 19991219
 ====================================
 
+- Overhauled FAQ (html/faq.html) with many more examples.
+
+- Several little improvements to the installation procedure:
+relative symlinks, configurable directory for scratch files.
+
 - Updated LDAP client code (John Hensley).
 
 - Updated mysql client code (Scott Cotton).
index a8e2ef9650fa7bc3c701592e3e5880646af2f0f5..915380aa6439a5f97fd6b1f5b33be6ef8d80000b 100644 (file)
@@ -256,6 +256,10 @@ mail_owner = postfix
 # the recipient with proper HOME, SHELL and LOGNAME environment settings.
 # Exception:  delivery for root is done as $default_user.
 #
+# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE WITH, E.G., PROCMAIL,
+# YOU MUST SET UP AN ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL
+# USER.
+#
 # Other environment variables of interest: USER (recipient username),
 # EXTENSION (address extension), DOMAIN (domain part of address),
 # and LOCAL (the address localpart).
index 21392f933ad2f480b20d621e81f7724e02052d4e..5dd1ef238b17a57f914b962bb91c8e86332586fd 100755 (executable)
@@ -218,6 +218,15 @@ check)
                    $WARN not owned by $mail_owner: $dir)
        done
 
+       for dir in bin etc lib sbin usr
+       do
+               test -d $dir && find $dir -type f -print | while read path
+               do
+                       cmp -s $path /$path || 
+                           $WARN $queue_directory/$path and /$path differ
+               done
+       done
+
        $command_directory/postsuper || exit 1
 
        find corrupt -type f -exec $WARN damaged message: {} \;
index 337b2ade17b86c25cca8bdd8723f29ca35410541..780b475b0e5bd2a857a68a70180b1255ac36225e 100755 (executable)
@@ -219,6 +219,15 @@ check)
                    $WARN not owned by $mail_owner: $dir)
        done
 
+       for dir in bin etc lib sbin usr
+       do
+               test -d $dir && find $dir -type f -print | while read path
+               do
+                       cmp -s $path /$path || 
+                           $WARN $queue_directory/$path and /$path differ
+               done
+       done
+
        $command_directory/postsuper || exit 1
 
        find corrupt -type f -exec $WARN damaged message: {} \;
index f2c3d4ebe4b0feb4625ae1cf4c8806f00d6fb9d9..cb783e6ac612f45b689651c221fe046fef39d96b 100644 (file)
@@ -100,6 +100,10 @@ home_mailbox =
 # command to use instead of mailbox delivery. The command is run
 # as the recipient with proper HOME, SHELL and LOGNAME environment settings.
 # Exception: delivery for root is done as $default_user.
+#
+# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE WITH, E.G., PROCMAIL,
+# YOU MUST SET UP AN ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL
+# USER.
 # 
 # Other environment variables of interest: USER (recipient username),
 # EXTENSION (address extension), DOMAIN (domain part of address),
index e20640c223a5267c8ee3d74d499aefc5099629f5..3fdd077ece3d2a1f7d8e34413e4903c7e6ce3e58 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-19991216"
+#define DEF_MAIL_VERSION       "Snapshot-19991219"
 extern char *var_mail_version;
 
 /* LICENSE
index f938652fdd681c8ae9e383de145993e4390ecb3b..24ac8b12c2687c0e91623fefd0d30a5f80c719fa 100644 (file)
 
 <h2>Table of contents</h2>
 
+<p>
+
+<ul>
+
+<li><a href="#example_config">Example configurations</a>
+
+<li><a href="#sendmail_incompatibility">Sendmail incompatibility</a>
+
+<li><a href="#relaying">Mail relaying</a>
+
+<li><a href="#remote_delivery">Delivery to remote systems</a>
+
+<li><a href="#local_delivery">Delivery to local (non-virtual) addresses</a>
+
+<li><a href="#mailing_lists">Mailing lists</a>
+
+<li><a href="#virtual_domains">Virtual domains</a>
+
+<li><a href="#address_rewriting">Address rewriting</a>
+
+<li><a href="#content_filtering">Content filtering</a>
+
+<li><a href="#other_transports">Other transports: UUCP, FAX, etc.</a>
+
+<li><a href="#compiling_installing">Compiling and installing Postfix</a>
+
+</ul>
+
+<p>
+
+<a name="example_config"><h3>Example configurations</h3>
+
 <ul>
 
+<li><a href="#workstation_server">Workstations and servers</a>
+
+<li><a href="#null_client">Null clients</a>
+
 <li><a href="#intranet">Running Postfix inside an intranet</a>
 
 <li><a href="#firewall">Running Postfix on a firewall</a>
 
 <li><a href="#dialup">Running Postfix on a dialup machine</a>
 
-<p>
+</ul>
+
+<a name="sendmail_incompatibility"><h3>Sendmail incompatibility</h3>
+
+<ul>
+
+<li><a href="#verbose">Postfix breaks "sendmail -v"</a>
+
+<li><a href="#root">Root's mail is delivered to nobody</a>
+
+<li><a href="#duplicate">Postfix sends duplicate mail</a>
+
+<li><a href="#metoo">Postfix sends mail to every member of a
+distribution list</a>
+
+<li><a href="#delivered">Getting rid of the ugly Delivered-To: header</a>
+
+<li><a href="#majordomo-approve">Postfix breaks the majordomo "approve" command</a>
+
+</ul>
+
+<a name="relaying"><h3>Mail relaying</h3>
+
+<ul>
+
+<li><a href="#mobile">Relaying mail for mobile users</a>
+
+<li><a href="#relay_virtual">Postfix refuses to receive mail for some
+virtual domains</a>
+
+<li><a href="#relay_restrict">Restricting what users can send mail to off-site destinations</a>
+
+</ul>
+
+<a name="remote_delivery"><h3>Delivery to remote systems</h3>
+
+<ul>
+
+<li><a href="#timeouts">Mail fails consistently with timeout or lost connection</a>
+
+</ul>
+
+<a name="local_delivery"><h3>Delivery to local (non-virtual) addresses</h3>
+
+<ul>
+
+<li><a href="#root">Root's mail is delivered to nobody</a>
 
 <li><a href="#local">Delivering some users locally while sending mail as user@domain</a>
 
+<li><a href="#maildir">Support for maildir-style mailboxes</a>
+
+<li><a href="#procmail">Using Procmail for system-wide local delivery</a>
+
+<li><a href="#delivered">Getting rid of the ugly Delivered-To: header</a>
+
+<li><a href="#duplicate">Postfix sends duplicate mail</a>
+
+<li><a href="#metoo">Postfix sends mail to every member of a
+distribution list</a>
+
+</ul>
+
+<a name="mailing_lists"><h3>Mailing lists</h3>
+
+<ul>
+
+<li><a href="#majordomo-approve">Postfix breaks the majordomo "approve" command</a>
+
+<li><a href="#internal-list">Protecting internal email distribution lists</a>
+
+<li><a href="#duplicate">Postfix sends duplicate mail</a>
+
+<li><a href="#metoo">Postfix sends mail to every member of a
+distribution list</a>
+
+</ul>
+
+<a name="virtual_domains"><h3>Virtual domains</h3>
+
+<ul>
+
+<li><a href="#command">Commands don't work in Postfix virtual maps</a>
+
+<li><a href="#unknown_virtual">Mail for unknown virtual users fails
+with a mail loop error</a>
+
+<li><a href="#relay_virtual">Postfix refuses to receive mail for some
+virtual domains</a>
+
+</ul>
+
+<a name="address_rewriting"><h3>Address rewriting</h3>
+
+<ul>
+
 <li><a href="#masquerade">Address masquerading with exceptions</a>
 
-<li><a href="#scanning">Support for virus scanning</a>
+</ul>
 
-<li><a href="#maildir">Support for maildir-style mailboxes</a>
+<a name="content_filtering"><h3>Content filtering</h3>
 
-<li><a href="#procmail">Using Procmail for local delivery</a>
+<ul>
 
-<li><a href="#verbose">Postfix breaks "sendmail -v"</a>
+<li><a href="#scanning">Support for virus scanning</a>
 
-<li><a href="#delivered">Getting rid of Delivered-To:</a>
+</ul>
 
-<li><a href="#approve">Postfix breaks the majordomo "approve" command</a>
+<a name="other_transports"><h3>Other transports: UUCP, FAX, etc.</h3>
 
-<p>
+<ul>
 
-<li><a href="#uucp">Setting up an Internet to UUCP gateway</a>
+<li><a href="#internet-uucp">Setting up an Internet to UUCP gateway</a>
 
 <li><a href="#uucp-only">Using UUCP as the default transport</a>
 
 <li><a href="#fax">Sending mail to a FAX machine</a>
 
-<p>
+</ul>
 
-<li><a href="#timeouts">Mail fails with timeout or lost connection</a>
+<a name="compiling_installing"><h3>Compiling and installing Postfix</h3>
 
-<p>
+<ul>
 
 <li><a href="#bind">Undefined symbols: ___dn_expand, ___res_init etc.</a>
 
-<li><a href="#dbm">Undefined symbols: dbm_pagfno, dbm_dirfno etc.</a>
+<li><a href="#dbm_dirfno">Undefined symbols: dbm_pagfno, dbm_dirfno etc.</a>
 
 <li><a href="#db">Using DB libraries on Solaris etc.</a>
 
 
 <hr>
 
-<a name="intranet"> <h2>Running Postfix inside an intranet</h2> </a>
+<a name="workstation_server"><h3>Workstations and servers</h3>
 
-The simplest way to set up Postfix on a host inside a firewalled
-network is to send all your mail to the intranet mail gateway, and
-to let that gateway take care of forwarding.
+This section describes a workstation-sever environment. All systems
+send mail as user@domain. All systems receive mail for user@hostname.
+The server receives mail for user@domain, too.
 
 <p>
 
-<ul>
-
-<li>Edit the <b>main.cf</b> file and specify:
+Postfix has sane defaults for all parameters, so the text shows
+only the overrides. In particular, Postfix will relay mail only
+for clients in its own domain (and subdomains) and in its class A,
+B or C networks. The master.cf file (somewhat like inetd.conf)
+needs tweaking only if you have a very slow or a very fast net/machine.
 
 <p>
 
-<dl>
+Workstation:
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        myorigin = $mydomain
+</pre>
 
-<dd><b>relayhost = $mydomain</b>
+<p>
 
-</dl>
+Server:
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        myorigin = $mydomain
+        mydestination = $myhostname, localhost.$mydomain, $mydomain
+</pre>
 
 <p>
 
-This assumes that your organization has set up multiple internal
-MX hosts for the local domain.
+In an environment like this. either the mail spool directory is
+shared via NFS, users access their mailboxes via POP, or each user
+receives her mail on her own workstation.  In the latter case, each
+user has an alias on the server that forwards mail to the respective
+workstation:
 
 <p>
 
-If your intranet does not use MX records internally, you have to
-specify the gateway host itself:
+Server:
+<pre>
+    <b>/etc/aliases</b>:
+        joe:    joe@joes.workstation
+        jane:   jane@janes.workstation
+</pre>
 
 <p>
 
-<dl>
+On some systems the alias database is not in <b>/etc/aliases</b>.
+To find out the location for your system, execute the command
+<b>postconf alias_maps</b>.
+
+<hr>
 
-<dd><b>relayhost = </b><i>gateway.my.domain</i>
+<a name="null_client"><h3>Null clients</h3>
 
-</dl>
+A null client is a machine that can only send mail. It receives no
+mail from the network, and it does not deliver any mail locally. A
+null client typically uses POP or NFS for mailbox access.
 
 <p>
 
-<li>If you want to deliver internal mail directly without going through
-the intranet mail gateway, there are two possibilities.
+In the following example, mail is sent as user@domain, and all mail
+is forwarded to the mail server that is responsible for the local
+domain.
 
 <p>
 
-<ol>
-
-<li>Specify the intranet mail gateway as the fall-back relay for
-all mail with an unknown or unreachable destination:
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+       mydestination =
+        myorigin = $mydomain
+        relayhost = $mydomain
+
+    <b>/etc/postfix/master.cf</b>:
+        Comment out the SMTP server entry
+        Comment out the local delivery agent entry
+</pre>
 
 <p>
 
-<dl>
+The mail server is the primary MX host for null clients (remember,
+null clients do not receive mail, so something needs to be done
+with mail for user@nullclient).
 
-<dl>
+<p>
 
-<dt>main.cf:
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+       myorigin = $mydomain
+        mydestination = $myhostname localhost.$mydomain $mydomain /etc/postfix/nullclients
 
-<dd><b>fallback_relay = $mydomain</b>
+    <b>/etc/postfix/nullclients</b>:
+       hosta.my.domain
+       hostb.my.domain
+</pre>
 
-</dl>
+<hr>
 
-<p>
+<a name="intranet"> <h3>Running Postfix inside an intranet</h3> </a>
 
-This assumes that your organization has set up multiple internal
-MX hosts for the local domain.
+The simplest way to set up Postfix on a host inside a firewalled
+network is to send all your mail to an intranet mail gateway, and
+to let that mail gateway take care of forwarding.
 
 <p>
 
-If your intranet does not use MX records internally, you have to
-specify the gateway host itself:
-
-<p>
+<ul>
 
-<dl>
+<li>Forward <i>all</i> mail to an intranet mail gateway, unless
+the mail is to be delivered on the local machine:
 
-<dt>main.cf:
+<p>
 
-<dd><b>fallback_relay = </b><i>gateway.my.domain</i>
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        relayhost = $mydomain
+</pre>
 
-</dl>
+<p>
 
-</dl>
+This assumes that your organization has set up internal MX records
+for the local domain.
 
 <p>
 
-<li>Specify routing information for the local domain in the <a
-href="transport.5.html">transport</a> table, and enable <a
-href="transport.5.html">transport</a> table lookups.
+If your intranet does not use MX records internally, you have to
+specify the intranet mail gateway host itself:
 
 <p>
 
-<dl>
-
-<dl>
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        relayhost = host.my.domain
+</pre>
 
-<dt>main.cf:
+<p>
 
-<dd><b>transport_maps = hash:/etc/postfix/transport</b>
+If your intranet does not use DNS internally, you have to disable
+DNS lookups as well:
 
 <p>
 
-<dt>/etc/postfix/transport:
-
-<dd><i>my.domain</i> &nbsp; <b>smtp</b>:
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        disable_dns_lookups = yes
+</pre>
 
-<dd><i>.my.domain</i> &nbsp; <b>smtp</b>:
+<p>
 
-<dd><i>thishost.my.domain</i> &nbsp; <b>local</b>:
+<li>In addition to the above you can configure Postfix to deliver
+intranet mail directly instead of sending it via the intranet
+mail gateway.
 
-</dl>
+<p>
 
-</dl>
+Specify routing information for the internal domain in the <a
+href="transport.5.html">transport</a> table, and enable <a
+href="transport.5.html">transport</a> table lookups.
 
 <p>
 
+<pre>
+    <b>/etc/postfix/transport</b>:
+        my.domain               smtp:
+        .my.domain              smtp:
+        thishost.my.domain      local:        <blink>important!</blink>
+        localhost.my.domain     local:        <blink>important!</blink>
+
+    <b>/etc/postfix/main.cf</b>:
+        transport_maps = hash:/etc/postfix/transport
+</pre>
+
 <p>
 
-Do not omit the entry that routes mail for <i>thishost.my.domain</i>
-to the local delivery agent, or else mail for the local machine will
-go into a loop.
+Important: do not omit the entries that route local mail to the
+local delivery agent, or else mail your mail will go into a loop.
 
 <p>
 
 Specify <b>dbm:/etc/postfix/transport</b> if your system
 uses <b>dbm</b> files instead of <b>db</b>.
 
-</ol>
-
 <p>
 
 <li>Execute the command <b>postfix reload</b> to make the
@@ -206,7 +390,12 @@ changes effective.
 
 <hr>
 
-<a name="firewall"><h2>Running Postfix on a firewall</h2> </a>
+<a name="firewall"><h3>Running Postfix on a firewall</h3> </a>
+
+Note: this text applies to Postfix versions dated 19991115
+and later only.
+
+<p>
 
 How to set up Postfix on the firewall machine so that it relays
 mail for <i>my.domain</i> to a gateway machine on the inside, and
@@ -225,31 +414,21 @@ route mail for <i>my.domain</i> to the inside machine:
 
 <p>
 
-<dl>
-
-<dt>/etc/postfix/main.cf:
-
-<dd><b>mydestination = $myhostname</b>, <i>my.domain</i>,
-<b>localhost</b>.<i>my.domain</i>
-
-<dd><b>relay_domains = </b>
-
-<dd><b>transport_maps = hash:/etc/postfix/transport</b>
-
-<p>
-
-<dt>/etc/postfix/transport:
-
-<dd><i>my.domain</i> &nbsp; <b>smtp:</b><i>inside-gateway.my.domain</i>
-
-<dd><i>.my.domain</i> &nbsp; <b>smtp:</b><i>inside-gateway.my.domain</i>
-
-</dl>
+<pre>
+<b>/etc/postfix/main.cf</b>:
+    mydestination = $myhostname, my.domain, localhost.my.domain
+    relay_domains =
+    transport_maps = hash:/etc/postfix/transport
+
+<b>/etc/postfix/transport</b>:
+    my.domain   smtp:inside-gateway.my.domain
+    .my.domain  smtp:inside-gateway.my.domain
+</pre>
 
 <p>
 
 Specify <b>dbm:/etc/postfix/transport</b> if your system uses <b>dbm</b>
-files instead of <b>db</b>. 
+files instead of <b>db</b>.
 
 <p>
 
@@ -260,7 +439,7 @@ configuration change.
 
 <hr>
 
-<a name="dialup"><h2>Running Postfix on a dialup machine</h2></a>
+<a name="dialup"><h3>Running Postfix on a dialup machine</h3></a>
 
 <ul>
 
@@ -275,18 +454,15 @@ that is connected all the time.
 
 <p>
 
-<dl>
-
-<dt><b>/etc/postfix/main.cf:</b>
-
-<dd><b>relayhost = smtprelay.someprovider.com</b>
-
-</dl>
+<pre>
+    <b>/etc/postfix/main.cf:</b>
+        relayhost = smtprelay.someprovider.com
+</pre>
 
 <p>
 
 <li> <a name="spontaneous_smtp">Disable spontaneous SMTP mail
-delivery.</a>
+delivery (on-demand dialup IP only).</a>
 
 <p>
 
@@ -298,18 +474,14 @@ calls from being placed, disable spontaneous SMTP mail deliveries.
 
 <p>
 
-<dl>
-
-<dt><b>/etc/postfix/main.cf:</b>
-
-<dd><b>defer_transports = smtp</b> (Only for systems that use
-on-demand dialup IP)
-
-</dl>
+<pre>
+    <b>/etc/postfix/main.cf:</b>
+        defer_transports = smtp (Only for systems that use on-demand dialup IP)
+</pre>
 
 <p>
 
-<li> Disable SMTP client DNS lookups.
+<li> Disable SMTP client DNS lookups (dialup LAN only).
 
 <p>
 
@@ -321,21 +493,17 @@ To prevent these delays, disable all SMTP client DNS lookups.
 
 <p>
 
-<dl>
-
-<dt><b>/etc/postfix/main.cf:</b>
-
-<dd><b>disable_dns_lookups = yes</b> (Only for delivery across LANs
-that are disconnected most of the time)
-
-</dl>
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        disable_dns_lookups = yes (Only for delivery across LANs that are disconnected most of the time)
+</pre>
 
 <p>
 
 <i> When you disable DNS lookups, you must specify the</i>
 <b>relayhost</b> <i> as either a numeric IP address, or as a hostname
 that resolves to one or more IP addresses (with DNS lookup disabled,
-Postfix does no</i> <b>MX</b> lookup).
+Postfix does no MX lookup</i>).
 
 <p>
 
@@ -367,243 +535,481 @@ is flushed from the queue.
 
 <hr>
 
-<a name="local"><h2>Delivering some users locally while sending mail as user@domain</h2></a>
-
-<ul>
+<a name="verbose"><h3>Postfix breaks "sendmail -v"</h3> </a>
 
-<li>In order to send mail as <i>user@domain</i>, edit
-<b>/etc/postfix/main.cf</b> and specify what domain
-is to be appended to addresses that do not have a domain:
+Some people will complain that <b>sendmail -v</b> no longer shows
+the actual mail delivery.
 
 <p>
 
-<dl>
+With a distributed mail system such as Postfix, this is difficult
+to implement. Unlike sendmail, no Postfix mail delivery process
+runs under control by a user. Instead, Postfix delivers mail with
+daemon processes that have no parent-child relationship with user
+processes.  This eliminates a large variety of potential security
+exploits with environment variables, signal handlers, and with
+other process attributes that UNIX passes on from parent process
+to child process.
 
-<dd><b>myorigin = </b><i>domain</i>
+<p>
 
-</dl>
+Postfix uses multiple processes in order to insulate subsystems
+from each other.  Making the delivery agents talk directly to user
+processes would defeat a lot of the effort that went into making
+Postfix more secure than ordinary mailers.
 
-<p>
+<hr>
 
-<li>In order to receive some users locally, such as <b>root</b> or
-<b>postmaster</b>,
+<a name="duplicate"><h3>Postfix sends duplicate mail</h3> </a>
+
+Some people will complain that Postfix sends duplicate messages.
+This happens whenever one message is mailed to multiple addresses
+that reach the same user. Examples of such scenarios are:
 
 <p>
 
 <ul>
 
-<li>edit <b>/etc/postfix/main.cf</b> and specify a virtual lookup table:
+<li>One message is sent to the user, and to an alias that lists
+the user.  The user receives one copy of the mail directly, and
+one copy via the alias.
 
 <p>
 
-<dl>
-
-<dd><b>virtual_maps = hash:/etc/postfix/virtual</b>
+<li>One message is sent to multiple aliases that list the user.
+The user receives one copy of the mail via each alias.
 
-</dl>
+</ul>
 
 <p>
 
-<li>edit <b>/etc/postfix/virtual</b> and specify non-default destinations:
+Some people will even argue that this is the "right" behavior.  It
+is probably more a matter of expectation and of what one is used to.
 
 <p>
 
-<dl>
-
-<dd><b>root &nbsp; root@localhost</b>
+This can be "fixed" only by making Postfix slower.  Postfix would
+first have to expand all distribution lists before starting any
+delivery. By design, Postfix delivers mail to different destinations
+in parallel, and local delivery is no exception. This is why Postfix
+can be faster than sendmail.
 
-<dd><b>postmaster &nbsp; postmaster@localhost</b>
+<hr>
 
-</dl>
+<a name="metoo"><h3>Postfix sends mail to every member of a
+distribution list</h3> </a>
 
-</ul>
+Some people will complain that Postfix sends mail to every member
+of a distribution list, including the poster.  By default, Sendmail
+deletes the poster from the distribution list. Sendmail sends mail
+to the poster only when the "metoo" flag is explicitly turned on.
 
 <p>
 
-<li>Execute the command <b>postmap /etc/postfix/virtual</b> to
-update the table, and <b>postfix reload</b> to make the changes
-effective.
-
-</ul>
+Wietse believes that Postfix implements the "right" behavior,
+and suspects that Sendmail's default behavior is a remnant from a
+dark past when Sendmail used a really crummy algorithm to avoid
+aliasing loops.
 
 <hr>
 
-<a name="masquerade"><h2>Address masquerading with exceptions</h2></a>
+<a name="mobile"><h3>Relaying mail for mobile users </h3>
 
-For people outside your organization it can be desirable to only
-see addresses of the form <i>user@company.com</i> rather than
-addresses with individual internal host names.  This can be achieved
-with address masquerading.
+<blockquote>
 
-<p>
+I have Postfix setup on a machine but I'd like to have a select
+group of Internet users be able to relay mail through it.  I'd
+either like to base the relaying on IP address (e.g., a 256-block
+for dynamic IP people) or on hostname (whatever.dialup.isp.com)
 
-Address masquerading is intended for use only on mail gateways.
+</blockquote>
 
-<ul>
+<p>
 
-<li>In order to have all mail through the gateway host appear as
-coming from <i>user@my.domain</i>, edit <b>/etc/postfix/main.cf</b>
-and specify:
+The most preferable way is to have users submit mail via some
+authenticated protocol instead of plain old SMTP.
 
 <p>
 
-<dl>
+The next best way is to use plain old SMTP and to authenticate the
+user first, for example, with a "please login via POP before using
+SMTP" scheme.  In that case, some non-Postfix software such as <a
+href="http://www.mbnet.mb.ca/howto/dynamic.htm">DRAC</a> maintains
+a Postfix-compatible access table with client IP address information:
 
-<dd><b>masquerade_domains = </b><i>$mydomain</i>
+<p>
 
-</dl>
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        smtpd_recipient_restrictions =
+            permit_mynetworks
+            check_client_access hash:/etc/postfix/client_access
+            check_relay_domains
+
+    <b>/etc/postfix/client_access</b>:
+        4.3.2.1         OK
+        5.4.3.2         987654321
+</pre>
 
 <p>
 
-Note that the gateway should have <b>append_dot_domain</b> and
-<b>append_myorigin</b> turned on (which is the default setting) so
-that all addresses are fully qualified before they are subjected
-to address masquerading.
-
-</ul>
+Specify <B>dbm</b> instead of <b>hash</b> if your system uses
+<b>dbm</b> files instead of <b>db</b> files.
 
 <p>
 
-In some cases, you may wish to have certain users or hosts exempted
-from masquerading.
+A less preferable way is based on client IP address (for example,
+a 256-block) or DNS hostname (for example, whatever.pop.isp.com).
+This scheme does not authenticate the user.  If you use IP/DNS-based
+relay access control, pray that no customer with that same ISP
+points their spam software at your machine, or else you may end up
+on internet-wide black lists.
 
-<ul>
+<p>
 
-<li>To exempt certain <i>users</i> from masquerading,
-such as <b>root</b>, add:
+The least preferable way is based on the sender address. It is
+trivially easy to spoof by anyone who ever received mail from your
+site.  If you use sender address access control, pray that no
+spammer ever finds out the address of your users.
 
 <p>
 
-<dl>
-
-<dd><b>masquerade_exceptions = </b><i>root</i>
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        smtpd_recipient_restrictions =
+            permit_mynetworks
+            check_client_access hash:/etc/postfix/client_access
+            check_sender_access hash:/etc/postfix/sender_access
+            check_relay_domains
+
+    <b>/etc/postfix/client_access</b>:
+        11.22.33                OK
+        dialup.isp.com          OK
+
+    <b>/etc/postfix/sender_access</b>:
+        joe@my.domain           OK
+        blow@my.domain          OK
+</pre>
 
-</dl>
+<hr>
 
-<p>
+<a name="relay_restrict"><h3>Restricting what users can send mail to off-site destinations</h3>
 
-<li>To exempt certain <i>hosts</i> from masquerading, write
-<b>masquerade_domains</b> as:
+<blockquote>
 
-<p>
+How can I configure Postfix in a way that some users can send mail
+to the internet and other users not. The users with no access should
+receive a generic bounce message. Please don't discuss whether such
+access restrictions are necessary, it was not my decision.
 
-<dl>
+</blockquote>
 
-<dd><b>masquerade_domains = </b><i>somehost.my.domain otherhost.my.domain
-$mydomain</i>
+<p>
 
-</dl>
+Postfix has support for per-user restrictions.  The restrictions
+are implemented by the SMTP server. Thus, users that violate the
+policy have their mail rejected by the SMTP server.  Like this:
 
 <p>
 
-Note that the order above is crucial: exemptions such as
-<i>somehost.my.domain</i> must precede <i>$mydomain</i> in the
-statement.
+<blockquote>
+
+<pre>
+550 &lt;user@remote&gt;: Access denied
+</pre>
+
+</blockquote>
 
 <p>
 
-It should go without saying that if a particular host you wish to
-exempt this way is originating mail as <i>user@my.domain</i> in
-the first place, you can hardly exempt it.
+The implementation uses two lookup tables. One table defines what
+users are restricted in where they can send mail, and the other
+table defines what destinations are local. It is left as an exercise
+for the reader to change this into a scheme where only some users
+have permission to send send mail to off-site destinations, and
+where most users are restricted.
 
 <p>
 
-</ul>
+The example assumes DB/DBM files, but this could also be done with
+LDAP or SQL.
 
-As usual, execute the command <b>postfix reload</b> to make the changes
-effective.
+<p>
+
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        smtpd_recipient_restrictions =
+            hash:/etc/postfix/restricted_senders
+            ...other stuff...
+
+        restriction_classes = local_only
+        local_only = check_recipient_access hash:/etc/postfix/local_domains, reject
+
+    <b>/etc/postfix/restricted_senders</b>:
+        foo@domain      local_only
+        bar@domain      local_only
+
+    <b>/etc/postfix/local_domains</b>:
+        this.domain     OK      (matches this.domain and subdomains)
+        that.domain     OK      (matches that.domain and subdomains)
+</pre>
+
+<p>
+
+Specify <B>dbm</b> instead of <b>hash</b> if your system uses
+<b>dbm</b> files instead of <b>db</b> files.
+
+<p>
+
+The <b>restriction_classes</b> verbiage exists so that Postfix can
+open <b>/etc/postfix/local_domains.db</b> before entering a chroot
+jail, so it is only an artefact of implementation.
+
+<p>
+
+This scheme does not authenticate the user, therefore it can be
+bypassed in several ways:
+
+<p>
+
+<ul>
+
+<li>By sending mail as someone else who does have permission to
+send mail to off-site destinations.
 
 <p>
 
+<li>By sending mail as yourself via a less restrictive mail relay
+host.
+
+</ul>
+
 <hr>
 
-<a name="scanning"><h2>Support for virus scanning</h2> </a>
+<a name="timeouts"><h3>Mail fails consistently with timeout or lost connection</h3></a>
 
-Would not it be great if operating systems and applications actually
-worked the way they are supposed to, instead of being as fragile
-as today's products? Well, we can solve only one problem at a time.
+Every now and then, mail fails with "timed out while sending end
+of data -- message may be sent more than once", or with: "lost
+connection after DATA".  Network outages happen, systems crash.
+There isn't much you can do about it. Usually the problem goes away
+by itself.
 
 <p>
 
-Currently, Postfix has no hooks to let other programs inspect every
-message, so the scanning has to be done before mail enters Postfix
-or while mail leaves Postfix, for example at mailbox delivery time.
+However, when you see mail deliveries fail consistently, you may
+have a different problem: broken path MTU discovery.
 
 <p>
 
-<dl>
+A little background is in order. With the SMTP protocol, the HELO,
+MAIL FROM and RCPT TO commands and responses are relatively short.
+When you're talking to sendmail, every command and every response
+is sent as a separate packet, because sendmail cannot implement
+ESMTP command pipelining.
 
-<dt>Examples:
+<p>
 
-<dl>
+The message content, however, is sent as a few datagrams, each
+datagram typically a kbyte large or even bigger, depending on your
+local network MTU.
 
-<dt><b>mailbox_command = </b><i>/some/program ...</i>
+<p>
 
-<dd>specifies a command that runs whenever mail is delivered to
-mailbox.  See the sample <b>main.cf</b> file for examples. In
-<b>/etc/aliases</i>, you must specify an alias for <b>root</b> that
-directs mail to a real person, otherwise funny things happen with
-mail sent to <b>root</b>.
+When mail fails consistently due to a timeout, I suspect that the
+sending machine runs a modern UNIX which implements path MTU
+discovery.  That causes the machine to send packets as large as it
+would send over the LAN, with the IP DON'T FRAGMENT bit set,
+preventing intermediate routers from fragmenting the packets that
+are too big for their networks.
 
 <p>
 
-<dt><b> mailbox_transport = </b><i>foo</i>
+Depending on what network path a message follows, some router on
+the way responds with an ICMP MUST FRAGMENT message saying the
+packet is too big. Normally, the sending machine will re-send the
+data after chopping it up into smaller pieces.
 
-<dd>delegates local mailbox delivery to the transport <i>foo</i> as
-configured in <b>/etc/postfix/master.cf</b>. If you follow this
-route you will build something around the pipe mailer. See examples
-in <b>master.cf</b>.
+<p>
 
-</dl>
+However, things break when some router closer to the sending system
+is dropping such ICMP feedback messages, in a mistaken attempt to
+protect systems against certain attacks. In that case, the ICMP
+feedback message never reaches the sending machine, and the connection
+times out.
 
-</dl>
+<p>
+
+This is the same configuration problem that causes trouble with
+web servers behind a misconfigured packet filter: small images/files
+are sent intact, large images/files time out because the server
+does not see the MUST FRAGMENT ICMP feedback messages.
+
+<p>
+
+Workaround: disable path MTU discovery at the sending machine. Mail
+will get out, but of course everyone else will still suffer. How
+to disable path MTU discovery? It depends. Solaris has an <b>ndd</b>
+command; other systems use different means such as <b>sysctl</b>
+to control kernel parameters on a running system.
+
+<p>
+
+Fix: find the router that drops the ICMP MUST FRAGMENT messages,
+and convince the person responsible for it to fix the configuration.
 
 <hr>
 
-<a name="maildir"><h2>Support for maildir-style mailboxes</h2> </a>
+<a name="root"> <h3>Root's mail is delivered to nobody</h3>
 
-<b>Maildir</b> is a specific one-file-per-message organization that
-was introduced with the <b>qmail</b> system by Daniel Bernstein.
+If you use <a href="#procmail">procmail</a> (or some other command)
+for local mail delivery, Postfix will not deliver mail as root.
+Instead, Postfix runs <b>procmail</b> (or whatever) as <b>nobody</b>.
+Perhaps some day Wietse will trust Postfix enough to run external
+commands as <b>root</b>.
+
+<p>
+
+Solution:  just like you're not supposed to log in as <b>root</b>
+(except for unusual conditions), you're not supposed to receive
+mail as <b>root</b>.
+
+<p>
+
+<ul>
+
+<li>Create a mail alias for <b>root</b> that forwards mail to a
+real user.
+
+<p>
+
+<pre>
+<b>/etc/aliases:</b>
+    root:       you
+</pre>
 
 <p>
 
-Postfix supports the <b>maildir</b> mailbox format.  Edit <b>main.cf</b>
-and specify a line with: <b>home_mailbox = Maildir/</b> (any relative
-pathname that ends in <b>/</b> will do).
+<li>Execute the command <b>newaliases</b> whenever you change the
+alias database.
+
+</ul>
 
 <p>
 
-The maildir format is also supported for delivery from aliases or
-<b>.forward</b> files. Specify <i>/file/name/</i> as destination.
-The trailing <b>/</b> turns on <b>maildir</b> delivery.
+On some systems the alias database is not in <b>/etc/aliases</b>.
+To find out the location for your system, execute the command
+<b>postconf alias_maps</b>.
 
 <hr>
 
-<a name="procmail"><h2>Using Procmail for local delivery</h2> </a>
+<a name="local"><h3>Delivering some users locally while sending mail as user@domain</h3></a>
 
 <ul>
 
-<li>Edit <b>/etc/postfix/main.cf</b>, and specify <b>procmail</b> as the 
-command for mailbox delivery:
+<li>In order to send mail as <i>user@domain.name</i>, specify what
+domain is to be appended to addresses that do not have a domain:
 
 <p>
 
-<dl>
+<pre>
+<b>/etc/postfix/main.cf</b>:
+    myorigin = domain.name
+</pre>
 
-<dd><b>mailbox_command = </b><i>/path/to/procmail</i>
+<p>
+
+<li>In order to receive some users locally, such as <b>root</b> or
+<b>postmaster</b>, specify a virtual lookup table with the non-default
+destinations:
 
 <p>
 
-<dd><b>mailbox_command = </b><i>/path/to/procmail</i><b> &nbsp; -a
-&nbsp; "$EXTENSION"</b>
+<pre>
+<b>/etc/postfix/main.cf</b>:
+    virtual_maps = hash:/etc/postfix/virtual
 
-</dl>
+<b>/etc/postfix/virtual</b>:
+    root        root@localhost
+    postmaster  postmaster@localhost
+</pre>
 
 <p>
 
-If you can, avoid using any shell meta characters or built-ins
-such as <b>$</b> or <b>"</b> or <b>IFS</b> or <b>&amp;&amp;</b>,
-because they force Postfix to run an expensive shell process.
+Specify <B>dbm</b> instead of <b>hash</b> if your system uses
+<b>dbm</b> files instead of <b>db</b> files.
+
+<p>
+
+<li>Execute the command <b>postmap /etc/postfix/virtual</b> whenever
+you edit the the <b>virtual</b> table.
+
+<p>
+
+<li>Execute the command <b>postfix reload</b> to make the changes
+effective.
+
+</ul>
+
+<hr>
+
+<a name="maildir"><h3>Support for maildir-style mailboxes</h3> </a>
+
+<b>Maildir</b> is a specific one-file-per-message organization that
+was introduced with the <b>qmail</b> system by Daniel Bernstein.
+In order to turn on <b>maildir</b>-style delivery, specify,
+for example:
+
+<p>
+
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        home_mailbox = Maildir/
+</pre>
+
+<p>
+
+Any relative pathname that ends in <b>/</b> turns on <b>maildir</b>
+delivery.  The <b>home_mailbox</b> value is appended to the user's
+home directory pathname.
+
+<p>
+
+The <b>maildir</b> format is also supported with delivery via
+aliases or via <b>.forward</b> files. Specify <i>/file/name/</i>
+as destination.  The trailing <b>/</b> turns on <b>maildir</b>
+delivery.
+
+<hr>
+
+<a name="procmail"><h3>Using Procmail for system-wide local delivery</h3> </a>
+
+Warning: if you use <b>procmail</b> in this manner, you must set
+up an alias for <b>root</b> that forwards mail for <b>root</b> to
+a real user. See the FAQ entry titled "<a href="#root">Mail for root
+is delivered to nobody</a>".
+
+<ul>
+
+<li>Specify that all mailbox delivery is to be done by <b>procmail</b>.
+For example:
+
+<p>
+
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        mailbox_command = /path/to/procmail
+
+    <b>/etc/postfix/main.cf</b>:
+        mailbox_command = /path/to/procmail -a $EXTENSION
+</pre>
+
+<p>
+
+If you can, avoid using any shell meta characters or built-ins such
+as <b>$</b> or <b>"</b> or <b>IFS</b> or <b>&amp;&amp;</b>, because
+they force Postfix to run an expensive shell process.  However,
+procmail is a pig, and the gain of avoiding a shell can be
+unnoticeable.
 
 <p>
 
@@ -613,12 +1019,12 @@ effective.
 </ul>
 
 Postfix exports information via environment variables. The contents
-are censored. Any characters that may have special meaning to the
-shell are replaced by underscores.
+are censored. Characters that may have special meaning to the shell,
+including whitespace, are replaced by underscores.
 
 <p>
 
-<dl>
+<blockquote>
 
 <dl>
 
@@ -643,35 +1049,11 @@ in the recipient address, for example, <b>$USER+$EXTENSION</b>.
 
 </dl>
 
-</dl>
-
-<hr>
-
-<a name="verbose"><h2>Postfix breaks "sendmail -v"</h2> </a>
-
-Some people will complain that <b>sendmail -v</b> no longer shows
-the actual mail delivery.
-
-<p>
-
-With a distributed mail system such as Postfix, this is difficult
-to implement. Postfix does not run any mail delivery process under
-control by a user. Instead, mail delivery is done by daemon processes
-that have no parental relationship with user processes.  This
-eliminates a large variety of potential security exploits with
-environment variables, signal handlers, and with other process
-attributes that UNIX passes on from parent to child.
-
-<p>
-
-In addition, Postfix uses multiple processes in order to insulate
-subsystems from each other.  Making the delivery agents talk directly
-to user processes would defeat a lot of the effort that went into
-making Postfix more secure than ordinary mailers.
+</blockquote>
 
 <hr>
 
-<a name="delivered"><h2>Getting rid of Delivered-To:</h2> </a>
+<a name="delivered"><h3>Getting rid of the ugly Delivered-To: header</h3> </a>
 
 Some people will complain about the ugly <b>Delivered-To:</b>
 message header that Postfix prepends to their mail.  By default,
@@ -692,7 +1074,7 @@ Solutions, ranging from fighting symptoms to turning off the
 <li>
 
 Fortunately, many mail user agents have per-user or even system-wide
-configuration files that can be set up to suppress specific message
+configuration files that can be set up to suppress <b>Delivered-To:</b>
 headers (for example <b>~/.mailrc</b> and <b>/usr/lib/Mail.rc</b>).
 
 <p>
@@ -723,8 +1105,8 @@ expression-based filter at the SMTP port:
 <dt><b>/etc/postfix/access_regexp:</b>
 
 <dl>
-   
-<dt><tt>/^(.*)-outgoing@(.*)/  554 Use $1@$2 instead</tt>
+
+<dt><tt>/^(.*)-outgoing@(.*)/   554 Use $1@$2 instead</tt>
 
 </dl>
 
@@ -743,20 +1125,22 @@ Postfix source directory.
 
 The <b>prepend_delivered_header</b> configuration parameter controls
 when <b>Delivered-To:</b> is prepended. The default setting is
-<b>command, file, forward</b>.  <i>Turning off <b>Delivered-To:</b>
-when forwarding mail is not recommended</i>.
+<b>command, file, forward</b> (translation: prepend <b>Delivered-To:</b>
+when delivering to command, when delivering to file, and when
+forwarding mail).  <i>Turning off <b>Delivered-To:</b> when forwarding
+mail is not recommended</i>.
 
 </ul>
 
 <p>
 
 See also the FAQ item for problems with the <b>majordomo</b> <a
-href="#approve">approve</a> command.
+href="#majordomo-approve">approve</a> command.
 
 <hr>
 
-<a name="approve"><h2>Postfix breaks the majordomo "approve"
-command</h2> </a>
+<a name="majordomo-approve"><h3>Postfix breaks the majordomo "approve"
+command</h3> </a>
 
 The Postfix local delivery agent prepends a <b>Delivered-To:</b>
 message header to prevent mail forwarding loops.  With <b>majordomo</b>
@@ -766,8 +1150,8 @@ The Postfix system claims that the mail is looping.
 
 <p>
 
-Currently, the workaround is to edit the <b>approve</b> script to
-strip any header lines that match:
+Currently, the recommended workaround is to edit the <b>approve</b>
+script to strip any header lines that match:
 
 <p>
 
@@ -781,247 +1165,556 @@ strip any header lines that match:
 
 Yes, this assumes that the moderator knows what she is doing.
 
+<p>
+
+A less-preferred workaround is to not insert <b>Delivered-To:</b>
+when delivering to commands such as majordomo. See the FAQ entry
+titled "<a href="#delivered">Getting rid of the ugly Delivered-To:
+header</a>".
+
 <hr>
 
-<a name="uucp"><h2>Setting up an Internet to UUCP gateway</h2> </a>
+<a name="internal-list"><h3>Protecting internal email distribution lists</h3>
+
+<blockquote>
 
-Here is how to set up a machine that sends <i>some</i> but not all
-mail via UUCP. See the <a href="#uucp-only">UUCP-only</a> FAQ entry
-for setting a UUCP-only host.
+We want to implement an internal email distribution list.  Something
+like all@our.domain.com, which aliases to all employees.  My first
+thought was to use the aliases map, but that would lead to "all"
+being accessible from the "outside", and this is not desired...
+:-)
+
+</blockquote>
+
+Postfix can implement per-address access controls.  What follows
+is based on the SMTP client IP address, and therefore is subject
+to IP spoofing.
 
 <p>
 
-<ul>
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        smtpd_recipient_restrictions =
+            hash:/etc/postfix/access
+            ..the usual stuff...
 
-<li>Make an entry in <b>/etc/postfix/transport</b>:
+    <b>/etc/postfix/access</b>:
+        all     permit_mynetworks,reject
+</pre>
 
 <p>
 
-<dl>
+Specify <B>dbm</b> instead of <b>hash</b> if your system uses
+<b>dbm</b> files instead of <b>db</b> files.
 
-<dd><i>some.domain</i> &nbsp; <b>uucp:</b><i>uucp-host</i>
+<p>
 
-</dl>
+Now, that would be sufficient when your machine receives all Internet
+mail directly from the Internet.  That's unlikely if your network
+is a bit larger than an office. For example your backup MX hosts
+would "launder" the client IP address of mail from outside so it
+would appear to come from a trusted machine.
 
 <p>
 
-This causes all mail for the <i>some.domain</i> (and subdomains
-thereof) to be sent via UUCP to the host <i>uucp-host</i>.
+In the general case you need two lookup tables: one table that
+lists destinations that need to be protected, and one table that
+lists domains that are allowed to send to the protected destinations.
 
 <p>
 
-<li>Execute the command <b>postmap /etc/postfix/transport</b> whenever
-you change the <b>transport</b> file.
+What follows is based on the sender SMTP envelope address, and
+therefore is subject to SMTP sender spoofing.
+
+<p>
+
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        smtpd_recipient_restrictions =
+            hash:/etc/postfix/protected_destinations
+            ..the usual stuff...
+
+        smtpd_restriction_classes = insiders_only
+        insiders_only = check_sender_access hash:/etc/postfix/insiders, reject
+
+    <b>/etc/postfix/protected_destinations</b>:
+        all@my.domain   insiders_only
+        all@my.hostname insiders_only
+
+    <b>/etc/postfix/insiders</b>:
+        my.domain       OK
+        another.domain  OK
+</pre>
+
+<p>
+
+The smtpd_restriction_classes verbiage is needed so that Postfix
+knows what lookup tables to open before it goes to chroot jail.
+It is only an artefact of the implementation.
+
+<p>
+
+Getting past this scheme is relatively easy, because all one has
+to do is to spoof the SMTP sender address.
+
+<p>
+
+If the internal list is a low-volume one, perhaps it makes more
+sense to make it moderated.
+
+<hr>
+
+<a name="command"><h3>Commands don't work in Postfix virtual maps</h3>
+
+Delivering mail to a command is a security-sensitive operation,
+because the command must be executed with the right privileges.
+Only <b>root</b>-privileged software such as the Postfix delivery
+agent can set the privileges for a command.
 
 <p>
 
-<li>You need an entry in <b>/etc/postfix/master.cf</b>:
+For security reasons, Postfix tries to avoid using <b>root</b>
+privileges where possible. In particular, Postfix virtual mapping
+is done by an unprivileged daemon, so there is no secure way to
+execute commands found in virtual maps.
+
+<p>
+
+Solution: specify a local alias instead. The Postfix local delivery
+agent has sufficient privilege to execute commands with the right
+privileges.
+
+<p>
+
+<ul>
+
+<li>Set up a local alias that executes the command:
+
+<p>
 
 <pre>
-    uucp      unix  -       n       n       -       -       pipe
-      flags=F user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
+    <b>/etc/aliases</b>:
+        name-virtual.domain     "|/some/where/command..."
 </pre>
 
 <p>
 
-This runs the <b>uux</b> command, and substitutes the next-hop
-hostname (<i>uucp-host</i>) and the recipients before executing
-the command.  The <b>uux</b> command is executed without assistance
-from the shell, so there are no problems with shell meta characters.
+<li>Execute the command <b>newaliases</b> whenever you edit the
+alias database.
 
 <p>
 
-<li>Edit <b>/etc/postfix/main.cf</b> and enable <b>transport</b>
-table lookups:
+<li>Forward mail for the virtual address to the local alias:
 
 <p>
 
-<dl>
+<pre>
+    <b>/etc/postfix/virtual</b>:
+        virtual.domain          whatever
+        name@virtual.domain     name-virtual.domain
+</pre>
 
-<dd><b>transport_maps = hash:/etc/postfix/transport</b>
+<p>
 
-</dl>
+<li>Execute the command <b>postmap /etc/postfix/virtual</b> whenever
+you edit the virtual database.
+
+</ul>
 
 <p>
 
-Specify <B>dbm</b> instead of <b>hash</b> if your system has no
-<b>db</b> support.
+
+Note: on some systems the alias database is not in <b>/etc/aliases</b>.
+To find out the location for your system, execute the command
+<b>postconf alias_maps</b>.
+
+<hr>
+
+<a name="unknown_virtual"><h3>Mail for unknown virtual users fails
+with a mail loop error</h3>
+
+Problem: mail for an unknown virtual user results in an ugly "mail
+loops back to myself" error from the Postfix SMTP client. Why
+doesn't Postfix generate a "user unknown" instead?
 
 <p>
 
-<li>Edit <b>/etc/postfix/main.cf</b> and add <i>some.domain</i> to
-the list of domains that your site is willing to relay mail for.
-See the <a href="uce.html#relay_domains">relay_domains</a>
-configuration parameter.
+Solution: add a magical entry to the Postfix virtual database:
 
 <p>
 
-<li>Execute the command <b>postfix reload</b> to make the
-changes effective.
+<pre>
+    <b>/etc/postfix/virtual</b>:
+        virtual.domain whatever
+</pre>
+
+<p>
+
+This entry will also fix the problem that the Postfix SMTP server
+refuses to <a href="#relay_virtual">receive</a> mail for the virtual
+domain.
+
+<p>
+
+For more information on how to set up virtual domains, see the <a
+href="virtual.5.html">virtual</a> manual page.
+
+<hr>
+
+<a name="relay_virtual"><h3>Postfix refuses to receive mail for some
+virtual domains </h3>
+
+In order to receive mail for virtual domains, the Postfix SMTP server
+needs to know that the domain is OK.
+
+<p>
+
+<ul>
+
+<li>Create an entry in the virtual map that lists the virtual
+domain name:
+
+<p>
+
+<pre>
+    <b>/etc/postfix/virtual</b>:
+        virtual.domain      whatever
+</pre>
+
+<p>
+
+<li>Verify that
+the <a
+href="uce.html#relay_domains">relay_domains</a> parameter contains
+<b>$virtual_maps</b>. This is the default setting.
+
+<p>
+
+<li>Verify that the <a
+href="uce.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>
+parameter contains a restriction that depends on <a
+href="uce.html#relay_domains">relay_domains</a>. This is the default setting.
 
 </ul>
 
+<p>
+
+For more details, see the <a href="virtual.5.html">virtual</a>
+manual page.
+
 <hr>
 
-<a name="uucp-only"><h2>Using UUCP as the default transport</h2> </a>
+<a name="masquerade"><h3>Address masquerading with exceptions</h3></a>
 
-Here is how to relay all your mail over a UUCP link.  See the <a
-href="#uucp">Internet to UUCP</a> FAQ entry for setting up a machine
-that gateways between UUCP and SMTP.
+For people outside your organization it can be desirable to only
+see addresses of the form <i>user@company.com</i> rather than
+addresses with individual internal host names.  This can be achieved
+with address masquerading.
 
 <p>
 
+Address masquerading is intended for use only on mail gateways.
+
 <ul>
 
-<li>There is no need for a <b>transport</b> table.
+<li>In order to have all mail through the gateway host appear as
+coming from <i>user@my.domain</i>, specify:
 
 <p>
 
-<li>In <b>/etc/postfix/main.cf</b>, specify the name of your
-UUCP gateway host, and specify that all mail must be sent
-via the <b>uucp</b> message transport:
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        masquerade_domains = $mydomain
+</pre>
 
 <p>
 
-<dl>
+Note that the gateway should have <b><a
+href="rewrite.html#append_dot_mydomain">append_dot_mydomain</a></b>
+and <b><a href="rewrite.html#append_at_myorigin">append_at_myorigin</a></b>
+turned on (which is the default setting) so that all addresses are
+fully qualified before they are subjected to address masquerading.
+
+</ul>
 
-<dd><b>relayhost = </b><i>uucp-gateway</i>
+<p>
 
-<dd><b>default_transport = uucp</b>
+In some cases, you may wish to have certain users or hosts exempted
+from masquerading.
 
-</dl>
+<ul>
+
+<li>To exempt certain <i>users</i> from masquerading,
+such as <b>root</b>, specify:
 
 <p>
 
-<li>You need an entry in <b>/etc/postfix/master.cf</b>:
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        masquerade_exceptions = root
+</pre>
+
+<p>
+
+<li>To exempt certain <i>hosts</i> from masquerading, write
+<b>masquerade_domains</b> as:
+
+<p>
 
 <pre>
-    uucp      unix  -       n       n       -       -       pipe
-      flags=F user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
+    <b>/etc/postfix/main.cf</b>:
+        masquerade_domains = somehost.my.domain otherhost.my.domain $mydomain
 </pre>
 
-This runs the <b>uux</b> command, and substitutes the next-hop
-hostname (<i>uucp-gateway</i>, or whatever you specified) and the
-recipients before executing the command.  The <b>uux</b> command
-is executed without assistance from the shell, so there are no
-problems with shell meta characters.
+<p>
+
+Note that the order above is crucial: exemptions such as
+<i>somehost.my.domain</i> must precede <i>$mydomain</i> in the
+statement.
 
 <p>
 
-<li>Execute the command <b>postfix reload</b> to make the
-changes effective.
+It should go without saying that if a particular host you wish to
+exempt this way is originating mail as <i>user@my.domain</i> in
+the first place, you can hardly exempt it.
+
+<p>
 
 </ul>
 
+As usual, execute the command <b>postfix reload</b> to make the changes
+effective.
+
+<p>
+
 <hr>
 
-<a name="fax"><h2>Sending mail to a FAX machine</h2></a>
+<a name="scanning"><h3>Support for virus scanning</h3> </a>
 
-The following information is by Joerg Henne:
+Would not it be great if operating systems and applications actually
+worked the way they are supposed to, instead of being as fragile
+as today's products? Well, we can solve only one problem at a time.
 
 <p>
-Over here we are using the scheme <fax number>@fax.our.domain with Postfix and
-HylaFax. Here's the setup used:
+
+Currently, Postfix has no hooks to let other programs inspect every
+message, so the scanning has to be done before mail enters Postfix
+or while mail leaves Postfix, for example at mailbox delivery time.
 
 <p>
-In master.cf:
+
+Examples:
 
 <p>
 
 <pre>
-    fax       unix  -       n       n       -       -       pipe
-       flags= user=fax argv=/usr/bin/faxmail -d -n ${user}
+    <b>/etc/postfix/main.cf</b>:
+        mailbox_command = /some/program ...
 </pre>
 
 <p>
 
-In the transports map:
+This example specifies a command that delivers all local mail to
+mailbox.  See the sample <b>main.cf</b> file for examples. In
+<b>/etc/aliases</i>, you must specify an alias for <b>root</b> that
+directs mail to a real person, otherwise mail sent to <b>root</b>
+will not work as expected.
 
 <p>
 
 <pre>
-    fax.your.domain   fax:localhost
+    <b>/etc/postfix/main.cf</b>:
+        mailbox_transport = foo
 </pre>
 
 <p>
 
-Note: be sure to not advertise <b>fax.your.domain</b> in the DNS...
+This example delegates local mailbox delivery to the transport
+<i>foo</i> as configured in <b>/etc/postfix/master.cf</b>. If you
+follow this route you will build something around the pipe mailer.
+See examples in <b>master.cf</b>.
 
 <hr>
 
-<a name="timeouts"><h2>Mail fails with timeout or lost connection</h2></a>
+<a name="internet-uucp"><h3>Setting up an Internet to UUCP gateway</h3> </a>
 
-Occasionally, mail fails with "timed out while sending end of data
--- message may be sent more than once", or with: "lost connection after DATA". 
-Network outages happen, systems crash. There isn't much you can
-do about it.
+Here is how to set up a machine that sits on the Internet and that
+delivers <i>some</i> but not all non-local mail via UUCP. See the
+<a href="#uucp-only">UUCP-only</a> FAQ entry for setting a UUCP-only
+host.
 
 <p>
 
-However, when you see mail deliveries fail consistently, you may
-have a different problem: broken path MTU discovery.
+<ul>
+
+<li>Specify that mail for, let's say, <i>some.domain</i>, should be
+delivered via UUCP, for example, to a host named <i>uucp-host</i>:
 
 <p>
 
-A little background is in order. With the SMTP protocol, the HELO,
-MAIL FROM and RCPT TO commands and responses are relatively short.
-When you're talking to sendmail, every command and every response
-is sent as a separate packet, because sendmail cannot implement
-ESMTP command pipelining.
+<pre>
+    <b>/etc/postfix/transport</b>:
+        some.domain     uucp:uucp-host
+        .some.domain    uucp:uucp-host
+</pre>
 
 <p>
 
-The message content, however, is sent as a few datagrams, each
-datagram typically a kbyte large or even bigger, depending on your
-local network MTU.
+See the <a href="transport.5.html">transport</a> manual page
+for more details.
 
 <p>
 
-When mail fails consistently due to a timeout, I suspect that the
-sending machine runs a modern UNIX which implements path MTU
-discovery.  That causes the machine to send packets as large as it
-would send over the LAN, with the IP DONT'T FRAGMENT bit set,
-preventing intermediate routers from fragmenting the packets that
-are too big for their networks.
+<li>Execute the command <b>postmap /etc/postfix/transport</b> whenever
+you change the <b>transport</b> file.
 
 <p>
 
-Depending on what network path a message follows, some router on
-the way responds with an ICMP MUST FRAGMENT message saying the
-packet is too big. Normally, the sending machine will re-send the
-data after chopping it up into smaller pieces.
+<li>Enable <b>transport</b> table lookups:
 
 <p>
 
-However, things break when some router closer to the sending system
-is dropping such ICMP feedback messages, in a mistaken attempt to
-protect systems against certain attacks. In that case, the ICMP
-feedback message never reaches the sending machine, and the connection
-times out.
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        transport_maps = hash:/etc/postfix/transport
+</pre>
 
 <p>
 
-This is the same configuration problem that causes trouble with
-web servers behind a misconfigured packet filter: small images/files
-are sent intact, large images/files time out because the server
-does not see the MUST FRAGMENT ICMP feedback messages.
+Specify <B>dbm</b> instead of <b>hash</b> if your system uses
+<b>dbm</b> files instead of <b>db</b> files.
 
 <p>
 
-Workaround: disable path MTU discovery at the sending machine. Mail
-will get out, but of course everyone else will still suffer. How
-to disable path MTU discovery? It depends. Solaris has an <b>ndd</b>
-command; other systems use different means such as <b>sysctl</b>
-to control kernel parameters on a running system.
+<li>Define a mail transport for delivery via UUCP:
+
+<pre>
+    <b>/etc/postfix/master.cf</b>:
+        uucp      unix  -       n       n       -       -       pipe
+          flags=F user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
+</pre>
 
 <p>
 
-Fix: find the router that drops the ICMP MUST FRAGMENT messages,
-and convince the person responsible for it to fix the configuration.
+This runs the <b>uux</b> command, and substitutes the next-hop
+hostname (<i>uucp-host</i>) and the recipients before executing
+the command.  The <b>uux</b> command is executed without assistance
+from the shell, so there are no problems with shell meta characters.
+
+<p>
+
+<li>Add <i>some.domain</i> to the list of domains that your site
+is willing to relay mail for.
+
+<p>
+
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        relay_domains = some.domain $mydestination $virtual_maps ...
+</pre>
+
+<p>
+
+See the <a href="uce.html#relay_domains">relay_domains</a>
+configuration parameter description for details.
+
+<p>
+
+<li>Execute the command <b>postfix reload</b> to make the
+changes effective.
+
+</ul>
+
+<hr>
+
+<a name="uucp-only"><h3>Using UUCP as the default transport</h3> </a>
+
+Here is how to relay all your mail over a UUCP link.  See the <a
+href="#uucp">Internet to UUCP</a> FAQ entry for setting up a machine
+that gateways between UUCP and SMTP.
+
+<p>
+
+<ul>
+
+<li>There is no need for a <b>transport</b> table.
+
+<p>
+
+<li> Specify that all remote mail must be sent via the <b>uucp</b>
+mail transport to your UUCP gateway host, say, <i>uucp-gateway</i>:
+
+<p>
+
+<pre>
+    <b>/etc/postfix/main.cf</b>:
+        relayhost = uucp-gateway
+        default_transport = uucp
+</pre>
+
+<p>
+
+<li>Define a message transport for mail delivery via UUCP:
+
+<p>
+
+<pre>
+    <b>/etc/postfix/master.cf</b>:
+        uucp      unix  -       n       n       -       -       pipe
+          flags=F user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
+</pre>
+
+<p>
+
+This runs the <b>uux</b> command, and substitutes the next-hop
+hostname (<i>uucp-gateway</i>, or whatever you specified) and the
+recipients before executing the command.  The <b>uux</b> command
+is executed without assistance from the shell, so there are no
+problems with shell meta characters.
+
+<p>
+
+<li>Execute the command <b>postfix reload</b> to make the
+changes effective.
+
+</ul>
 
 <hr>
 
-<a name="bind"><h2>Undefined symbols: ___dn_expand, ___res_init etc.</h2></a>
+<a name="fax"><h3>Sending mail to a FAX machine</h3></a>
+
+The following information is by Joerg Henne:
+
+<p>
+Over here we are using the scheme <fax number>@fax.our.domain with Postfix and
+HylaFax. Here's the setup used:
+
+<p>
+
+<pre>
+    <b>/etc/postfix/master.cf</b>:
+        fax       unix  -       n       n       -       -       pipe
+            flags= user=fax argv=/usr/bin/faxmail -d -n ${user}
+
+    <b>/etc/postfix/transport</b>:
+        fax.your.domain   fax:localhost
+
+    <b>/etc/postfix/main.cf</b>:
+        transport_maps = hash:/etc/postfix/transport
+</pre>
+
+<p>
+
+Specify <B>dbm</b> instead of <b>hash</b> if your system uses
+<b>dbm</b> files instead of <b>db</b> files.
+
+<p>
+
+Note: be sure to not advertise <b>fax.your.domain</b> in the DNS...
+
+<hr>
+
+<a name="bind"><h3>Undefined symbols: ___dn_expand, ___res_init etc.</h3></a>
 
 Question: When I build Postfix I get the following errors:
 
@@ -1038,11 +1731,11 @@ Question: When I build Postfix I get the following errors:
 <p>
 
 Answer: you're mixing BIND version 8 include files with a
-different version of the resolver library. 
+different version of the resolver library.
 
 <p>
 
-Fix: use the right include files. For example: 
+Fix: use the right include files. For example:
 
 <p>
 
@@ -1052,7 +1745,7 @@ Fix: use the right include files. For example:
 
 <hr>
 
-<a name="dbm"><h2>Undefined symbols: dbm_pagfno, dbm_dirfno etc.</h2></a>
+<a name="dbm_dirfno"><h3>Undefined symbols: dbm_pagfno, dbm_dirfno etc.</h3></a>
 
 Question: When I build Postfix I get the following errors:
 
@@ -1067,9 +1760,9 @@ Question: When I build Postfix I get the following errors:
 
 <p>
 
-Answer: instead of using /usr/include/ndbm.h, you're building
-Postfix with some incompatible third-party ndbm.h include file,
-typically something in /usr/local/include.
+Answer: instead of using <b>/usr/include/ndbm.h</b>, you're building
+Postfix with some incompatible third-party file, typically
+<b>/usr/local/include/ndbm.h</b>.
 
 <p>
 
@@ -1077,7 +1770,7 @@ Fix: get rid of the third-party ndbm.h include file.
 
 <hr>
 
-<a name="db"><h2>Using DB libraries on Solaris etc.</h2> </a>
+<a name="db"><h3>Using DB libraries on Solaris etc.</h3> </a>
 
 The old <b>dbm</b> UNIX database has severe limitations when you
 try to store lots of information. It breaks when the number of hash
@@ -1090,7 +1783,7 @@ systems.
 
 In order to build Postfix with <b>db</b> support on UNIX systems
 that do not have <b>db</b> support out of the box, you need the
-db-1.85 release, or <a href="http://www.sleepycat.com">the current 
+db-1.85 release, or <a href="http://www.sleepycat.com">the current
 version</a> which has a db-1.85 compatible interface.
 
 <p>
@@ -1099,21 +1792,15 @@ Use the following commands in the Postfix top-level directory.
 The LD_LIBRARY_PATH unset commands may be required to avoid linking
 in the wrong libraries.
 
-<dl>
-
-<dd>% <tt>LD_LIBRARY_PATH= </tt> &nbsp <i>(Bourne-shell syntax)</i>
-
-<dd>% <tt>unsetenv LD_LIBRARY_PATH </tt> &nbsp <i>(C-shell syntax)</i>
-
-<dd>% <tt>make tidy</tt>
-
-<dd>% <tt>make makefiles CCARGS="-DHAS_DB -DPATH_DB_H='&lt;db_185.h&gt;'
--I</tt><i>/some/where/include</i><tt>" 
-AUXLIBS=</tt><i>/some/where/libdb.a</i>
-
-<dd>% <tt>make</tt>
+<p>
 
-</dl>
+<pre>
+    % LD_LIBRARY_PATH=         (Bourne-shell syntax)
+    % unsetenv LD_LIBRARY_PATH (C-shell syntax)
+    % make tidy
+    % make makefiles CCARGS="-DHAS_DB -DPATH_DB_H='&lt;db_185.h&gt;' -I/some/where/include" AUXLIBS=/some/where/libdb.a
+    % make
+</pre>
 
 <p>
 
@@ -1122,10 +1809,11 @@ include directory and of the object library.
 
 <p>
 
-One problem: older DB versions install a file <b>/usr/local/include/ndbm.h</b>
-that is incompatible with <b>/usr/include/ndbm.h</b>. Be sure
-to get rid of the bogus file, or the linker will fail to find
-<b>dbm_dirfno</b>.
+One problem: older DB versions install a file
+<b>/usr/local/include/ndbm.h</b> that is incompatible with
+<b>/usr/include/ndbm.h</b>. Be sure to get rid of the bogus file.
+See the FAQ entry titled "<a href="#dbm_dirfno">Undefined symbols:
+dbm_pagfno, dbm_dirfno etc".
 
 <hr>
 
index 9b518b2a43f9f1039bc26821d912074e491a673e..4f983e8e9d22b661b4ec71c879466c536960f457 100644 (file)
@@ -849,8 +849,9 @@ subdomain under any of the domains listed in <b>$maps_rbl_domains.</b>
 <dt> <b>relay_domains</b>
 
 <dd> This parameter controls the behavior of the <a
-href="#check_relay_domains"> check_relay_domains</a> and <a
+href="#check_relay_domains"> check_relay_domains</a>, <a
 href="#reject_unauth_destination"> reject_unauth_destination</a>
+and <a href="#permit_auth_destination"> permit_auth_destination</a>
 restrictions that can appear as part of a recipient address
 restriction list.
 
index 21b7b33bd81e2367a4513981e76e290a1aa888d0..505186909ced57c2695c3b5d3c0f294bf5bf8599 100644 (file)
@@ -85,12 +85,7 @@ case "$SYSTEM.$RELEASE" in
                ;;
    BSD/OS.4*)  SYSTYPE=BSDI4
                ;;
-   OSF1.V3.*)  SYSTYPE=OSF1
-               # Use the native compiler by default
-               : ${CC=cc}
-               : ${DEBUG="-g3"}
-               ;;
-   OSF1.V4.*)  SYSTYPE=OSF1
+ OSF1.V[3-5].*)        SYSTYPE=OSF1
                # Use the native compiler by default
                : ${CC=cc}
                : ${DEBUG="-g3"}
index 55fa74132cb4ca394dd62f364cb9563c9b5fe4ab..23c110a9a0e38002dabef213fe77061db59eea56 100644 (file)
@@ -962,16 +962,11 @@ static int vrfy_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        smtpd_chat_reply(state, "%s", err);
        return (-1);
     }
-    if (SMTPD_STAND_ALONE(state) == 0
-       && (err = smtpd_check_rcpt(state, argv[1].strval)) != 0) {
-       smtpd_chat_reply(state, "%s", err);
-       return (-1);
-    }
     if ((err = smtpd_check_rcptmap(state, argv[1].strval)) != 0) {
        smtpd_chat_reply(state, "%s", err);
        return (-1);
     }
-    smtpd_chat_reply(state, "250 <%s>", argv[1].strval);
+    smtpd_chat_reply(state, "252 <%s>", argv[1].strval);
     return (0);
 }