R P Herrold
2007-Jun-07 20:15 UTC
[CentOS] procmail, and the care and feeding of mailing list content received
Some threads just go on too long. Personally I think a troll
has hijacked the main centos list again and is inducing food
fight behaviours while that troll perfectly 'innocently'
asserting that it is just respoding to all email.
see:
http://video.google.com/videoplay?docid=-4216011961522818645
for a discussion of the problem of 'capture' in FOSS projects.
But if one loses interest in a thread, it is easy enough to
tune them out:
1. Install procmail; yum knows how
2. Add a mark and drop ruleset
[herrold at new .procmail]$ cat ~/.procmail/killfilerc
#
# mark them
:0fh
^ *List-Id:.*centos\.centos\.org
^ *Subject:.*CentOS Based Linux Firewall Document
*!^X-brand
| formail -A "X-brand: killfile "
# and dump them
:0 w
* ^X-brand: killfile
/dev/null
3. Integrate it in mailhandling; a fragment from:
/home/herrold/.procmailrc
# easy drops
INCLUDERC=$HOME/.procmail/killfilerc
-----------------------------------
easy enough to save 'caught' pieces to a file, rather than
devnull until you are certain collateral damage has not been
induced; see the procmail manpage series for a full
discussion.
-- Russ Herrold
R P Herrold
2007-Jun-07 20:25 UTC
[CentOS] procmail, and the care and feeding of mailing list content received
speed kills of course -- In my immediate prior post, I reversed the match and the anchor operators. ^ *List-Id:.*centos\.centos\.org ^ *Subject:.*CentOS Based Linux Firewall Document should have been * ^List-Id:.*centos\.centos\.org * ^Subject:.*CentOS Based Linux Firewall Document of course. Fortunately, in my local setup I had set content to be dropped to be saved to a file while I tested. -- Russ Herrold
Akemi Yagi
2007-Jun-08 15:19 UTC
[CentOS] procmail, and the care and feeding of mailing list content received
Hi Russ, Thanks for this hint. I have a couple of questions. On 6/7/07, R P Herrold <herrold at owlriver.com> wrote:> :0fh > * ^List-Id:.*centos\.centos\.orgThis is a handy way of filtering by the mailing list name. Thanks.> * ^Subject:.*Some subject line here > *!^X-brand > | formail -A "X-brand: killfile " > > # and dump them > :0 w > * ^X-brand: killfile > /dev/nullCould you explain why you are going through killfile here? For example, can't you just do: :0: * ^(From|Sender|Received):.*Perrin /dev/null if you do not want anything from a person named Perrin? I have lines like that in my filter (not with 'Perrin' by the way) and it seems to be working. As you can tell, I am not very familiar with procmail filter format. Akemi> -- Russ Herrold