Re: [Exim] copy mail according to IP

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Milos Prudek
Data:  
Para: Philip Hazel
CC: exim-users
Asunto: Re: [Exim] copy mail according to IP
> Get the internal mailserver to add a header to the message as it comes
> through:
> headers_add = ${if eq{$sender_host_address}{1.2.3.4}{it-came-from-1.2.3.4:}}
> Then you can simply test for that header.


That's smart! Alas, int.mailserver is an old sendmail on HP-UX and I
wouldn't know how to do it. That's why I switched to exim - it has
excellent docs and support! I'll rather try your regex condition for
Received: headers.

> You can't easily. You would be better off making *.ourdomain.com a local
> domain and processing this with a director rather than a router. Then


Correct. My previous setup was sendmail that was instructed to deliver
locally, and large alias file that forwarded most email addresses to
internal mailserver. I wasn't able to figure out how to copy this setup
in exim, even with local_domains - I always ended up with either
"refused relay (host_accept_relay)" or "** name@int_mailserver.nembv.cz
<name@???>: unrouteable mail domain "int_mailserver.nembv.cz".
Therefore I did it like this:

local_domains = nembv.cz
relay_domains = int_mailserver.nembv.cz
host_accept_relay = localhost:int_mailserver.nembv.cz:ext_gw.nembv.cz

send_to_gateway:
driver = domainlist
transport = remote_smtp
route_list = "*.nembv.cz int_mailserver.nembv.cz byname; *
vitis.bv.anet.cz byname"

... where exim runs on ext_gw. vitis is mailserver of our ISP.

... but I would rather use director setup, if you got any advice?

--
Milos Prudek