How do I move spam mail to spam folder?

by on May 25, 2006 · 4 comments· LAST UPDATED May 29, 2007

in , ,

Q. I want to move all mails tagged as spam to "spam" folder. How do I configure procmail to move spam mail to spam folder?

A. If you have Procmail and Spamassassin installed, then you can move mails using Procmail. It is a mail delivery agent (MDA) or mail filter, a program to process incoming emails on a computer, widely used on Unix systems

Configuration: PROCMAIL MOVE SPAM TO SPAM FOLDER

First, open ~/.procmail file (/home/you/.procmail):
$ vi ~/.procmail
Next append the following config code:
# All mail tagged as spam is moved to "spam" folder.
:0:
* ^X-Spam-Status: Yes
spam

Save and close the file.

Now all email tagged as spam will move to "spam" folder.

See also:

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 4 comments… read them below or add one }

1 J.R. October 3, 2008 at 8:39 am

This didn’t work at all. I’m running:

Debian Etch
Postfix 2.3.8
Spamassassin 3.2.5

Anyone have any ideas?

Reply

2 mary December 10, 2010 at 5:39 pm

I HAVE OUTLOOK EXPRESS TO GET MY E-MAILS
I WANT TO PUT SPAM INTO A FOLDER TO DELETE.
CAN ANY ONE HELP

Reply

3 c1n0t3 August 8, 2011 at 12:37 pm

Does anyone know how to setup postifx and procmail when there are no system users, only virtual ones in postfix? I need to be able to filter spam but users are virtual.
Any ideas?

Reply

4 mualla November 16, 2011 at 8:29 am

I would like to move spam from my email now , because the messages are not opening

Reply

Leave a Comment

Tagged as:

Previous Faq:

Next Faq: