Anyone Filter Email w/ Procmail
I am using Postfix to send and receive email on my email server and also have Spamassassin scoring incoming email. I was told that procmail can filter email from Spamassassin into a folder by placing a procmail.rc hidden file in the users home directory to then move mail labeled SPAM in the header into a specific folder. I would love to do this but don't know where to begin on setting something like this up. I am sick of having labeled SPAM in my inbox.
|
Bung this in a file at ~/.procmailrc
Code:
:0H Code:
| /usr/bin/procmail -t |
Postfix will use procmail (they seem to hate it there for some reason), but I use maildrop for the same purpose.
There are a number of ways to do this, one is given above, or a few ways via the transport mechanism. Although for maildrop, I'm sure these would apply for procmail too. http://www.postfix.org/MAILDROP_README.html |
Quote:
|
May work for maildir?
|
OK - There is a lot of info here. Let me cap everything up. And by the way I Am using Maildir style, not sure if this makes any difference or not...
1 - I am going to touch ~/.procmailrc as Deleriux suggested. 2 - vim ~/.procmailrc & add what he suggested. 3 - Reload postfix and see if emails that are normally labeled [***** SPAM 6.7 *****] Increase Your Member Size in the subject get filtered w/o having to create a .forward file or adjusting any MTA (Postfix) settings. Do I need to create ~/.spam or will the .procmailrc file auto generate this for me? In my /etc/postfix/main.cf, I have the following entry commented out for procmail. Should I enable this setting? Not sure I understand what it does but it seems that it obviously relates to procmail and Postfix. Code:
carlos@swordfish:~$ cat /etc/postfix/main.cf | grep "procmail" |
Personaly I dont like procmail as it such a cryptic syntax that isnt suitable for users to exploit. Although I didnt suggest it initially i would recommend as the above poster pointed out to use maildir instead of mbox since it is easier to read and simpler to administrate.
|
Quote:
Code:
carlos@swordfish:~$ cat /etc/postfix/main.cf | grep "Maildir" |
It was more to do with the procmail rule shown than the ability per se
|
So when I enable that comment in my postfix main.cf file, I no longer get email.
Code:
mailbox_command = procmail -a "$EXTENSION" |
That looks like the one
Which Quote:
|
All times are GMT -5. The time now is 07:56 AM. |