[Mailman-Users] filtering by subject or other headers?
Is there a way I can setup mail filters by subject or other headers (not just by from/recipient)? Spammers often send spam faked as having been sent by my lists. Then I get all sorts of bounces from the actual recipients such as SpamAssassin Identified this message as spam. I'd like to setup a filter rule that says: if the subject line matches a certain string, discard this email and never tell me about it. However, I don't this kind of rule to affect the way other moderation or filter rules work. That is, if I configure mailman to hold all messages from unknown senders, then those not matching the spam filter rule I just described, should be left in the hold queue. Thanks, Erez. -- Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ This message was sent to: [EMAIL PROTECTED] Unsubscribe or change your options at http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] filtering by subject or other headers?
On Sat, Oct 04, 2003 at 11:50:18AM -0400, Erez Zadok wrote: Is there a way I can setup mail filters by subject or other headers (not just by from/recipient)? Spammers often send spam faked as having been sent by my lists. Then I get all sorts of bounces from the actual recipients such as SpamAssassin Identified this message as spam. I'd like to setup a filter rule that says: if the subject line matches a certain string, discard this email and never tell me about it. However, I don't this kind of rule to affect the way other moderation or filter rules work. That is, if I configure mailman to hold all messages from unknown senders, then those not matching the spam filter rule I just described, should be left in the hold queue. I don't see anything that would stop you from processing the incoming e-mails through procmail before they get to mailman. Just change the alias to point to valid user, process the e-mail via procmail and do whatever you want with it, then bounce the result over to the actual list processor if it passes your tests. You could do your virus scanning the same way (although I would think that a callout from the MTA might be better). I don't believe that what you're asking for should be a mailman function. Mailman should primarily be used to quickly get messages into and out the lists - all per-message processing should be handled by outside apps. -- Ed Wilts, Mounds View, MN, USA mailto:[EMAIL PROTECTED] -- Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ This message was sent to: [EMAIL PROTECTED] Unsubscribe or change your options at http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] filtering by subject or other headers?
In message [EMAIL PROTECTED], Ed Wilts writes: [...] I don't see anything that would stop you from processing the incoming e-mails through procmail before they get to mailman. Just change the alias to point to valid user, process the e-mail via procmail and do whatever you want with it, then bounce the result over to the actual list processor if it passes your tests. You could do your virus scanning the same way (although I would think that a callout from the MTA might be better). I don't believe that what you're asking for should be a mailman function. Mailman should primarily be used to quickly get messages into and out the lists - all per-message processing should be handled by outside apps. Thanks Ed. It still doesn't answer my question of whether it is possible for mailman to filter based on regexp matches on any header. Yes, of course I could filter my list's mail before it goes to mailman. First, this requires me to mix its support with other tools such as procmail. It might also make things tricker: how do I prevent direct access to the list's address if someone finds it? (security by obscurity doesn't work in the long run.) And I'll have to ensure that when the mail reaches the list, the headers haven't been munged so much so as to make it difficult to figure out who send that mail and from where. I disagree with you, however, that it is not the place of Mailman to do such filtering. If that would have been the design philosophy for Mailman, then it shouldn't have any filtering based on sender addresses and such. As it stands, Mailman has gotten to do more and more filtering to address spam and such. I'd like to see that trend continued. What I'm asking for is not unreasonable. I'm not asking for Mailman to natively support things like SpamAssassin and MIME-Defang, but I do want it to have a simple way of matching regexp's against any header. Then I have a more powerful and extensible mechanism for filtering based on any header, and at that point it'd be easier for me to filter flexibly. Imagine that I feed all mailman list messages first via spamassassin's spamc tool, just to get it to add the X-Spam-Level header. I'd love to write a Mailman rule that will ignore all mail if x-spam-level matches '**' or such. Cheers, Erez. -- Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ This message was sent to: [EMAIL PROTECTED] Unsubscribe or change your options at http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] filtering by subject or other headers?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Erez Zadok wrote: I'd like to setup a filter rule that says: if the subject line matches a certain string, discard this email and never tell me about it. However, I don't this kind of rule to affect the way other moderation or filter rules work. That is, if I configure mailman to hold all messages from unknown senders, then those not matching the spam filter rule I just described, should be left in the hold queue. Sounds like you're describing the bounce_matching_headers option, from Privacy Options - Spam Filters, except that you want the default action to be discard instead of hold. I don't believe this is possible at the moment, but it seems like it would be a simple thing to add. You could either add another option to the Spam Filters page, perhaps discard_matching_headers, or just an option that toggled whether posts matching bounce_matching_headers were held or discarded. That would be handy to have a on a list by list basis, but there is a site-wide configuration option, KNOWN_SPAMMERS, that you can set in mm_cfg.py which looks to do exactly what you want. You might want to give that a try. One of the comments in the SpamDetect.py file where this spam filtering is done says This needs to be made more configurable and robust. So it's on the list of things that will happen when someone makes time to code it in. - -- ToddOpenPGP - KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp == Revolution, n.: In politics, an abrupt change in the form of misgovernment. -- Ambrose Bierce -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (GNU/Linux) Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl. iD8DBQE/fxlLuv+09NZUB1oRAuNtAKDi7F8fxMDBEDWzWFUhm3TZpwqKJwCg02U2 SuhJ+a0fcm2nAJOFxKiROUk= =EssE -END PGP SIGNATURE- -- Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ This message was sent to: [EMAIL PROTECTED] Unsubscribe or change your options at http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] filtering by subject or other headers?
In message [EMAIL PROTECTED], Todd writes: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Erez Zadok wrote: I'd like to setup a filter rule that says: if the subject line matches a certain string, discard this email and never tell me about it. However, I don't this kind of rule to affect the way other moderation or filter rules work. That is, if I configure mailman to hold all messages from unknown senders, then those not matching the spam filter rule I just described, should be left in the hold queue. Sounds like you're describing the bounce_matching_headers option, from Privacy Options - Spam Filters, except that you want the default action to be discard instead of hold. I don't believe this is possible at the moment, but it seems like it would be a simple thing to add. You could either add another option to the Spam Filters page, perhaps discard_matching_headers, or just an option that toggled whether posts matching bounce_matching_headers were held or discarded. That would be handy to have a on a list by list basis, but there is a site-wide configuration option, KNOWN_SPAMMERS, that you can set in mm_cfg.py which looks to do exactly what you want. You might want to give that a try. One of the comments in the SpamDetect.py file where this spam filtering is done says This needs to be made more configurable and robust. So it's on the list of things that will happen when someone makes time to code it in. - -- ToddOpenPGP - KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp Todd, Yes! That's exactly it. Right now all I can do is hold mails that match certain headers. I like that option for certain cases, but I'd like another (independent) option to completely discard mails that match certain headers. And while we're at it, why only hold or discard? Why not offer the same sets of options available in other places: hold, discard, forward to someone, etc. I don't understand something in your mail, however. You say you could either add... and such, implying that _I_ could do it myself? Do you mean that there is a facility for this already in mailman? Or did you mean that I could always hack the source and add the feature I wanted? If you meant the latter, then I'd prefer if someone more experienced in Python and Mailman's code do it (what'll take me many hours, Barry can probably do in his sleep, with _both_ hands tied behind his back. :-) Erez. -- Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ This message was sent to: [EMAIL PROTECTED] Unsubscribe or change your options at http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] filtering by subject or other headers?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Erez Zadok wrote: Yes! That's exactly it. Right now all I can do is hold mails that match certain headers. I like that option for certain cases, but I'd like another (independent) option to completely discard mails that match certain headers. I see. I think your best bet is to use the KNOWN_SPAMMERS setting then. It's either that or hack mailman yourself (or convince someone else to do it). And while we're at it, why only hold or discard? Why not offer the same sets of options available in other places: hold, discard, forward to someone, etc. True, if it was being added, might as well have the behave as similar features elsewhere in mailman. I don't understand something in your mail, however. You say you could either add... and such, implying that _I_ could do it myself? Sure, why not? :) Do you mean that there is a facility for this already in mailman? Or did you mean that I could always hack the source and add the feature I wanted? Yeah, I meant the latter. If you meant the latter, then I'd prefer if someone more experienced in Python and Mailman's code do it Bah! :) The mailman code is pretty easy to follow, assuming you have a basic knowledge of coding in general. I've hacked mailman to do little things here and there and I'd still say I don't know python. I'd be at a loss to sit down and write a decent python program to do anything, but tweaking something that's already close to what I want seems rather simple. (what'll take me many hours, Barry can probably do in his sleep, with _both_ hands tied behind his back. :-) Maybe so, you're assuming though that a) Barry or one of the other developers will think this feature request is important enough to work on before many others; and b) that Barry sleeps at all. ;-) - -- ToddOpenPGP - KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp == Does it follow that I reject all authority? Perish the thought. In the matter of boots, I defer to the authority of the boot-maker. -- Mikhail Bakunin -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (GNU/Linux) Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl. iD8DBQE/fyV6uv+09NZUB1oRAjeNAKDkK6+PgIw3kulywAQsl+LdFh//MwCg1/RU Bfj6KveHjVtduErFVzUL+YQ= =PWiv -END PGP SIGNATURE- -- Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ This message was sent to: [EMAIL PROTECTED] Unsubscribe or change your options at http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] filtering by subject or other headers?
On Sat, 2003-10-04 at 15:30, Erez Zadok wrote: In message [EMAIL PROTECTED], Todd writes: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Erez Zadok wrote: I'd like to setup a filter rule that says: if the subject line matches a certain string, discard this email and never tell me about it. However, I don't this kind of rule to affect the way other moderation or filter rules work. That is, if I configure mailman to hold all messages from unknown senders, then those not matching the spam filter rule I just described, should be left in the hold queue. Sounds like you're describing the bounce_matching_headers option, from Privacy Options - Spam Filters, except that you want the default action to be discard instead of hold. I don't believe this is possible at the moment, but it seems like it would be a simple thing to add. You could either add another option to the Spam Filters page, perhaps discard_matching_headers, or just an option that toggled whether posts matching bounce_matching_headers were held or discarded. That would be handy to have a on a list by list basis, but there is a site-wide configuration option, KNOWN_SPAMMERS, that you can set in mm_cfg.py which looks to do exactly what you want. You might want to give that a try. One of the comments in the SpamDetect.py file where this spam filtering is done says This needs to be made more configurable and robust. So it's on the list of things that will happen when someone makes time to code it in. - -- ToddOpenPGP - KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp Todd, Yes! That's exactly it. Right now all I can do is hold mails that match certain headers. I like that option for certain cases, but I'd like another (independent) option to completely discard mails that match certain headers. And while we're at it, why only hold or discard? Why not offer the same sets of options available in other places: hold, discard, forward to someone, etc. I don't understand something in your mail, however. You say you could either add... and such, implying that _I_ could do it myself? Do you mean that there is a facility for this already in mailman? Or did you mean that I could always hack the source and add the feature I wanted? If you meant the latter, then I'd prefer if someone more experienced in Python and Mailman's code do it (what'll take me many hours, Barry can probably do in his sleep, with _both_ hands tied behind his back. :-) Erez. If you are simply looking at the subject line, then Procmail will do this very easily. man procmailex -- Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ This message was sent to: [EMAIL PROTECTED] Unsubscribe or change your options at http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] filtering by subject or other headers?
On Sat, 2003-10-04 at 19:25, Jon Carnes wrote: If you are simply looking at the subject line, then Procmail will do this very easily. man procmailex Opps! I should have read the whole thread first. Emily Latella Sorry. Never mind! /EL Jon Carnes -- Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ This message was sent to: [EMAIL PROTECTED] Unsubscribe or change your options at http://mail.python.org/mailman/options/mailman-users/archive%40jab.org