Circa 2000-Aug-16 12:04:50 +0200 dixit Miros/law `Jubal' Baran:
: I plan to switch from sendmail to exim on my servers. In sendmail
: configuration I use aliases-based address rewriting, which takes data
: from /etc/mail/aliases to rewrite adresses (from the form
: `shorty@???' to the form `Namely.Short@???').
: I like the way exim rewrites the adresses, but is it possible _not to
: double_ this data (one in aliases, `Namely.Short: shorty', the second
: for rewriting lookups: `shorty: Namely.Short')
I would suggest using /etc/mail/aliases as the single source of the
information, and generate either dbm or cdb lookup tables from that
using awk, perl, or your favorite glue or scripting tool. That is:
- /etc/mail/aliases contains 'shorty: Namely.Short'.
- /usr/sbin/newaliases is a script which generates
/etc/mail/aliases.cdb (mapping 'shorty'->'Namely.Short') and
/etc/mail/rewrites.cdb (mapping 'Namely.Short'->'shorty').
- exim uses a search_type of 'cdb' in the system_aliases director,
and uses a cdb lookup in the rewrite configuration section of
exim.conf.
This gets you fast alias and rewrite lookups, and allows you to
maintain the mapping in one place.
Now, of course, you get to ask yourself what you do for aliases that
you don't want to rewrite, or for other local parts that you do want to
rewrite....
--
jim knoble | jmknoble@??? |
http://www.jmknoble.cx/