if you need any help visit
http://spamassassin.apache.org/
add a user call spamfilter with out shell.
- Code: Select all
adduser spamfilter -s /sbin/nologin
2. Setup Postfix
edit the master.cf
add the line
- Code: Select all
spamfilter unix - n n - - pipe
flags=Rq user=spamfilter argv=/usr/local/bin/spamfilter -f ${sender} -- ${recipient}
edit the SMTP as
- Code: Select all
smtp inet n - n - - smtpd
-o content_filter=spamfilter:dummy
now creat a file call
/usr/local/bin/spamfilter
eg
- Code: Select all
vi /usr/local/bin/spamfilter
- Code: Select all
#!/bin/bash
/usr/bin/spamc | /usr/sbin/sendmail.postfix -i "$@"
exit $?
now chnage the owner of the file to spamfilter
- Code: Select all
chown spamfilter /usr/local/bin/spamfilter
now set permisson as
- Code: Select all
chmod 755 /usr/local/bin/spamfilter
thats it your done.
now reload postfix
- Code: Select all
/etc/init.d/postfix reload
thats it... your done.
