On 1/29/19 6:55 AM, David Gibbs via Mailman-Users wrote: > > I'm by no means a Python expert (far from it), but I hacked this > together... > > === modified file 'Mailman/Defaults.py.in' > --- Mailman/Defaults.py.in 2018-07-12 03:14:02 +0000 > +++ Mailman/Defaults.py.in 2019-01-29 14:27:59 +0000 > @@ -145,6 +145,11 @@ > # GLOBAL_BAN_LIST = ['xxx@aol\.com', '^yyy.*@gmail\.com$'] > GLOBAL_BAN_LIST = [] > > +# Installation wide DMARC list. This is a list of email addresses and > +# regexp patterns (beginning with ^) that will be treated as if they > +# have a restrictive DMARC policy. Same examples as GLOBAL_BAN_LIST > +GLOBAL_DMARC_LIST = [] > + > # If the following is set to Yes, and a web subscribe comes from an IPv4 > # address and the IP is listed in Spamhaus SBL, CSS or XBL, the subscription > # will be blocked. It will work with IPv6 addresses if Python's > py2-ipaddress
The above is good, but you will have to run 'configure' with appropriate options to propagate that to Defaults.py and then add your actual list by setting GLOBAL_DMARC_LIST in mm_cfg.py. > === modified file 'Mailman/Handlers/SpamDetect.py' > --- Mailman/Handlers/SpamDetect.py 2018-12-01 04:13:12 +0000 > +++ Mailman/Handlers/SpamDetect.py 2019-01-29 14:24:26 +0000 > @@ -110,6 +110,7 @@ > dn, addr = parseaddr(msg.get('from')) > if addr and mlist.dmarc_moderation_action > 0: > if (mlist.GetPattern(addr, mlist.dmarc_moderation_addresses) or > + mlist.getPattern(addr, mm_cfg.GLOBAL_DMARC_LIST) or GetPattern, not getPattern. Otherwise good. > Utils.IsDMARCProhibited(mlist, addr)): > # Note that for dmarc_moderation_action, 0 = Accept, > # 1 = Munge, 2 = Wrap, 3 = Reject, 4 = Discard > -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ 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