Re: [exim] adding a header to a message in an ACL, ?even whe…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Josip Rodin
Date:  
À: exim-users
Nouveaux-sujets: Re: [exim] adding a header to a message in an ACL, even when the condition defers
Sujet: Re: [exim] adding a header to a message in an ACL, ?even when the condition defers
On Wed, Nov 29, 2006 at 01:27:17AM +0100, Josip Rodin wrote:
> > > Unfortunately, I can't seem to *get* $acl_verify_message, either.
>
> This sentence from the documentation is a bit puzzling:
>
>     Like "log_message", the contents of "message" are not
>     expanded until after a condition has failed.

>
> That would explain this behaviour - I was trying to get 'warn message' to
> add the header when the condition is met, instead. Should I invert the
> logic?


FWIW, I ended up doing

  warn set acl_m2 = failedordeferred
       verify = sender/callout=60s
       set acl_m2 = ok
  warn !verify = sender/callout=60s
       set acl_m3 = $sender_verify_failure $acl_verify_message
  accept condition = ${if and{ {eq{$acl_m2}{failedordeferred}}{!eq{$acl_m3}{}} } {true}{false}}
         add_header = X-Exim-ACL-envelope-sender-verify: failed - $acl_m3
  accept condition = ${if and{ {eq{$acl_m2}{failedordeferred}}{eq{$acl_m3}{}} } {true}{false}}
         add_header = X-Exim-ACL-envelope-sender-verify: deferred


It's really not pretty, but it works.

-- 
     2. That which causes joy or happiness.