OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Local delivery for some aliases, forward for all other recipients

From: mouss (usebsdfree.fr)
Date: Thu Feb 02 2006 - 12:40:26 CST


Kilian CAVALOTTI a écrit :
> On Wednesday 01 February 2006 18:53, mouss wrote:
>
>>- *host.example.com. just define this domain as a relay domain (do not
>>put it in mydestination nor in virtual_mailbox_maps. just in
>>relay_domains. Then either set up a DNS MX entry for host.example.com or
>>use a transport entry.
>
>
> I don't have any control on the DNS zone, but even if I had (correct me if I'm
> wrong), a mail sent to anyuserhost.domain.tld would be forwarded to the
> relayhost (according to either the MX record or the transport directive), but
> then, as host.domain.tld is not in the mydestination directive of the
> relayhost, it will be resent to host.domain.tld, beginning an endless loop,
> won't it? There has to be some rewriting in the process to avoid such a loop.
>

there are two ways to route mail: dns or explicit routes. If you don't
control dns, then setup transport entries. of course, the next hop must
accept mail. if it doesn't accept it as it is, consider using virtual
aliases to rewrite the recipient before relaying.

> And moreover, on host.domain.tld, if I only list host.domain.tld in
> relay_domains and not in mydestination, I'll never be able to locally receive
> mail sent to scripthost.domain.tld, right?
>

No (you're wrong). "user rules dominate domain rules". if you say "mail
for fooexample.com should do this and that", we don't care if
example.com is listed in relay_domains, has an MX or whatever.