2005/04/16(土)SpamAssassinインストール(ハマリ編)
2005/04/16 5:00
[1]ハマリ1
SpamAssassin's spamd daemon is incorrectly installed. You need to run it as: spamd -F 0 .... Please try again.qmail-scannerを./configureしたときにでたエラーメッセージ。-Fオプションを指定していなかった。
[2]ハマリ2
(didn't include a "X-Spam-Status: Yes" line in output) - ignoring...
モジュールが足りていないので、
spamassassin -t < sample-spam.txtとテスト起動して、足りないモジュールをチェック。
Can't locate HTML/Parser.pm in @INC (@INC contains: lib ../lib /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . /usr/bin/lib /usr/bin/site_perl) at lib/Mail/SpamAssassin/HTML.pm line 32. BEGIN failed--compilation aborted at lib/Mail/SpamAssassin/HTML.pm line 32. Compilation failed in require at lib/Mail/SpamAssassin/Message/Node.pm line 42. BEGIN failed--compilation aborted at lib/Mail/SpamAssassin/Message/Node.pm line 42. Compilation failed in require at lib/Mail/SpamAssassin/Message.pm line 49. BEGIN failed--compilation aborted at lib/Mail/SpamAssassin/Message.pm line 49. Compilation failed in require at /usr/share/perl5/Mail/SpamAssassin/NoMailAudit.pm line 18. BEGIN failed--compilation aborted at /usr/share/perl5/Mail/SpamAssassin/NoMailAudit.pm line 18. Compilation failed in require at /usr/bin/spamassassin line 134. BEGIN failed--compilation aborted at /usr/bin/spamassassin line 134.HTML/Parserで怒られてるので、足りてないのは多分これ。
# apt-get install libhtml-parser-perl/testing
なお、sample-spam.txtはspamassassinのソースから取ってきた。これ以外にソースは使わなかったので、今にして思えばわざわざaptで取ってこなくてもという感じ。取ってくるときには例のごとく、
# apt-get source spamassassin(注:カレントに放り込まれます)
[3]ハマリ3
これが一番きつかった。
# spamassassin -t < sample-spam.txt error: rule 'GB2312_CHARSETContent-Type' has invalid characters (not Alphanumeric + Underscore) error: rule 'X_MACKY_ID_PRESENTexists:X-Macky-ID' has invalid characters (not Alphanumeric + Underscore) error: rule 'X_MACKYCATCODE_PRESENTexists:X-MackyCatCode' has invalid characters (not Alphanumeric + Underscore) error: rule 'X_MACKYMEDIA_PRESENTexists:X-MackyMedia' has invalid characters (not Alphanumeric + Underscore) error: rule 'X_MAILER_PRESENTexists:X-Mailer' has invalid characters (not Alphanumeric + Underscore) Net::DNS version is 0.19, but need 0.34dnsavailable-1 at lib/Mail/SpamAssassin/Dns.pm line 1230. Failed to run ROUND_THE_WORLD SpamAssassin test, skipping: (Can't locate object method "check_for_round_the_world_received" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run DIFFERENT_REPLY_TO SpamAssassin test, skipping: (Can't locate object method "check_for_spam_reply_to" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run CTYPE_JUST_HTML SpamAssassin test, skipping: (Can't locate object method "check_for_content_type_just_html" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run LOTS_OF_CC_LINES SpamAssassin test, skipping: (Can't locate object method "check_lots_of_cc_lines" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run FROM_NAME_EQ_FROM_ADDR SpamAssassin test, skipping: (Can't locate object method "check_from_name_eq_from_address" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run BAD_HELO_WARNING SpamAssassin test, skipping: (Can't locate object method "check_for_bad_helo" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run FROM_AND_TO_SAME SpamAssassin test, skipping: (Can't locate object method "check_for_from_to_equivalence" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run KNOWN_BAD_DIALUPS SpamAssassin test, skipping: (Can't locate object method "check_for_bad_dialup_ips" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run NO_MX_FOR_FROM SpamAssassin test, skipping: (Can't locate object method "check_for_from_mx" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run SUBJ_MISSING SpamAssassin test, skipping: (Can't locate object method "subject_missing" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run DATE_IN_FUTURE SpamAssassin test, skipping: (Can't locate object method "check_for_forward_date" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to compile URI SpamAssassin tests, skipping: (Illegal declaration of anonymous subroutine at /etc/spamassassin/20_uri_tests.cf, rule MAILTO_TO_SPAM_ADDR, line 10. ) Failed to run LINES_OF_YELLING_3 SpamAssassin test, skipping: (Can't locate object method "check_for_num_yelling_lines" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run BALANCE_FOR_LONG SpamAssassin test, skipping: (Can't locate object method "check_for_very_long_text" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run LINES_OF_YELLING SpamAssassin test, skipping: (Can't locate object method "check_for_yelling" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run LINES_OF_YELLING_2 SpamAssassin test, skipping: (Can't locate object method "check_for_num_yelling_lines" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run BASE64_ENC_TEXT SpamAssassin test, skipping: (Can't locate object method "check_for_base64_enc_text" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Failed to run RAZOR_CHECK SpamAssassin test, skipping: (Can't locate object method "check_razor" via package "Mail::SpamAssassin::PerMsgStatus" at lib/Mail/SpamAssassin/PerMsgStatus.pm line 2312. ) Can't locate object method "handle_auto_report" via package "Mail::SpamAssassin::PerMsgStatus" at /usr/bin/spamassassin line 231.またモジュール不足かと思ってあれこれやってみたのだが、
# apt-get install libnet-dns-perl/testingとか、全く解決しない。
で、"Can't locate object method"と"PerMsgStatus"で海外のサイト調べたところ、設定ファイル等含めて全部消してインストールし直せと言う。あれこれやってるうちにどうも以前のバージョンのと色々混ざったらしい。
# dpkg --purge spamassassin # rm -r /etc/spamassassin # apt-get install spamassassin/testingあ、うごいた。
[参考サイト]
http://article.gmane.org/gmane.mail.spam.spamassassin.devel/15172
http://article.gmane.org/gmane.mail.spam.spamassassin.general/60241/m
atch=+usr+share+perl5+mail+spamassassin+permsgstatus+
[4]ハマリ4
# ./configure Hit RETURN to create initial directory structure under /var/spool/qmailscan, and install qmail-scanner-queue.pl under /var/qmail/bin: perlscanner: generate new DB file from /var/spool/qmailscan/quarantine-attachments.txt perlscanner: total of 9 entries.で、行ったまま帰ってこない。暴走。
qmailのulimitの値を12288まで上げると。
# ./configureうーん、今度はインストールは完了。テストをすると……?
# contrib/test_installation.sh -doit Sending standard test message - no viruses... done! Sending eicar test virus - should be caught by perlscanner module... qmail-inject: fatal: qq temporary problem (#4.3.0) Bad error. qmail-inject died途中で落ちてしまいます。メモリ不足??
その後swapを弄ったらいつの間にか解決してしまいました。多分、swapが設定されていなかった事による単なるメモリ不足であったのでしょう。