Re: [Mailman-Users] Limit list subscribers by domain

2008-08-29 Thread Barry Finkel
David Slater [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
Argonne, IL   60439-4828 IBMMAIL:  I1004994

--
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Users] Limit list subscribers by domain

2008-08-29 Thread Mark Sapiro
Barry Finkel wrote:

David Slater [EMAIL PROTECTED] 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 [EMAIL PROTECTED]The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9