Re: [exim] Decide what router to use according to the from f…

Top Page
Delete this message
Reply to this message
Author: Red Blue
Date:  
To: exim-users@exim.org
Subject: Re: [exim] Decide what router to use according to the from field

I am pasting below my router and my acl configs. What I am trying to accomplish is to use the send_via_ses router only if the envelope from field belongs to a local domain.

For some reason, the router is being ignored even when the from field belongs to a local domain.

I have tried to use that acl condition to acl_smtp_rcpt and acl_smtp_data as well but I got the same behavior.

Any ideas on what's wrong?

router:

send_via_ses:
driver = manualroute
domains = ! +local_domains
transport = ses_smtp
route_list = * email-smtp.us-west-2.amazonaws.com;
condition = ${if eq{$acl_m_use_ses}{1} {yes}{no}}


ACL:

acl_smtp_mail:
    warn
       condition = ${if or{\
        {match_domain{${domain:$h_From:}}{+local_domains}}\
        {match_domain{$sender_address_domain}{+local_domains}}\
        }{yes}{no}}
       set acl_m_use_ses=1





On Friday, July 11, 2014 2:03 AM, Jeremy Harris <jgh@???> wrote:



On 10/07/14 21:54, Red Blue wrote:

> I opened a thread on ServerFault regarding an issue with Amazon SES and cPanel. In short, when I have an email forwarder set up on cPanel, and the server receives an email going to that email forwarder, exim tries to use Amazon SES as the router but Amazon ultimately refuses to deliver that mail due to the From field being from an unverified email address.
>
> The thread is located here:
> http://serverfault.com/questions/604993/how-to-setup-exim-to-check-the-from-field/605276
>
> I'm still having issues with my configuration so I decided to post my issue here.
> How can I configure exim to use a different router if the From field doesn't belong to one of the local domains?


1)  What is your router difference intended to do?  You may be better
off rejecting in ACL, either MAIL or RCPT, if rejection is your intent.

2) Are you asking about the envelope from or the header from?

3) Both the above are available as variables, which can be tested
in conditions, and all routers can have an arbitrary condition.
The docs are at
  http://exim.org/exim-html-current/doc/html/spec_html/index.html

--
Cheers,
  Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/