Re: [exim] deny all mailing list addresses at rcpt

Top Page
Delete this message
Reply to this message
Author: Magnus Holmgren
Date:  
To: exim-users
Subject: Re: [exim] deny all mailing list addresses at rcpt
On fredagen den 12 september 2008, Etienne Le Sueur wrote:
> What I'd like to do, is have a list of closed mailing lists, say
>
>     /etc/exim4/closed_lists_deny_rcpt

>
> which contains say, example-list@???
>
> I'd like an ACL which denies based on RCPT the following addresses:
>
>     example-list@???
>     example-list-subscribe@???
>     example-list-owner@???
>     ...

>
> At the moment, I have:
>
> acl_check_rcpt:
>     deny
>        recipients = ${if exists{CONFDIR/closed_lists_deny_rcpt}\
>                                {CONFDIR/closed_lists_deny_rcpt}\
>                                {}}
>        message = list is closed

>
> This works, but only on example-list@???, not all the others
> associated with the mailman list.
> I tried various combinations of using
>
>         condition = ${if eq
> {$local_part_suffix}{\N^.*-(subscribe|owner...} {yes}{no}}

>
> But I guess since the subscribe/owner/... addresses aren't in the
> closed_lists_deny_rcpt, then the acl is failing at the recipients bit.


It's not entirely clear whether you want to accept the -owner and -subscribe
addresses and only reject mail to the main address, or if you want to reject
mail to all of them, but in any case, $local_part_suffix etc. only works in
routers. In ACLs the recipients condition matches the full address is checked
and $local_part is the entire local part. One suggestion is that you move
some logic to the routers and perhaps use address_data to pass list
closedness info back to the ACL.

-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)


"Exim is better at being younger, whereas sendmail is better for
Scrabble (50 point bonus for clearing your rack)" -- Dave Evans