1

I am following a guide from arstechnica to install an email server on my web server. I'm not using Ubuntu as stated in the tutorial but CentOS 6.

http://arstechnica.com/business/2014/03/taking-e-mail-back-part-3-fortifying-your-box-against-spammers/2/

Now I want to install and configure Spamassassin; I edited the file /etc/sysconfig/spamassassin such that the content is:

# Options to spamd
 SAHOME="/var/lib/spamassassin"
 SAGLOBALCFGPATH="/etc/mail/spamassassin"

 SPAMDOPTIONS="-d -x --max-children=5 --helper-home-dir=/var/lib/spamassassin -u spamd -g spamd --siteconfigpath=/etc/mail/spamassassin --socketpath /var/spool/postfix/spamassassin/spamd.sock --socketowner spamd --socketgroup spamd --socketmode 0660"

 # Change to one to enable spamd
 ENABLED=1

 # Pid file
 # Where should spamd write its PID to file? If you use the -u or
 # --username option above, this needs to be writable by that user.
 # Otherwise, the init script will not be able to shut spamd down.
 PIDFILE="/var/run/spamd.pid"

 # Cronjob
 # Set to anything but 0 to enable the cron job to automatically update
 # spamassassins rules on a nightly basis
 CRON=1

When restarting the Spamassassin via

service spamassassin restart 

I get the error messages

warn: server socket setup failed, retry 2: spamd: directory for /var/spool/postfix/spamassassin/spamd.sock does not exist, exiting

When I start the spamd process via

spamd -d -x --max-children=5 --helper-home-dir=var/lib/spamassassin -u spamd -g spamd --siteconfigpath=/etc/mail/spamassassin --socketpath /var/spool/postfix/spamassassin/spamd.sock --socketowner spamd --socketgroup spamd --socketmode 0660

there are no error messages and the spamd.sock file is created automatically.

Does anybody have an idea what might have gone wrong?

seyfe
  • 151

1 Answers1

1

As you have mentioned yourself, you are using a documentation to install and configure Spamassassain on Centos, which is actually written for Ubuntu. This is not really wise. The configuration files often vary a lot between different OS's, and between different versions of the same OS (although they may serve the same purpose).

This is the case here too. The content of /etc/sysconfig/spamassassin in Centos seems quite different to that of Ubuntu. You can install it using yum and have a look at it.

I can only suggest that you follow the instructions which are written exclusively for OS CentOS and the version you are using. This way you will be avoiding many unwanted issues. Yet if you want to continue with the documentation for some reason, then pay special attention to the differences and try to customize it accordingly (i.e. avoid doing a copy-paste).

Here is link on How to install and integrate SpamAssassin with Postfix on a CentOS 6 VPS, you can have look at and compare/edit the necessary files.

Diamond
  • 9,291