Re: [Exim] redirecting e-mails for local domains to another …

Top Page
Delete this message
Reply to this message
Author: Greg Ward
Date:  
To: exim-users
Subject: Re: [Exim] redirecting e-mails for local domains to another smtp, on another port. (not local_delivery)
On 23 June 2002, Lukasz Karbowski said:
> i'm sending e-mails via exim's command line, exim is not running as
> daemon. all i want is filter, that checks the recipient,
> if it has a domain name that is the local domain, then
> redirects message to another smtp running on some port as daemon.
> ofcourse if the recipient doesn't have domain name that matches with
> local domains, then the mail is send via remote_smtp.


Repeat after me: The system filter is not for routing. Routers are for
routing.

You need a router that activates when the conditions you specified are
true, and then passes the message to a transport that does what you
want. Eg. in the routers section of your config file:

  funky_local_router:
    driver = manualroute
    domains = +local_domains
    transport = remote_smtp_alt_port
    route_list = * local.mail.server byname


and in the transports section:

  remote_smtp_alt_port
    driver = smtp
    port = 2525  # or whatever


That assumes you have a domain list called local_domains defined, of
course. Completely untested, YMMV, if it breaks you get to keep both
pieces, etc.

        Greg
--
Greg Ward - software developer                gward@???
MEMS Exchange                            http://www.mems-exchange.org