WHM : Spamassassin / spamd not working

Spamassassin / spamd not working — solution

1. When restarting exim it will show

[root@server ~]# /scripts/restartsrv_exim
Starting exim: [ OK ]
Starting exim-smtps: [ OK ]
Starting antirelayd: [ OK ]
Starting spamd: Can’t locate Cpanel/SpamAssassinSandBox.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl/5.6.2 /usr/lib/perl5/site_perl) at /usr/bin/spamd line 27.
BEGIN failed–compilation aborted at /usr/bin/spamd line 27.
[FAILED]
Starting antirelayd: [ OK ]

Fix :

/scripts/perlinstaller –force Mail::SpamAssassin
/etc/rc.d/init.d/exim restart

2. When restarting exim it will show

Shutting down spamd: [FAILED] and when starting it will NOT show Starting spamd:

You may have disabled spamd whm > service manager .

so whm will create a file /etc/spamdisable

when you re-eanable spamd through whm > service manager this file may not be deleted.

so delete /etc/spamdisable and restart exim , spamd will function again.

[root@server ~]# service exim restart
Shutting down exim: [ OK ]
Shutting down antirelayd: [ OK ]
Shutting down spamd: [FAILED]
Starting exim: [ OK ]
Starting exim-smtps: [ OK ]
Starting antirelayd: [ OK ]
Starting spamd: [ OK ]
[root@server ~]#

3. Given below is the error when restarting exim.

” Starting spamd: [9128] error: spamd: spamd script is v3.001000, but using modules v3.001001 “

When cpanel update updates spamassassin the updates (executables) will be installed at

/usr/share/scripts/ NOT AT working directory /usr/bin and /etc/rc.d/init.d/ .

solution:

Remove these files from /usr/bin/ and /etc/rc.d/init.d/

rm -f /usr/bin/spamc
rm -f /usr/bin/sa-learn
rm -f /usr/bin/spamassassin
rm -f /usr/bin/spamd
rm -f /usr/bin/sa-update
rm -f /etc/rc.d/init.d/spamassassin

Now copy the updated files from /usr/share/scripts/

cp /usr/share/scripts/spamc /usr/bin/
cp /usr/share/scripts/sa-learn /usr/bin/
cp /usr/share/scripts/spamassassin /usr/bin/
cp /usr/share/scripts/spamd /usr/bin/
cp /usr/share/scripts/sa-update /usr/bin/
cp /usr/share/scripts/spamassassin /etc/rc.d/init.d/

Now restart exim. Done

==========================================================================
OR
================

WRT spamd, have you tried:

/etc/init.d/chkservd restart

If that doesn’t work, try:

/scripts/fixspamassassinfailedupdate

__________________

======================================================

Leave a Comment