Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
postfix and spam
View previous topic :: View next topic  
Author Message
baboo
Senior Member


Joined: 04 Sep 2007
Posts: 676

PostPosted: Tue Nov 20, 2007 6:03 pm    Post subject: postfix and spam Reply with quote

Hi,

I want to enable the use of spam protection on my email server. Do I need to patch your postfix to support spam filtering or is it already patched? I've read that for postfix to really support spam filtering there are patches that need to be applied.

This morning I came across a posting about postfix and spam. What do you think about the suggestions the poster made?

http://blog.taragana.com/index.php/archive/6-simple-safe-postfix-changes-for-over-95-spam-reduction/

thanks - any advice is greatly appreciated.
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Tue Nov 20, 2007 7:08 pm    Post subject: Reply with quote

That's is well known postfix configuration for fighting spam.
It got to do with configuration and not spam-filters.
Depends on your server it might work it might don't, it might work if you apply the configuration partial.

Quote:
I've read that for postfix to really support spam filtering there are patches that need to be applied.

I've never heard of that, it might be true or applies for older versions.
I didn't activate spamassassin after postfix take in charge cause I'm not quite sure if I'll keep it or replace it in postfix configuration.
To enable it just edit /etc/postfix/master.cf
uncomment under smtp # -o content_filter=spamassassin
Code:
smtp      inet  n       -       n       -       -       smtpd
#  -o receive_override_options=no_address_mappings
# -o content_filter=spamassassin

and add to the bottom
Code:
spamassassin unix -     n       n       -       -       pipe
        user=nobody argv=/usr/bin/spamc -f -e
        /usr/sbin/sendmail -oi -f ${sender} ${recipient}

do a postfix reload
messages might delay a little though. If you look at /var/log/mailog you will see
relay=spamassassin, status=sent (delivered via spamassassin service)

edit: Forgot the most important.
remove /etc/rc.d/rc.spamd and create a new /etc/rc.d/rc.spamd or rc.spamassassin
with below start up script.
Code:
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DAEMON=/usr/bin/spamd
NAME=spamd
SNAME=rc.spamassassin
DESC="SpamAssassin Mail Filter Daemon"
PIDFILE="/var/tmp/$NAME.pid"
PNAME="spamd"
DOPTIONS="-d --pidfile=$PIDFILE"

KILL="/bin/kill"
KILLALL="/bin/killall"
# Defaults - don't touch, edit /etc/mail/spamassassin/local.cf
ENABLED=0
OPTIONS=""

set -e

case "$1" in
start)
echo -n "Starting $DESC: "
$PNAME $OPTIONS $DOPTIONS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
$KILL `cat $PIDFILE`
/bin/rm $PIDFILE
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
$0 stop
sleep 1
$0 start
echo "$NAME."
;;
*)
ME=/etc/rc.d/$SNAME
echo "Usage: $ME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac

exit 0

You can place an entry in /etc/rc.d/rc.local to start at boot with
Code:
#Starting spamassassin
if [ -x /etc/rc.d/rc.spamd ]; then
  . /etc/rc.d/rc.spamd start
fi



gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com


Last edited by gerasimos_h on Tue Nov 20, 2007 7:54 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
baboo
Senior Member


Joined: 04 Sep 2007
Posts: 676

PostPosted: Tue Nov 20, 2007 7:35 pm    Post subject: Reply with quote

as always very helpful reply. Thanks for the info.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional