RyanGralinski.com

Marking spam messages as read with SpamAssassin

SpamAssassin
I’ve been using the same email address for so long and I get an obscene amount of spam!

Fortunately SpamAssassin catches 99.9% of it and moves into the Spam folder!

but my email client always says I have new messages, and who wants to be notified they have spam all the time!!!

I looked for ways to fix this and mark the messages as read and found a few work arounds for the maildir format, but what about MBOX?

I played with some things and the answer was very simple. your /etc/procmailrc should have a rule something like this:



:0
* ^X-Spam-Status: Yes
$HOME/mail/spam

change it to this, and you’ll be all set



:0 fhw
* ^X-Spam-Status: Yes
| formail -i "Status: NRO"
:0
* ^X-Spam-Status: Yes
$HOME/mail/spam

I’m not sure if there are any reasons you wouldnt want to do this but feel free to comment.

Exit mobile version