Re: [exim] conditional email forwards to another host

Top Page
Delete this message
Reply to this message
Author: Jasen Betts
Date:  
To: exim-users
Subject: Re: [exim] conditional email forwards to another host
On 2019-11-12, Lars Schimmer via Exim-users <exim-users@???> wrote:

> Hi!
>
> I need a little help, mostly for security.
> I do run a exim4 host (debian), and I want to forward all emails
> incoming for 3-5 Emails to another host (NOT a different domain)
>
> As far as I understand it, I need:
> - transport fo the 2nd host
> - router which routes the email to the transports
>
> Has anyone a example for such a router wiht a condition?
> Mostly I do not want to experiment with a live server...
>
> thank you.
>
> MfG,
> Lars Schimmer


easiest is to actually use another domain and just forward the emails using
~/.forward or /etc/aliases


else you create a manualroute router that matches your domain and
the apropritat local_parts and routes them to the destination server.


a router something like this:


  these_go_elsewhere:
    driver = manualroute
    domains = example.com
    local_parts = mailbox1 : mailbox2 : mailbox3
    route_list = * elsewhere.example.com
    transport = remote_smtp


add it to the routers section of the configuration before the routers for local delivery.



--
When I tried casting out nines I made a hash of it.