Roy Coates wrote:
> Hi,
> I'm not a mail guru by any stretch of the imagination but am faced with
> handling mail for several different domains on a small debian linux
> server.
>
> With exim 3 this worked without problems but with the newer exim 4.5
> (heavy) I'm stumped. I've googled until my eyes bleed and have checked
> the list archives without much success.
>
> I've applied the most often recommended solution with an alias file for
> each domain in /etc/exim4/virtual and added the driver. Local e-mail is
> delivered fine, but where an alias refers to an off-site address, it fails
> as undeliverable.
>
> Also, if a domain has an alias line vis:
>
> dave: dave@???
>
> and there's also a _local_ user called dave, all emails will be routed to
> the local user.
>
> Can anyone point me at a definitive solution for multiple domains and
> alias files please?
IF you are using the Debian distro as-issued, you should probably go over to
their 'bespoke' support list.
The configuration is substantially different from vanilla Exim.
If NOT .. AND you have a system/aliases router similar to:
# ROUTE_3C ALIAS: Handle legacy-style 'system' aliases in '/etc/aliases' file.
#
system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}
user = exim ## or whatever
group = mail ## or whatever
file_transport = address_file
pipe_transport = address_pipe
THEN change it to:
# ROUTE_3C ALIAS: Handle legacy-style 'system' aliases in '/etc/aliases' file.
#
system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/{$domain}/aliases}}
user = exim ## or whatever
group = mail ## or whatever...
file_transport = address_file
pipe_transport = address_pipe
(untested... check the parens and such)
IOW - make a per-domain alias file in subdirs under /etc/
Ex:
/etc/domain_1/aliases
/etc/domain_2/aliases
.
.
/etc/domain_n/aliases
- Caveat: Can be a bit of a PITA to admin.
ELSE - place the users in question into a virtual user db or whatever sort you
are using for other users in general, and keep the /etc/aliases file dirt-simple.
FWIW: - even our 'postmaster' accounts are in a DB.
> -------------------------------------------------------------------------------
> Lord, If I must have an instrument failure, please let it be the Hobbs meter.
> -------------------------------------------------------------------------------
Amen to that!
Bill