Will 2.1 have the ability to just completey *drop* posts matching a pattern, instead of holding them for moderation? I've got a couple of lists where Re: posts (replies back to the list) arent allowed; only initial problem messages and then a summary/solution posting.
It would be nice if I could have Mailman just *drop* the Re: posts instead of holding them for moderation; I'd like to avoid having to use Procmail for this...
Bill
-- Bill Bradford mrbill@mrbill.net Austin, TX
"BB" == Bill Bradford <mrbill@mrbill.net> writes:
BB> Will 2.1 have the ability to just completey *drop* posts
BB> matching a pattern, instead of holding them for moderation?
BB> I've got a couple of lists where Re: posts (replies back to
BB> the list) arent allowed; only initial problem messages and
BB> then a summary/solution posting.
General matching against headers with auto-discards probably will not be supported out of the box in MM2.1.
BB> It would be nice if I could have Mailman just *drop* the Re:
BB> posts instead of holding them for moderation; I'd like to
BB> avoid having to use Procmail for this...
No need to use Procmail to add this feature though! Simply add a pipeline module that checks the listname, and for those lists that you want to discard Re: messages, simply search Subject: headers for Re:.
Here's some untested code that might get you close. Note that you'll have to add this module to the GLOBAL_PIPELINE, probably just before Hold.py.
-Barry
------------------- snip snip --------------------Mailman/Handlers/DiscardRe.py import re
from Mailman.Errors import DiscardMessage
# If a list is not mentioned here, we don't even search its Subject: LISTNAMES = [ 'norelist1', 'norelist2', # ... ]
# Compiled regular expression that searches for a literal string "Re:" # matching case insensitively. cre = re.compile(r're:', re.IGNORECASE)
def process(mlist, msg, msgdata): if mlist.internal_name() not in LISTNAMES: return subject = msg['subject'] if subject and cre.search(subject): raise DiscardMessage -------------------- snip snip --------------------
Hello Barry,
On Fri, Jan 04, 2002 at 02:25:37AM -0500, Barry A. Warsaw wrote:
"BB" == Bill Bradford <mrbill@mrbill.net> writes:
BB> Will 2.1 have the ability to just completey *drop* posts BB> matching a pattern, instead of holding them for moderation? BB> I've got a couple of lists where Re: posts (replies back to BB> the list) arent allowed; only initial problem messages and BB> then a summary/solution posting.
General matching against headers with auto-discards probably will not be supported out of the box in MM2.1.
BB> It would be nice if I could have Mailman just *drop* the Re: BB> posts instead of holding them for moderation; I'd like to BB> avoid having to use Procmail for this...
No need to use Procmail to add this feature though! Simply add a pipeline module that checks the listname, and for those lists that you want to discard Re: messages, simply search Subject: headers for
Re:.
This is totally unreliable. Some German-localized MUAs would use "AW:" instead of "Re:"; more exotic prefixes are possible. "Re:" is no more than convention. More reliable way would be to track "References:" and "In-Reply-To:", although I don't see a solution ready.
-- Stay tuned, MhZ JID: mookid@jabber.org
Hubbard's Law: Don't take life too seriously; you won't get out of it alive.
"MZ" == Mikhail Zabaluev <mhz@alt-linux.org> writes:
MZ> This is totally unreliable. Some German-localized MUAs would
MZ> use "AW:" instead of "Re:"; more exotic prefixes are
MZ> possible. "Re:" is no more than convention. More reliable way
MZ> would be to track "References:" and "In-Reply-To:", although I
MZ> don't see a solution ready.
That's fine. This was just prototype code so Bill could get a sense of the general approach.
-Barry
On Fri, Jan 04, 2002 at 12:38:53PM +0300, Mikhail Zabaluev wrote:
This is totally unreliable. Some German-localized MUAs would use "AW:" instead of "Re:"; more exotic prefixes are possible. "Re:" is no more than convention.
Well, now; *that* explains something weird I saw on a list the other day; thanks. :-)
Cheers, -- jra
Jay R. Ashworth jra@baylink.com Member of the Technical Staff Baylink RFC 2100 The Suncoast Freenet The Things I Think Tampa Bay, Florida http://baylink.pitas.com +1 727 647 1274
"If you don't have a dream; how're you gonna have a dream come true?" -- Captain Sensible, The Damned (from South Pacific's "Happy Talk")
participants (4)
-
barry@zope.com
-
Bill Bradford
-
Jay R. Ashworth
-
Mikhail Zabaluev