1

Topic: Spamassassin and Amavisd-New not working

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: FreeBSD 10
- Related log if you're reporting an issue:
====

I've installed FreeBSD and iRedMail twice now, both times I would get errors that Mail::SPF Geo::IP Razor2::Client::Agent and Net::Patricia were not loaded.  I could install Net::Patricia using:
perl -MCPAN -e shell
cpan> install Net::Patricia
but could not install the others.

After my 2nd fresh install, found the following to fix Spamassassin:
perl -MCPAN -e shell
cpan> o conf prerequisites_policy ask
cpan> force install Geo::IP IO::Socket::IP Net::Patricia NetAddr::IP
cpan> force install  Mail::SpamAssassin Mail::SpamAssassin::Plugin::Razor2
cpan> quit
sa-update

spamassassin --lint -D
now works, but after reboot both Amavis and Spamassassin refuse to work.  Console log shows 2 warnings:
Jul  3 15:18:01 plankton root: /etc/rc: WARNING: failed to start amavisd
Jul  3 15:18:06 plankton ntpd[746]: time reset -0.316679 s
Jul  3 15:18:20 plankton root: /etc/rc: WARNING: failed to start policyd2

Maillog only shows Postfix starting, and errors because Amavis did not start.
Jul  3 15:18:20 plankton postfix/postfix-script[1153]: starting the Postfix mail system
Jul  3 15:18:20 plankton postfix/master[1155]: daemon started -- version 2.11.1, configuration /usr/local/etc/postfix
Jul  3 15:25:45 plankton postfix/smtpd[1264]: connect from Postfix[10.0.1.220]
Jul  3 15:27:00 plankton postfix/smtpd[1264]: warning: connect to 127.0.0.1:10031: Operation timed out
Jul  3 15:27:00 plankton postfix/smtpd[1264]: warning: problem talking to server 127.0.0.1:10031: Operation timed out
Jul  3 15:28:16 plankton postfix/smtpd[1264]: warning: connect to 127.0.0.1:10031: Operation timed out

I suspect the force installation of Spamassassin broke permissions and maybe put things in non-iRedMail preferred locations?

2

Re: Spamassassin and Amavisd-New not working

Why not install perl modules from ports tree?

GerryM wrote:

Jul  3 15:27:00 plankton postfix/smtpd[1264]: warning: connect to 127.0.0.1:10031: Operation timed out

Cluebringer service (/usr/local/etc/rc.d/cluebringer) is not running, please start it first.

3

Re: Spamassassin and Amavisd-New not working

ZhangHuangbin wrote:

Why not install perl modules from ports tree?

Didn't think of that, I'll try that.
I'll look for the port of the failing module and 'make clean' followed by 'make install clean'

GerryM wrote:

Jul  3 15:27:00 plankton postfix/smtpd[1264]: warning: connect to 127.0.0.1:10031: Operation timed out

ZhangHuangbin wrote:

Cluebringer service (/usr/local/etc/rc.d/cluebringer) is not running, please start it first.

Starting policyd2.
eval: /usr/local/bin/cbpolicyd: not found

I'll do another fresh install and try the port reinstall for the problem modules.
Thanks!

4

Re: Spamassassin and Amavisd-New not working

*) Please make sure you have the latest ports tree.
*) Please keep monitoring terminal output, looks like you have several errors during installing packages.

5

Re: Spamassassin and Amavisd-New not working

ZhangHuangbin wrote:

*) Please make sure you have the latest ports tree.
*) Please keep monitoring terminal output, looks like you have several errors during installing packages.

Is the installation logged anywhere?  When I was watching I only noticed various warnings like some time header being deprecated..

I cleaned up the modules that were not loaded by installing:
/usr/ports/net/p5-Geo-IP
/usr/ports/net/p5-Net-Patricia
/usr/ports/www/p5-LWP-UserAgent-WithCache
/usr/ports/mail/razor-agents

Now "spamassassin --lint -D" shows all modules loading, but maillog has the error:
Jul  5 17:38:27 plankton amavis[1761]: (!)_DIE: Can't locate Mail/SpamAssassin/CompiledRegexps/body_0.pm in @INC (@INC contains: /var/db/spamassassin/compiled/5.016/3.004000 /var/db/spamassassin/compiled/5.016/3.004000/auto lib /usr/local/lib/perl5/5.16/BSDPAN /usr/local/lib/perl5/site_perl/5.16/mach /usr/local/lib/perl5/site_perl/5.16 /usr/local/lib/perl5/5.16/mach /usr/local/lib/perl5/5.16) at (eval 1186) line 1.

sa-compile fails with the message: "sa-compile: not compiling; 'spamassassin --lint' check failed!" and when I run: "spamassassin --lint -D" it reports:
Jul  5 17:59:51.206 [1876] warn: lint: 2 issues detected, please rerun with debug enabled for more information
I just can't seem to find those 2 issuses. 
(Throughout my troubleshooting, spammassassin --lint has always been reporting 2 issues!)

So I disabled CompiledRegexps by commenting out:
"loadplugin Mail::SpamAssassin::Plugin::Rule2XSBody" in /usr/local/etc/mail/spamassassin/v320.pre

Amavis now starts.