Re: [exim] message / log_message from sub ACLs

Pàgina inicial
Delete this message
Reply to this message
Autor: Chris Edwards
Data:  
A: exim-users @ exim. org
Assumpte: Re: [exim] message / log_message from sub ACLs
On Tue, 12 Apr 2005, Jeremy Harris wrote:

| Chris Edwards wrote:

|
| > OK - so I've put message and log_message first now, but nothing is logged.
| >
| > To recap, this is, a sub-acl returning "deny"
|
| That's your problem.


Don't think so. I think I'm actual after some sort of expansion variable
which doesn't exist...

Reading about nested or "sub" ACls in section 39.20:

"The named or inline ACL is run. If it returns 'accept' the
condition is true; if it returns 'deny' the condition is false."

That is, a deny in the sub-acl doesn't necessarily mean the mail is
denied. It simply means the calling condition is false.


| Then see if logwrite fits your needs.


Sadly no. We want to call the acl_check_spam from either a deny verb and
also a warn verb, according to the users perference. In the spam-hater
case, we'd get two entries in the log - the output from logwrite and also
the normal message written by the deny. And in the spam-lover case, it
wouldn't enable us to detailed warning header.

Basically, everything works fine if we forgo that detail, with this
top-level ACL:

  deny 
    <spam-hater condition>
    !acl = acl_check_spam


  warn
    log_message = RCPT time checks detect spam
    message = X-GLA-Warning: RCPT time checks detect spam
    <spam-lover condition>
    !acl = acl_check_spam


but it would be nice to have a way to get at the message and/or
log_message setup when the sub ACL terminated, and hence do something in
the top-level ACL along the lines of:

  warn
    log_message = $nested_log_message
    message = X-GLA-Warning: $nested_message
    <spam-lover condition>
    !acl = acl_check_spam



--
Chris Edwards, Glasgow University Computing Service