From Gentoo Wiki
(Redirected from Procmailrc tips)
Jump to:navigation Jump to:search


Here a few tricks which could be used by Gentoo developers and other procmail users to clean up / sort excessive mail.

Please note that in order for any of the listed tips to work, procmail has to be enabled first. On, this is done through setting the ~/.forward file:

FILE ~/.forwardEnabling procmail
| /usr/bin/procmail

Removing duplicate (CC) mails from mailing lists

When replies to the mailing list CC people that are subscribed, they often get multiple copies of the same mail. To filter out the duplicates the following procmail rule can be used:

FILE ~/.procmailrcFiltering out direct mails addressed to various mailing lists
:0: E
* ! ^List-Id:
* ^(To|CC):.*(gentoo-(core|dev|dev-announce)\@lists\.gentoo\.org|devel\@lists\.claws-mail\.org)

In this case, mails which were addressed to the particular mailing list but didn't come from the mailing list directly are moved directly to Trash folder. Alternatively, /dev/null can be used to discard them completely.

Watching commits to chosen packages

Often it is useful to watch the commits done to your packages and/or eclasses, or any other CVS location relevant to you. In order to achieve that, you can subscribe to the gentoo-commits mailing list and then set up procmail rules to filter out irrelevant paths:

FILE ~/.procmailrcFiltering out gentoo-commits by paths
:0: E
* ^List-Id:.*gentoo-commits\.gentoo\.org
* ! ^Subject:.*app-arch/(libzpaq|zpaq|zpaq-extras|zpipe)
* ! ^Subject:.*app-portage/(diffmask|flaggie)
* ! ^Subject:.*eclass/(bzr|cvs|darcs|distutils-r1).eclass