Re: [exim] RCPT ACL & local_parts

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Phil Pennock
Datum:  
To: Franz Georg Köhler
CC: exim-users
Betreff: Re: [exim] RCPT ACL & local_parts
On 2011-02-07 at 19:33 +0100, Franz Georg Köhler wrote:
> I'm currently trying to reject mails that have specific, multiple local
> parts and I wonder how to use multiple local_parts that are not used
> alternatively?
>
>
> While this matches any specified user:
>
>  deny    message       = Message refused
>          local_parts   = user1 : user2
>          domains       = example.net

>
>
>
> This could work if exim accepted two local_parts statements :-)
>
>
>  deny    message       = Message refused
>          local_parts   = user1
>          local_parts   = user2
>          domains       = example.net


No, if that were supported it would be identical to the first part.

The RCPT ACL is invoked for each RCPT and local_parts matches the
address given in *this* RCPT only.

Keep track of the addresses, building up in an $acl_m_... variable; or
set a flag variable when the first such address is encountered and take
action when you see the second address, if the flag variable it set
true.

You can initialise state in the acl_smtp_connect ACL and just use the
$acl_m_... variables, which are yours to define and exist for the
lifetime of the message.

Alternatively, you can use $recipients but not in RCPT itself. Perhaps
we should revisit this, and let $recipients build up across RCPT calls.
To use this, you'd ideally use it in the acl_smtp_predata but you'd
probably then hit all the clients that don't actually deal with the DATA
command being rejected, so you might choose acl_smtp_data instead.

-Phil