[Mailman-Users] Additional questions about ban_list
Aditya Jain
aj at adityaj.in
Tue Oct 6 19:43:47 CEST 2015
Hi Chris,
On Tuesday 06 October 2015 08:37 PM, Chris Nulk wrote:
> Hello all,
>
> I have been loosely following the discussion regarding regex in the
> ban_list attribute. I now find myself being asked to create a list
> which will most likely use the ban_list attribute. So, I have a few
> questions.
>
> 1. The ban_list attribute is to help prevent unwanted people from
> subscribing to a list, however, I want to restrict who can subscribe
> to the list and ban anyone else. I have the regex for who I want to
> allow to subscribe but there isn't an allow_list attribute. Is there
> an easy way of allowing a regex to control who is able to subscribe?
> Or, is there a way to easily invert the regex logic and use it in
> ban_list? As an example (not the real regex), say I want to only
> allow @gmail.com to subscribe to the list but no one else.
You can use ban_list to accomplish this. You just have to revert the
matching criteria. For example if you want to allow only example.org and
example.com you can use the following regex
^[^@]+@(?!(.*\.)?example\.(org|com)$)
Regards
Aditya Jain
More information about the Mailman-Users
mailing list