Re: [exim] Routing mail to a smart host based on the FROM ad…

Pàgina inicial
Delete this message
Reply to this message
Autor: Heiko Schlittermann
Data:  
A: exim-users
Assumpte: Re: [exim] Routing mail to a smart host based on the FROM address
Hello Sebastian,

Sebastian Lohmeier <sebastian@???> (Mi 15 Jul 2009 14:59:41 CEST):
> Hi,
>
> I think it is possible for Exim to route e-mails to smart hosts - SMTP
> servers it authenticates to with username and password (like if it was a
> client).
>
> When I create a special route for these to-be-routed e-mails, is it
> possible to create the route based on the FROM address of the e-mail
> messages rather than based on the recipients addresses?


You could test something like this¹:

  begin routers:
    ...


    smartest:
        driver = manualroute
        route_data = ${lookup{$sender_address_domain}lsearch*{/etc/exim/routes.by-sender}}
        ...



# cat /etc/exim/routes.by-sender
example1.org: relay.for-example1.org
example2.org: relay.for-example2.org
*:            smart.relay.org



¹) not tested, you should think about the "domains = ..." preconditon, the
position of the router in the list of routers, about the wildcard I
used, about "no_more", and more

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann HS12-RIPE -----------------------------------------
 gnupg encrypted messages are welcome - key ID: 48D0359B ---------------
 gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B -