Hello again,

On Tue, Aug 12, 2014 at 9:34 AM, Alexander Farber <
alexander.far...@gmail.com> wrote:

> On 11 Aug 2014, at 10:22, li...@rhsoft.net wrote:
>>
>>> http://serverfault.com/questions/619537/use-postfix-
>>> and-spamassassin-packages-on-centos-6-to-reject-spam-without-custo
>>>
>>
the point of my question (maybe I haven't stated it clearly enough) has
been: how to combine Postfix and Spamassassin on CentOS with minimal
efforts.

I didn't want to add custom shell scripts or users - as suggested in many
HOWTOs on the web.

I think I have the answer now:

1) Install the spamassassin package (the postfix package is installed by
default)

2) Add a user to your system with "useradd spam" (you can't omit this step
- this has been the culprit in my case - I was trying to use the user
"nobody", but it didn't have a home dir and that has broken Spamassassin
despite me passing "-x" to spamd)

3) Add "/^Subject: \[SPAM\]/ DISCARD" to the /etc/postfix/header_checks
(check the /etc/mail/spamassassin/local.cf to see the exact string to match)

4) Add the following 2 lines to the /etc/postfix/master.cf:

smtp         inet n - n - - smtpd -o content_filter=spamassassin
spamassassin unix - n n - - pipe user=spam argv=/usr/bin/spamc -f -e
/usr/sbin/sendmail -oi -f ${sender} ${recipient}

Regards
Alex

Reply via email to