Re: [Exim] How to distinguish between one and multiple recip…

Top Page
Delete this message
Reply to this message
Author: Andreas Metzler
Date:  
To: exim-users
Subject: Re: [Exim] How to distinguish between one and multiple recipients within an ACL statement?
On 2004-02-06 Oliver Egginger <oliver.egginger@???> wrote:
[...]
> We _don't_ want to distinguish between different recipients. The
> question was: How can I distinguish between messages with single and
> multiple recipients within an ACL statement? Not more.

[...]

Keep a counter by using this as first statement in the rcpt ACL:

warn set acl_m0 = ${if eq {$acl_m0}{}{1}{${eval:$acl_m0+1}}}

(acl_m0 contains the number of rcpt commands) or simpler

warn set acl_m0 = ${if eq {$acl_m0}{}{1}{more}}

(acl_m0 is "1" for single recipients, "more" otherwise.)

Be aware that this is inferior to what you requested, it only
counts the number of rcpt to commands and not the number of actually
accepted addresses:

-> MAIL FROM:<>
<- 250 OK
-> RCPT TO:<ametzler@localhost>
<- 250 Accepted
-> RCPT TO:<xxxx@localhost>
<** 550 unknown user
-> DATA

nevertheless acl_m0 is 2.
     cu and- I do copy and paste from swaks -reas
--
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"