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

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Warren Baker
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Convincing Exim to use Sendmail's mailertable
Odhiambo G. Washington wrote:
> Hi Exim geeks & nerds ;)
>
> I am living in hard times, trying to get Exim to use Sendmail's mailertable
> and virtusertables as-is for mail delivery.
>
> Conversion of these files is a no-no at the moment for some reason, so let's
> just say I have to work with them as they are.
>
> There are only two types of entries in the mailertable:
>
> domain1.com    esmtp:hostx.domain.name
> domain2.com    esmtp:[111.222.111.222]

>
> I am trying to see how I can deliver mail using a manualroute router
> I have started by going to the obvious resource (the archives) for clues.
>
> So far I've made some headway, but not quite. I hope the list members will
> be able to help me finalize this either by their own experience or by the
> cool RTFM on chapter X.
>
>
> I am getting the correct value for domain1.com:
>
> me$ exim -be '${lookup{domain1.com}lsearch{/home/wash/mailertable}{${extract{2}{:}{$value}}}}'
> hostx.domain.name
>
> However, for domain2.com,
>
> me$ exim -be '${lookup{domain2.com}lsearch{/home/wash/mailertable}{${extract{2}{:}{$value}}}}'
> [111.222.111.222]
>
> .... the parentheses will make Exim to howl ....
>
>
> artificial_mailertable_route:
>   driver     = manualroute
>   transport  = remote_smtp
>   route_data = ${lookup{$domain}lsearch{/etc/mail/mailertable}\
>                {${extract{2}{:}{$value}}}}

>
> me# exim -bt test@???
> test@??? cannot be resolved at this time:
> lookup of host "[111.222.111.222]" failed in artificial_mailertable_route router
>
> I believe my problem is just how to get rid of the parentheses from the result of the
> lookup.
>
>
>

try use the sg expansion item for example (untested):

exim -be
'${sg{${lookup{domain2.com}lsearch{/root/test}{${extract{2}{:}{$value}}}}}{\\[|\\]}{}}'


later,
Warren