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

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Todd Lyons
Ημερομηνία:  
Προς: rblue
Υ/ο: exim-users
Αντικείμενο: Re: [exim] Decide what router to use according to the from field
On Tue, Jul 22, 2014 at 8:37 PM, rblue <rblue117@???> wrote:
>
> acl_smtp_data:
>     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


I would combine them:

set acl_m_use_ses = ${if or{\
         {match_domain{${domain:$h_From:}}{+local_domains}}\
         {match_domain{$sender_address_domain}{+local_domains}}\
         }{1}{0}}


> send_via_ses:
> driver = manualroute
> transport = ses_smtp
> route_list = * email-smtp.us-east-1.amazonaws.com;
> condition = ${if eq{$acl_m_use_ses}{1} {yes}{no}}
> verify = false
>
> My goal is to only use the send_via_ses router if the From field in the
> header belongs to a local domain.
>
> From what I saw in the debugging messages, the send_via_ses router was
> skipped during the verification process, like you previously said, but it
> was never "rechecked" after the data phase, any ideas why?


Are you sure that it is actually getting to that point where the
variable is processed? Run a sample message through exim -d+all -bh
and see what it prints out. Feel free to use swaks to handle the smtp
conversation part. Here is an example of what I was doing to test a
twitter problem I was seeing:

swaks --pipe 'build-Linux-i386/exim -d+all -bh 205.201.128.129' --ehlo
twitter4.us4.mcsv.net --from
bounce-mc.us3_23284199.312009-rich=example.com@???
--to todd@??? --data $HOME/sample.eml

Have you manually run the From header through the expansion to make
sure that the domain extraction is working?

exim -be '${domain:"Sample Sender" <user@???>}'
exim -be '${domain:<envelope_user@???>}'

...Todd
--
The total budget at all receivers for solving senders' problems is $0.
If you want them to accept your mail and manage it the way you want,
send it the way the spec says to. --John Levine