Autor: Lena Data: A: exim-users Assumpte: Re: [exim] Decide what router to use according to the from field
> From: Red Blue
> 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
$h_* variables are available only after header and body are transmitted,
i.e. in acl_smtp_data. When acl_smtp_mail is exectuted, header and body
weren't transmitted yet.
Routers are executed for the first time in the verify mode
when acl_smtp_rcpt says "verify=recipient",
also before transmission of header and body.