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

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Andreas Metzler
Date:  
À: exim-users
Sujet: Re: [exim] adding a header to a message in an ACL, ?even when the condition defers
Josip Rodin <joy@???> wrote:
> I want to do this:


>  warn message = X-Exim-ACL-envelope-sender-verify: failed ($acl_verify_message)
>       !verify = sender/callout=60s


> ...and that's all good, *unless* it defers, in which case I get no header :(


> Adding defer_ok makes the warn verb not run at all, so I get no header
> either.


Hello,
We had talked about this on IRC, Josip wants the header added for both
failed and defered sender callout.

> The docs for add_header (added in 4.61) don't seem to imply any difference
> in this regard.

[...]

There should not be a difference between add_header and message for
this example, indeed.

I had suggested this (well, actually a buggy variant):

warn
set acl_m0 = failedordefered
verify = sender/callout=60s
set acl_m0 = ok

warn
condition = ${if eq{$acl_m0}{failedordefered}{true}{false}}
add_header = X-Exim-ACL-envelope-sender-verify: failed ($acl_verify_message)

I really think[1] this fixed version should work, although you still get
Warning: ACL "warn" statement skipped: condition test deferred: Could
not complete sender verify callout in the logfile.

cu andreas

[1] no way to test without a host that is know to trigger the defer
case.
-- 
The 'Galactic Cleaning' policy undertaken by Emperor Zhark is a personal
vision of the emperor's, and its inclusion in this work does not constitute
tacit approval by the author or the publisher for any such projects,
howsoever undertaken.                                (c) Jasper Ffforde