procmail
[Top] [All Lists]

Re: [pro] Re: how to filter out threads that I initiated or I participated in?

2009-04-08 15:32:34
Hello Zhengquan!

Of the replies to your post, there are two 'flavors':

The first mistakes your intent, and looks for your address in the mail body. As you said, this catches "most" but not "all".

The other suggestion, regarding the 'References:' header, is using similar logic to the recipe I posted, scanning e-mails from you to the list, for something 'consistent', saving it and testing for it. I suggested the 'subject' line. They suggested grabbing the message-ID and storing it, then comparing it to 'References'. But they didn't give you any code. My code shows *how* to grab the information and store it directly into a 'sub recipe' file that is then INCLUDED into the procmail recipe 'flow'. This removes the need for any programs to save a database or 'generate' recipes from it.

The code I posted is ALL of it, just with 'generic' info where you need
to replace the code with your system's specifics. There is no other 'research' to be done, other than your own comfort level using 'echo' and the 'INCLUDERC' command....

Enjoy!

- Charles

On Wed, 8 Apr 2009, Zhengquan Zhang wrote:

How about dynamic rulset generation?

In your main RC file:

INCLUDERC /path/to/subjectsrcfile

:0 c
* ^Newsgroups:.*comp\.mail\.mutt
* ^From_youraddress(_at_)yourdomain(_dot_)tld
* ^Subject: (Re. |\[mailinglistsubjectag\] )*\/......*
| echo -e "\n:0\n* ^Subject:.*$MATCH\nmutt-threadsiamin/\n" >> subjectsrcfile

The use of '.....' prevents blank/short subject lines from triggering....
For this simple form, I auto-generated rules that just deliver matching
mail to a new folder. You could also get fancy and 'formail' the message
before dropping it into the existing folder, etc, etc.

By doing the 'INCLUDERC' first, you *should* prevent multiple redundant
triggers of the 'create a rule' rule when you add more posts to a thread.
But your first posting will go to your regular mutt-users/ folder.

Of course, you would still have to frequently manually edit the file to
remove old rules/subjects.... Don't let that rc file grow to large!

Hope this helps!
Thanks Charlse, it is very helpful, but I am pretty new to procmail and
can not grab the essence for now..
Regards,


--
Zhengquan
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail