[Pkg-exim4-users] Exim4 with local network as well as smarthost (longish post)
Jeroen van Aart
jeroen at mompl.net
Mon Mar 9 18:59:52 UTC 2009
ael wrote:
> The standard debian exim configurations do not seem to cater
> for a small local network behind a NAT router.
Actually it's not the job of an MTA to do this. I have an instance of
exim setup behind a NAT router and it works flawless (including
spamfiltering and what have you). Just make sure you route port 25 and
whatever else to the proper internal IP. Provided you don't sabotage
yourself...
> Most mail needs to go to an (isp) smarthost with FROM headers
> rewritten. But local mail within the network needs to be delivered
> directly with headers unchanged.
> This already presents a problem to exim4 because, as I understand it,
> envelope rewriting can only be done globally.
I do not know of any rewriting of the headers that needs to be done to
send email within the network as well as to the outside. Beyond that
which the standard exim4-config configurations options may decide upon.
I believe the only thing that might cause a header rewrite is the "hide
machine" name option, but I am not sure.
In your case you might prefer to have the machine name not hidden.
> My local network is small and no single machine is necessarily
> running at all times. Thus a dedicated local network mail machine
That's what I mean by sabotaging yourself, you really should have one
machine intended to run all the time as the mailserver. It's not that
hard. Then configuring exim is rather easy. Exim will do a good job
queuing email and deliver it whenever a machine comes up.
That machine will be the gateway and is configured as an internet facing
mailserver, all other machines are configured to use the gateway machine
as a smarthost for outgoing mail. But those machines could have a local
MTA to submit email to of course. The gateway machine can be told to
route the appropriate incoming emails to the right machine. Based on the
recipient address, i.e. email name at machine1.example.com goes to the
machine named machine1.
But you could also use a central mailstore where people can collect
there email using imap/pop3. In that way they all can use a uniform
email address (name at example.com), where the machine name is left out.
Which I think is a better idea.
> headers when sending to the smarthost. As I understand it, bounce
> messages are sent to the envelope address rather than to the FROM or
As a rule I'd try to avoid any rewriting of headers unless it's really
necessary.
Best regards,
Jeroen
More information about the Pkg-exim4-users
mailing list