Re: [exim] routing logic based on sender and recipient

Góra strony
Delete this message
Reply to this message
Autor: Drav Sloan
Data:  
Dla: Florin Andrei
CC: exim-users
Temat: Re: [exim] routing logic based on sender and recipient
Florin Andrei wrote:
> The mail server is receiving email from several QA machines via
> SMTP, and then delivers it according to various rules.
>
> The logic is this:


[snip]

Exim processes mail in the order specified in the routers section,
most (if not all) of the rules below can be achieved by the ordering
of your routers.

>
> 1. All emails with a sender @boringdomain.com will be routed to the
> Internet as if this was a plain relay, no exceptions, no special
> rules. Basically, I need to punch a clean relay hole through the
> system for these senders. If there's no match here, go to next rule:


router_for_boringdomain:
driver = dnslookup
senders = *@boringdomain.com
transport = remote_smtp
no_more

> 2. All emails with a recipient within a very short list
> (jim@???, joe@???) are delivered locally,
> and will typically be processed by various scripts specified in
> ~/.forward. If there's no match here, then next:


router_for_dot_forwards_fancydomain:
driver = redirect
check_local_user
file = $home/.forward
file_transport = address_file
pipe_transport = address_pipe

you may want to include:

reply_transport = address_reply

> 3. All emails with the recipient @fancydomain.com are to be
> delivered via SMTP to relay1.fancydomain.com. If no match here,
> then:


router_for_fancydomain:
driver = manualroute
domains = fancydomain.com
route_list = * relay1.fancydomain.com

> 4. All other emails will be delivered locally (and then will bounce
> with user not found, and sent to a local account which is the sender
> for these emails, and will get caught by other scripts).


local_delivery:
driver = appendfile
group = mail

Regards

D.