Re: [Exim] Mail Hub - Check aliases but forward to another h…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Mark Hynes
Dátum:  
Címzett: Kevin W. Reed
CC: exim-users
Tárgy: Re: [Exim] Mail Hub - Check aliases but forward to another host
On Apr 18, Kevin W. Reed wrote:
> Exim 3.3X
>
> Is it possible to have mail for the default domain checked against an
> aliases file, but still have it smarthosted elsewhere.
>
> It appears that the only way I can check the systems aliases file is if
> the address is local, but I don't want any local mail to be stored on the
> machine, but rather smarthosted to another box.
>
> If I setup the domain as non-local the smart hosting works, but there is
> no way to check the aliases file.
>
> Example.. for a server with the domain oldco.com, mail would arrive for
>
> oncall-admin@??? the systems aliases file has an entry like:
>
> oncall-admin: person@???
>
> so the result would be mail bound for person@???, that would be sent
> on to the smarthost for the oldco.com domain.


In the past I've kludged things like this by treating the domain (eg oldco.com)
as local so that local domain-only things (eg alias expansion could be done,
then the transport set to be a transport which routes the address via remote
smtp.

Something like:

local_domains = oldcom.com

sample_director:
domains = oldco.com
driver = aliasfile
file = /etc/aliases
search_type = lsearch
transport = sample_transport

with

sample_transport:
driver = smtp
hosts = smarthost.oldcom.com
hosts_override

(Untested, version 3.x)

I'm sure someone will point out though that you might consider
upgrading to Exim 4, where there's no enforced distinction between 'remote'
and 'local' domains, so you can have the same tests / expansions on all
domains and possibly do this in a neater way)

Looking at your config I think you were think along these lines:

> # Tried to do something like below so that if
> # local_domain = oldco.com
> # it would forward to remote_smtp......
> #
> #localuser:
> #    domains = oldco.com
> #    driver = smtp
> #    transport = remote_smtp
> #
> # which of course didn't work.


Hope this helps,
Mark

--
| Mark Hynes           mark.hynes@??? |
| Service Developer   http://www.uk.easynet.net/ |
| Easynet Ltd   --   a part of Easynet Group plc |