FYI: warn message and testing in acls -was:[Exim] Is acl_c9 …

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Keith Goettert
Date:  
À: 'Dennis Davis'
CC: exim-users
Anciens-sujets: Re: [Exim] Is acl_c9 available in a system filter?
Sujet: FYI: warn message and testing in acls -was:[Exim] Is acl_c9 available in a system filter?
After "rewiring" my acl to allow me to send data to downstream filters,
I found an interesting complication with ACL's. If you choose to add a
header to the message, you cannot test for it in a subsequent step. The
header appears to not be added to the message until there is an actual
accept (or perhaps deny, but I did not test this). So, the first
example works for adding a header line and accepting the message. The
second will fail since the message has not been accepted (or denied?)
and the header line has not been added yet.

acl_check_data:

# This works

  warn  message = X-command: command
        condition = --some true test--
        set acl_c9 = usercommand


accept condition = ${if def:acl_c9 {true}{false}}

# This does not work

  warn  message = X-command: command
        condition = --some true test--


accept condition = if {def:header_X-command:{true}{false}}

PS.. Dennis, thanks for the rapid reply... Sometimes RTFM works best
with two sets of eyes :-0


-----Original Message-----
From: exim-users-admin@??? [mailto:exim-users-admin@exim.org] On
Behalf Of Dennis Davis
Sent: Thursday, July 24, 2003 9:31 AM
To: Keith Goettert
Cc: exim-users@???
Subject: Re: [Exim] Is acl_c9 available in a system filter?


>From: Keith Goettert <Keith@???>
>To: 'Exim-users' <Exim-users@???>
>Subject: [Exim] Is acl_c9 available in a system filter?
>Sender: exim-users-admin@???
>
>In exim 4.20 there are nine variables that can be set acl_c0 through
>c9. My reading lead me to believe that they were available all the way


>through routing.
>
>Am I wrong?


I believe so...

>If not, why don't I see them in my system filter?


...and this is covered by the last sentence of Section 37.9 of the
reference manual:

As their name suggests, these variables are set only during ACL
processing. At all other times they are empty.

The system filter is run after messages have been received but before
they are delivered. So you are out of the ACL processing mode at this
stage.

If you want to pass information from ACL processing to the system
filter, you can do something like adding in extra headers during the ACL
processing. In the system filter you can pick up the values in these
headers, *remembering* to delete these extra headers. This may seem
clumsy, but it works.

--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
details at http://www.exim.org/ ##