Здесь буду помешать частые ошибки при работе со SpamAssassin. Естественно, что буду дополнять.
1)При запуске Amavisd-new выдает вот что:
fetch_modules: error loading required module MIME/Head.pm:
File::Temp version 0.18 required–this is only version 0.16 at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Tools.pm line 14.
BEGIN failed–compilation aborted at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Tools.pm line 14.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Head.pm line 125.
BEGIN failed–compilation aborted at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Head.pm line 125.
Compilation failed in require at /usr/local/sbin/amavisd line 193.
String found where operator expected at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Body.pm line 450, near “whine “couldn’t unlink “”
(Do you need to predeclare whine?)
fetch_modules: error loading required module MIME/Body.pm:
syntax error at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Body.pm line 450, near “whine “couldn’t unlink “”
BEGIN not safe after errors–compilation aborted at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Body.pm line 485.
Compilation failed in require at /usr/local/sbin/amavisd line 193.
String found where operator expected at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Decoder.pm line 204, near “usage “unsupported encoding ‘$enc’: using ‘binary'””
(Do you need to predeclare usage?)
fetch_modules: error loading required module MIME/Entity.pm:
syntax error at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Decoder.pm line 204, near “usage “unsupported encoding ‘$enc’: using ‘binary'””
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Entity.pm line 236.
BEGIN failed–compilation aborted at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Entity.pm line 236.
Compilation failed in require at /usr/local/sbin/amavisd line 193.
fetch_modules: error loading required module MIME/Parser.pm:
Global symbol “$M_DEBUG” requires explicit package name at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Parser/Filer.pm line 292.
Global symbol “$M_WARNING” requires explicit package name at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Parser/Filer.pm line 303.
BEGIN not safe after errors–compilation aborted at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Parser/Filer.pm line 765.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Parser.pm line 148.
BEGIN failed–compilation aborted at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Parser.pm line 148.
Compilation failed in require at /usr/local/sbin/amavisd line 193.
String found where operator expected at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Decoder/Base64.pm line 77, near “debug “in = $in; out = $out””
(Do you need to predeclare debug?)
fetch_modules: error loading required module MIME/Decoder/Base64.pm:
syntax error at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Decoder/Base64.pm line 77, near “debug “in = $in; out = $out””
Compilation failed in require at /usr/local/sbin/amavisd line 193.
String found where operator expected at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Decoder/NBit.pm line 138, near “whine “saw 8-bit data while encoding 7bit””
(Do you need to predeclare whine?)
String found where operator expected at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Decoder/NBit.pm line 143, near “whine “saw long line while encoding 7bit/8bit””
(Do you need to predeclare whine?)
fetch_modules: error loading required module MIME/Decoder/NBit.pm:
syntax error at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Decoder/NBit.pm line 138, near “whine “saw 8-bit data while encoding 7bit””
syntax error at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Decoder/NBit.pm line 143, near “whine “saw long line while encoding 7bit/8bit””
Compilation failed in require at /usr/local/sbin/amavisd line 193.
String found where operator expected at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Decoder/UU.pm line 90, near “whine “file incomplete, no end found\n””
(Do you need to predeclare whine?)
fetch_modules: error loading required module MIME/Decoder/UU.pm:
syntax error at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Decoder/UU.pm line 90, near “whine “file incomplete, no end found\n””
Compilation failed in require at /usr/local/sbin/amavisd line 193.
String found where operator expected at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Decoder/Gzip64.pm line 94, near “whine “Encoding “”
(Do you need to predeclare whine?)
fetch_modules: error loading required module MIME/Decoder/Gzip64.pm:
syntax error at /usr/local/lib/perl5/site_perl/5.8.8/MIME/Decoder/Gzip64.pm line 94, near “whine “Encoding “”
Compilation failed in require at /usr/local/sbin/amavisd line 193.
ERROR: MISSING REQUIRED BASIC MODULES:
MIME::Head
MIME::Body
MIME::Entity
MIME::Parser
MIME::Decoder::Base64
MIME::Decoder::NBit
MIME::Decoder::UU
MIME::Decoder::Gzip64
BEGIN failed–compilation aborted at /usr/local/sbin/amavisd line 232.
Решение:
#perl -MCPAN -e shell
>install Bundle::CPAN
>reload cpan
>exit
2) В логах валиться такая ошибка
Mar 31 21:13:48 mail amavis[66684]: (!)_DIE: Can’t locate Mail/SpamAssassin/CompiledRegexps/body_0.pm in @INC (@INC contains: /var/db/spamassassin/compiled/5.008/3.003000 /var/db/spamassassin/compiled/5.008/3.003000/auto lib /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8) at (eval 875) line 1.
Mar 31 21:13:48 mail amavis[66684]: (!)_DIE: Can’t locate Mail/SpamAssassin/CompiledRegexps/body_0.pm in @INC (@INC contains: /var/db/spamassassin/compiled/5.008/3.003000 /var/db/spamassassin/compiled/5.008/3.003000/auto lib /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8) at (eval 875) line 1.\nBEGIN failed–compilation aborted at (eval 875) line 1.
Решение:
#sa-compile
#sa-update -D
3) Валиться такая ошибка
Mar 31 21:44:07 mail clamd[25609]: lstat() failed on: /var/amavis/tmp/amavis-20100331T214407-74558/parts
Mar 31 21:44:07 mail amavis[74558]: (74558-01) (!)run_av (ClamAV-clamd) FAILED – unexpected , output=”/var/amavis/tmp/amavis-20100331T214407-74558/parts: lstat() failed: Permission denied. ERROR\n”
Mar 31 21:44:07 mail amavis[74558]: (74558-01) (!)ClamAV-clamd av-scanner FAILED: CODE(0x8958584) unexpected , output=”/var/amavis/tmp/amavis-20100331T214407-74558/parts: lstat() failed: Permission denied. ERROR\n” at (eval 100) line 594.
Решение:
Добавить пользователя vscan в группу clamav и пользователя clamav в группу vscan
4)
May 4 00:00:36 gate spamd[1452]: locker: error accessing /var/spool/mqueue/.spamassassin/bayes.lock: Нет такого файла или каталога at /usr/local/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Locker/UnixNFSSafe.pm line 106, line
35.
May 4 00:00:37 gate spamd[1452]: locker: error accessing /var/spool/mqueue/.spamassassin/bayes.lock: Нет такого файла или каталога at /usr/local/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Locker/UnixNFSSafe.pm line 106, line
35.
Решение:
Запускать spamassasin от юзера spamd:spamd и выставить права рекурсивно на папку /var/spool/mqueue/.spamassassin/ spamd:spamd, 0770