我正在按照arstechnica的指导在我的Web服务器上安装电子邮件服务器。 本教程中没有使用Ubuntu,而是CentOS 6。
http://arstechnica.com/business/2014/03/taking-e-mail-back-part-3-fortifying-your-box-against-spammers/2/
现在我想要安装和configurationSpamassassin; 我编辑了文件/etc/sysconfig/spamassassin ,使内容是:
# 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
当通过重新启动Spamassassin
service spamassassin restart
我收到错误消息
warn: server socket setup failed, retry 2: spamd: directory for /var/spool/postfix/spamassassin/spamd.sock does not exist, exiting
当我通过启动垃圾邮件过程
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
没有错误消息,并且spamd.sock文件是自动创build的。
有没有人有一个想法可能出了什么问题?
正如你自己提到的,你正在使用一个文档来安装和configurationCentos,这实际上是为Ubuntu编写的。 这不是很明智。 configuration文件在不同操作系统之间以及同一操作系统的不同版本之间经常有很大的差异(虽然它们可以用于相同的目的)。
这也是这种情况。 CentOS中的/etc/sysconfig/spamassassin的内容与Ubuntu相似。 你可以使用yum来安装它并查看它。
我只能build议你按照专门为OS CentOS编写的指令和你正在使用的版本。 这样你将避免许多不需要的问题。 但是,如果您想继续使用文档,请特别注意差异并尝试相应地进行自定义(即避免复制粘贴)。
这里是如何在CentOS 6 VPS上安装和整合SpamAssassin和Postfix的链接,您可以查看和比较/编辑必要的文件。