Re: [Mailman-Users] Mac, me, icloud. Many domains one user.

2014-10-15 Thread Peter Shute
We've only got 4 of this type of address out of 1100 subscribers, but I've no 
idea if other lists would be similar.

Is subscribing them all manually with the other two addresses a practical 
option? It would get messy if they unsubscribe, but if two were set to nomail 
it might not be so bad. If you moderate one then you'd have to remember to 
moderate them all.

Peter Shute

Sent from my iPad

> On 16 Oct 2014, at 9:10 am, "Marino Pascal"  wrote:
> 
> Long time lurker, first time poster.
> 
> I have subscribers who subscribed with u...@mac.com and then they try to post 
> from u...@me.com or u...@icloud.com and their mail bounces off 
> course since only subscribers can post.
> 
> I know how to add addresses with the "accept_these_nonmembers Option" but I 
> have quite a few .mac users and I'm wondering if there is a way to 
> treat
> mac.com, me.com & icloud.com as interchangeable.
> 
> http://support.apple.com/kb/ht2623
> 
> Thanks
> Marino Pascal
> --
> Mailman-Users mailing list Mailman-Users@python.org
> https://mail.python.org/mailman/listinfo/mailman-users
> Mailman FAQ: http://wiki.list.org/x/AgA3
> Security Policy: http://wiki.list.org/x/QIA9
> Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
> Unsubscribe: 
> https://mail.python.org/mailman/options/mailman-users/pshute%40nuw.org.au
--
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Mac, me, icloud. Many domains one user.

2014-10-15 Thread Mark Sapiro
On 10/15/2014 12:18 PM, Marino Pascal wrote:
> Long time lurker, first time poster.


Welcome.


> I have subscribers who subscribed with u...@mac.com and then they try to
> post from u...@me.com or u...@icloud.com and their mail bounces off
> course since only subscribers can post.
> 
> I know how to add addresses with the "accept_these_nonmembers Option"
> but I have quite a few .mac users and I'm wondering if there is a way to
> treat
> mac.com, me.com & icloud.com as interchangeable.


I have attached the patch I use. It actually supports more than one set
of equivalent domains. The EQ_DOMAINS list is a list of tuples and each
tuple is a set of domains considered equivalent for list membership tests.

In the patch I have included, there are two sets. The ('mac.com',
'me.com', 'icloud.com') domains you're interested in and ('grizz.org',
'grizzlypeakcyclists.org') which are local equivalent domains.

The patched code works for list members, but not for addresses in
*_these_nonmembers even if those addresses come from another list via an
@listname reference.

There can be other issues in that if the poster's address is not the
actual member's address but an equivalent, the member's options like
'ack' and 'not metoo' aren't honored, but moderation is honored if the
actual member is moderated.

I don't think there's a way to do this short of patching the code.

I have considered making this a feature with configurable equivalent
domains in a future release, but I haven't thought it through.

-- 
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
=== modified file 'Mailman/Handlers/Moderate.py'
--- Mailman/Handlers/Moderate.py2014-06-26 21:52:28 +
+++ Mailman/Handlers/Moderate.py2014-10-15 22:22:57 +
@@ -32,6 +32,20 @@
 from Mailman.Logging.Syslog import syslog
 from Mailman.MailList import MailList
 
+EQ_DOMAINS = [('mac.com', 'me.com', 'icloud.com'),
+  ('grizz.org', 'grizzlypeakcyclists.org'),
+ ]
+
+def check_doms(sender):
+if sender.find('@') < 0:
+return []
+local, domain = sender.split('@')
+domain = domain.lower()
+for domains in EQ_DOMAINS:
+if domain in domains:
+return [local + '@' + x for x in domains if x != domain]
+return []
+
 
 
 class ModeratedMemberPost(Hold.ModeratedPost):
@@ -54,6 +68,13 @@
 for sender in msg.get_senders():
 if mlist.isMember(sender):
 break
+double_break = False
+for sender in check_doms(sender):
+if mlist.isMember(sender):
+double_break = True
+break
+if double_break:
+break
 else:
 sender = None
 if sender:

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

[Mailman-Users] Mac, me, icloud. Many domains one user.

2014-10-15 Thread Marino Pascal

Long time lurker, first time poster.

I have subscribers who subscribed with u...@mac.com and then they try to post from u...@me.com or u...@icloud.com and their mail bounces off 
course since only subscribers can post.


I know how to add addresses with the "accept_these_nonmembers Option" but I have quite a few .mac users and I'm wondering if there is a way to 
treat

mac.com, me.com & icloud.com as interchangeable.

http://support.apple.com/kb/ht2623

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