Re: [exim] Condition for senders domain for use in a router

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jakob Hirsch
Date:  
À: exim-list
CC: exim-users
Sujet: Re: [exim] Condition for senders domain for use in a router
exim-list@??? wrote:

> I need to add a condition to a router that is triggered by the
> senders domain. I am struggling to find an example in the Wiki and
> the specification. All of the examples for routers seem to be based
> on destination rather than source :-(


See http://www.exim.org/exim-html-current/doc/html/spec_html/ch15.html

You can test for virtually anything with the "condition" option. If you
want to test for a specific domain, you can use
senders = *@example.com

> I have a file called xxx-domains.txt that lists 20-50 domains owned
> by 1 customer. Mail sent by any user at this customer needs to be


Ok, then you're probably better of using "condition", e.g. like

condition = ${lookup {$sender_address_domain} \
              lsearch {/path/to/customer-domains.txt} {yes}}