Re: [Mailman-Users] Limit list subscribers by domain
"David Slater" <dslater@ocln.org> wrote:
Hello -
I want to deny list subscriptions to any user whose email address does not include my domain.
I realize that I can do that by having the list admin approve subscription requests, but I'd prefer to automate the process.
I would hope that a rejection notice would be sent to any person who subscribes and does not have the correct email domain.
Does anyone know how to do this - or is this something that I should submit as a feature / enhancement request?
Use ban_list
^!*.example.com
to prevent all subscriptions that are not from example.com . This regex will allow subscriptions from
@aaa.example.com
Barry S. Finkel Computing and Information Systems Division Argonne National Laboratory Phone: +1 (630) 252-7277 9700 South Cass Avenue Facsimile:+1 (630) 252-4601 Building 222, Room D209 Internet: BSFinkel@anl.gov Argonne, IL 60439-4828 IBMMAIL: I1004994
Barry Finkel wrote:
"David Slater" <dslater@ocln.org> wrote:
Hello -
I want to deny list subscriptions to any user whose email address does not include my domain.
I realize that I can do that by having the list admin approve subscription requests, but I'd prefer to automate the process.
I would hope that a rejection notice would be sent to any person who subscribes and does not have the correct email domain.
Does anyone know how to do this - or is this something that I should submit as a feature / enhancement request?
Use ban_list
^!*.example.com
to prevent all subscriptions that are not from example.com . This regex will allow subscriptions from
@aaa.example.com
That's the right idea except that is not a Python regular expression <http://www.python.org/doc/current/lib/re-syntax.html>. Well, actually, it is valid, but it doesn't do what you want. It matches anything that starts with 0 or more '!' followed by any character followed by 'example' followed by any character followed by 'com' with possible trailing stuff after that.
What you would need to ban addresses not in the example.com domain or a sub-domain thereof is something like
^.*@(?!(.*\.)?example\.com$)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
b19141@anl.gov
-
Mark Sapiro