[EXIM] Exim configuration

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Toralf Lund
Dátum:  
Címzett: exim-users
CC: toralf
Tárgy: [EXIM] Exim configuration
Having grown tired of all the problems associated with sendmail, I am
now trying to set up an Exim configuration to replace it. Although Exim
is clearly easier to configure than sendmail, everything is not entirely
straight forward. Some of the issues I have come across are described
below. Please give comments and suggest improvements!

Re-write rules
--------------
I am using the following rule to strip off the host name portion of the
sender address. (Valid aliases for our domain are "kscanners.no",
"kscanners.com", "advim.no" and "advim.com".)

^(.*)@.*(kscanners|advim)\.(com|no)$ $1@$2.$3 fsr

It appears to work as expected, but I don't like specifying the domain
name explicitly all over the file as I know by experience that this will
cause inconsistencies sooner or later. I would definitely prefer to use
$local_domains or similar on the left-hand-side, but haven't been able
to figure out how to "match into" a colon separated list. An alternative
would be to to have a common source for the re-write rules and
local_domains, but I'm not quite sure how to set up this, either.

local_domains is currently defined as

kscanners.no:kscanners.com:advim.no:advim.com:*.kscanners.no:*.kscanners.com:*.advim.no:*.advim.com

I'm not sure if the "*." bits ought to be there, though.

Actually, I think the "strip host name" functionality and also a
local_domains list similar to the one above (whose contents may easily
be derived from the network configuration files/NIS maps or DNS) should
be the default, but that's just me.


Full Name Matching
------------------
Sendmail optionally matches the "user" part of the address against the
GECOS field as well as the user id. To provide a similar functionality,
I have defined the following smartuser and custom transport:

smartuser:
driver = smartuser
transport = call_mail

call_mail:
driver = pipe
user = root
use_shell = true
group = mail
command = /bin/mail -s -d "`/usr/bsd/finger ${local_part} | grep
'Login name' | cut -d' ' -f3`"
return_output

The trick here is that "finger" provides a similar GECOS matching to the
one of sendmail.

I don't like this solution, though, as I think this mapping should be
done internally. Actually, I'm not really utilizing the localuser driver
at all with this setup.


Aliases
-------
Neither of the search types for system_aliases seem to match the lookup
employed by sendmail, which will always consult /etc/aliases or similar,
but include data from NIS if a NIS include directive (+:+) is
encountered.


Null Config
-----------
I also want to set up some hosts with a "null config", i.e. let them to
forward everything to a "mail HUB", but I am not quite sure how to do
this. I haven't studied the documentation closely in this respect,
though.

Ideally, I want all hosts to use the same configuration file, and let
this decide whether to deliver mail directly or to forward it, e.g. by
consulting the MX records and/or testing the connection to the HUB.

--
- T. Lund

--
*** Exim information can be found at http://www.exim.org/ ***