[CentOS] CentOS 6, Postfix, and Procmail -- how do I get it to work?

Mon Aug 18 22:19:09 UTC 2014
Timothy Murphy <gayleard at alice.it>

Mike Burger wrote:

>>> > What is the trick to get Postfix's local command to pipe mail through
>>> > procmail?

>>> It's this simple:
>>> 
>>> Instead of putting a call to procmail in your .forward, first, set up
>>> /etc/postfix/main.cf with the following line:
>>> 
>>> mailbox_command = /usr/bin/procmail
>>> 
>>> and reload postfix. Now, postfix will default to using procmail as its
>>> local delivery agent.
>>> 
>>> Now, set up /etc/procmailrc like so:
>>> 
>>> USER=`whoami`
>>> 
>>> :0 fw
>>> | spamc
>>> 
>>> :0 e
>>> {
>>>          EXITCODE=$?
>>> }


> My bad...no, you can skip the /etc/procmail recipe portion that calls
> spamc...you don't need that.

So how would you pass the email through SpamAssassin, if you wanted to?

-- 
Timothy Murphy  
e-mail: gayleard /at/ eircom.net
School of Mathematics, Trinity College, Dublin 2, Ireland