the djb way

qmail


aliases with fastforward


Link: http://cr.yp.to/fastforward.html
Version: fastforward-0.51 (1998.05.19, alpha)
Download: fastforward-0.51.tar.gz
MD5 (fastforward-0.51.tar.gz) = 6dc619180ba9726380dc1047e45a1d8d
Build type: djb classic (make setup check)
errno patch: fastforward-0.51.errno.patch

Nothing shouts clueless like an email system setup with cryptic, short user names:

clove@example.org
jimm@example.org

What you want instead are professional-looking, unambiguous email addresses:

courtney.love@example.org
jim.morrison@example.org

This will only take a minute. First, grab, patch and build the fastforward package in the usual make setup check way. The binaries and man pages will be installed inside the /var/qmail hierarchy.

Now edit /etc/aliases and add the aliases you want for your user accounts:


# /etc/aliases
#   alias:      account[,account...]
#   ======      ====================
courtney.love:  clove
jim.morrison:   jimm
kurt.cobain:    kurtc,courtney.love
# etc.

This example illustrates how Courtney may be set up to get copies of messages sent to her late husband. The ordering of entries within the file are not important; qmail/fastforward will be able to sort out the recursive entries, so long as the references are not circular.

Compile /etc/aliases into the cdb database, /etc/aliases.cdb, with fastforward's newaliases utility:

# /var/qmail/bin/newaliases

Then, make this entry into /var/qmail/alias/qmail-default:

# cd /var/qmail/alias
# echo "| fastforward -d /etc/aliases.cdb" > .qmail-default

You're done! Now ask your users to update the configuration of their email software to use the shiny new aliases.

[Note: if your users are recalcitrant, set up a qmail-ofmipd service and control return-path addresses from the server itself.]

Here's how it works: user alias is qmail's user of last resort, and /var/qmail/alias/.qmail-default is the dot-qmail file of last resort for user alias. So, when qmail gets here, it runs fastforward to take another shot at finding a delivery destination in the database /etc/aliases.cdb.

Just remember to re-run /var/qmail/bin/newaliases anytime you change /etc/aliases!

Anytime you want to check what fastforward is thinking when it sees /etc/aliases.cdb, just use the printforward utility:

$ /var/qmail/bin/printforward < /etc/aliases.cdb
courtney.love@:
, &clove@mailhub.example.org
;
jim.morrison@:
, &jimm@mailhub.example.org
;
kurt.cobain@:
, &courtney.love@mailhub.example.org
, &kurtc@mailhub.example.org
;

Note: the output of printforward(1) seen here is the same format used as input for setforward(1), djb's alternative syntax specification for building an aliases database.


Copyright © 2002, 2003, 2004 Wayne Marshall.
All rights reserved.

Last edit 2004.02.27, wcm.