Version ID: $Id: dialup.html,v 0.5 2004/03/27 16:15:25 emma Exp $
This documentation bears information on how to solve some common Postfix setup problems. After it has stabilized, I will offer it for inclusion into Postfix.
Back-up your configuration and mail directories before changing anything so as to be able to quickly revert to your configuration in case the modified fails.
Consider using RCS or CVS (or other revision control systems) to keep old versions of your configuration files.
Postfix is a stable, fast and secure Mail Transfer Agent for Unix. It is developed by Wietse Venema for IBM and freely available.
This document is currently still incomplete and under development, this, it may change often. I really appreciate feedback, be it that you have success with older versions, that it does not work for you or whatever else. See the end of this document for my mail address.
Note this document assumes you are running a Postfix version no older than 20010228-pl05. Type /usr/sbin/postconf mail_version to find out.
The paths to configuration files and programs shown below are quite common, but may differ from your setup. It is expected you adjust the paths according to your setup.
Depending on your system software, you need to adjust your
configuration maps, usually hash vs.
dbm. See postmap(8) for details.
It is expected that Postfix works properly while you are online.
Imagine you have a small LAN set up with an intermittent (dial-up) Internet link. You want your external mail be sent out only when you are online, but local mail be sent immedately via SMTP. (This documentation does not apply if your Postfix mail server is to catch and locally deliver all your mail).
Documentation you are expected to have read through:
html/rate.html: Always
postponing deliveryhtml/faq.html: Running
Postfix inside an intranethtml/faq.html: Running
Postfix on a dialup machinehtml/faq.html: Delivering
some users locally while sending mail as user@domainLines in bold are file names which need to be modified according to succeeding lines.
/etc/postfix/master.cf
hold unix - - - - - smtp
hold and that it is always to be deferred:
/etc/postfix/main.cf
default_transport=hold
defer_transports=hold
/etc/postfix/main.cf
transport_maps = XXXX:/etc/postfix/transport
IMPORTANT: replace XXXX by your default map type, usually hash (if your system has db) or dbm. FIXME: figure if regexp or pcre maps are legal here
In that file, list your local machines or your domain like this, replacing your actual host/domain names.
/etc/postfix/transport
thishost.my.domain local:
localhost.my.domain local:
.my.domain smtp:
another.host.in.my.lan smtp:
yet.another.host.without.dns smtp:[10.11.12.13]
See the Intranet section in the FAQ and the
transport(5) for details on the configuration
file format. Do not omit the local: entries or you will not
be able to receive mail. See the FAQ.
postmap XXXX:/etc/postfix/transport
/etc/ppp/ip-up
/usr/sbin/postfix flush
/etc/ppp/ip-up
/usr/sbin/postconf -e defer_transports=
/usr/sbin/postfix reload
/etc/ppp/ip-down
/usr/sbin/postconf -e defer_transports=hold
/usr/sbin/postfix reload
/etc/ppp/ip-up
/usr/sbin/postconf -e disable_dns_lookups=no
/usr/sbin/postfix reload
/etc/ppp/ip-down
/usr/sbin/postconf -e disable_dns_lookups=yes
/usr/sbin/postfix reload
Of course, you will only need to run postfix reload after the last postconf line in a file, not per each.
This document is subject to Federal German and Northrhine-Westphalian laws. Here are the important summaries:
This document may be integrated into Wietse Venema's Postfix project as long as that software conforms to the Open Source Definition.
This document may also be redistributed when unaltered by proxies. Lossless compression with unpatented algorithms and transmission of differences against older versions with unpatented algorithms shall not be considered alteration.
If you have any other needs, let me know and I'll see if I can do something about it.
$Log: dialup.html,v $ Revision 0.5 2004/03/27 16:15:25 emma Add missing postfix reload, reported by Georg Baum. Thanks! Revision 0.4 2003/07/08 18:24:57 emma Remove cruft, update to HTML 4.01 + CSS. Revision 0.3 2002/02/19 15:40:33 emma Mark postfix flush/sendmail -q as mandatory. Revision 0.2 2001/10/03 11:30:38 emma Fix link to OpenSource definition. Mention 20010228-pl05 as required version, because 19991231 is unmaintained.