--
On Mon, Sep 22, 2003 at 09:57:58PM +0000, Markus Fischer wrote:
> If local users (joe, frank) exist on a system "mydomain.com",
> they'll get emails for joe@??? and frank@??? .
> When I'm now going to configure exim4 to handle other domains local
> too, e.h. "anotherdomain.com", automatically, joe@???
> and frank@??? will work because anotherdomain.com is
> local and joe and frank are local users.
I see. Here's how I do it. I'll assume you are using the Debian
update-exim4.conf system (you mentioned using Debian in the other
email).
cd /etc/exim4/conf.d
cat > main/00_local_domains_macros
domainlist localhost_aliases = localhost:mydomain.com:host.mydomain.com
domainlist virtual_domains = dsearch; /etc/mail/virtual
^D
# In main/01_exim4-config_listmacrosdefs, replace the line
# domainlist local_domains = DEBCONFxxxxxxxDEBCONF
# by
# domainlist local_domains = +localhost_aliases:+virtual_domains
cd router
# Add a line "domains = +localhost_aliases"
# to all "local" routers (400_exim4-config_system_aliases,
# 300_exim4-config_real_local, 600_exim4-config_userforward,
# 700_exim4-config_procmail, 800_exim4-config_maildrop,
# 900_exim4-config_local_user)
cat > 950_local_virtual
virtual:
driver = redirect
domains = +virtual_domains
data = ${lookup{$local_part}lsearch{/etc/mail/virtual/$domain}{$value}}
^D
Voila, that's the basic. My config is orders of magnitude more
complicated because I do more stuff, so I might have done some errors
in the simplification (1). Caveat Administrator.
(1) Things like storing the email-to-smartlist-list-name mapping, all
emails have optional suffixes, automatic handling of Mailman
lists, I permit wildcards in per-domain alias files, I permit
defer, filters, pipes, delivery-to-file and fail in per-domain
alias files, I enforce at the exim.conf level that postmaster@,
hostmaster@, etc get to me (and optionally the user), users can
defer all mail going to the domain to avoid the race condition of
their editing the per-domain aliases file by creating a special
"lock" file, ... Oh god, I love exim's flexibility :)
--
Lionel
--
Content-Description: Digital signature
[ signature.asc of type application/pgp-signature deleted ]
--