[Exim] How to distinguish between one and multiple recipient…

Inizio della pagina
Delete this message
Reply to this message
Autore: Oliver Egginger
Data:  
To: exim-users
Oggetto: [Exim] How to distinguish between one and multiple recipients within an ACL statement?
Hello,

we use Exim 4.24 with the Exim-ACL-Patch. We do different tests for
incomming emails (virus check, sender callback, ...). Some of our users
don't want such tests, also we exclude them from the tests by adding the
following lines in the RCPT ACL of the Exim configure file:

accept  recipients = +no_checks_addresses
    set acl_m1 = accepted


The list "+no_checks_addresses" yields the addresses of all relevant
people. So far so good. But there is one problem. If a message arrives
and this message has multiple recipients and one of the recipients is in
the "+no_checks_addresses" list, the message will be accepted, no checks
will be made for this message. This is unwanted. We want that a message
is accepted if and only if the message has exactly one recipient address
in the envelope and this address is in the "+no_checks_addresses" list.
In all other cases the message shouldn't be accepted by the ACL
statement.

I temted to write a condition based on $recipients and
$recipients_count, but the documentation says that $recipients is
recognized only in the system filter file. At the moment I'am at a loss
with this problem. How to distinguish between one and multiple
recipients within an ACL statement? Every hint would be appreciated.

regards
oliver