Re: [exim] Convincing Exim to use Sendmail's mailertable

Top Page
Delete this message
Reply to this message
Author: Jakob Hirsch
Date:  
To: Odhiambo WASHINGTON, exim-users@exim.org
Subject: Re: [exim] Convincing Exim to use Sendmail's mailertable
Quoting Odhiambo WASHINGTON:

Please keep list traffic on the list!

> That worked great! Thank you very much. Now just one hurdle remains -
> to get a list of local_domains and relay_to_domains from that
> mailertable.
>
> Is there an easy/simple way (within Exim itself) of differentiating
> between domains similar to domain1.com and those similar to domain2.com
> in terms of the layout of the mailertable (reproduced below)?
>
> domain1.com     esmtp:hostx.domain.name
> domain2.com     esmtp:[111.222.111.222]

>
> Those matching a line similar to domain1.com become my +local_domains
> while the other batch becomes my +relay_to_domains..
>
> After going over this, Sendmail is being shut down ;)
>
> Thank you for your time.


You are welcome.

But what do you mean by "similar"??

If you mean subdomains, like sub1.domain1.com, uk.domain2.com etc., you
could use the partial matching lookups (chapter 9.7), e.g.
partial()lsearch;/etc/mail/mailertable. But how should exim know which
entries you want in local_domains and which in relay_domains? So that
probably does not help you much.

If you simply want all entries in mailertable to be in relay_domains,
use lsearch;.../mailertable there.

If you want subdomains of domain1 in local_domains, all subdomains of
domain2 in relay_domains, and both checked against mailertable, it's
going to be more complicated and ugly:

local_domains = ... : \
${if match_domain {$domain}{domain1:*.domain1} \
{lsearch;.../mailertable}}

(and the corresponding for relay_domains and domain2)

Don't know if this will work, though, so you have to test yourself.