CONTENTS
Lastmodified 2018-05-18 (金) 15:56:13
http://freebsd.server-manual.com/freebsd9_postfix_amavisd-new_spamassassin.html
/usr/local/etc/amavisd.conf
@bypass_spam_checks_maps = (1); # controls running of anti-spam code ←コメント解除(スパムチェックを行わない)
【参考URL】http://freebsd.server-manual.com/freebsd9_postfix_amavisd-new_spamassassin.html
portinstall clamav --batch
etc/rc.conf
clamav_clamd_enable="YES" ←追加(clamd起動) clamav_freshclam_enable="YES"
clamavとの連携で、permissionの問題とかあれこれあって、種々試した結果、最も工数の少ない方法が、結局
/usr/ports/security/amavisd-new/Makefile
AMAVISUSER?= clamav AMAVISGROUP?= clamav
と変更することだった。orz
別の id でインストールしていた場合は、その状態でアンインストールし、/usr/local/etc/ と、/var/のamavis関連ディレクトリを削除してから、
# portinstall amavisd-new --batch
する、ヨロシ。
etc/rc.conf
amavisd_enable="YES"
/usr/local/etc/amavisd.conf
# @bypass_spam_checks_maps = (1); # controls running of anti-spam code ↓ @bypass_spam_checks_maps = (1); # controls running of anti-spam code ←コメント解除(スパムチェックを行わない) $mydomain = 'example.com'; # a convenient default for other settings ↓ $mydomain = 'freebsd.orz'; # a convenient default for other settings ←変更(ドメイン名を指定) $virus_admin = "virusalert\@$mydomain"; # notifications recip. ↓ #$virus_admin = "virusalert\@$mydomain"; # notifications recip. ←コメントアウト(ウイルス検知を管理者に通知しない) ↓下記をコメント解除 ### http://www.clamav.net/ ['ClamAV-clamd', \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.sock"], qr/\bOK$/m, qr/\bFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
main.cf
# Filter configuration content_filter = smtp-amavis:[127.0.0.1]:10024
master.cf
# Amavis configuration smtp-amavis unix - - n - 2 smtp -o smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes -o max_use=20 127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_delay_reject=no -o smtpd_client_restrictions=permit_mynetworks,reject -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions=reject_unauth_pipelining -o smtpd_end_of_data_restrictions= -o mynetworks=127.0.0.0/8 -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000 -o smtpd_client_connection_count_limit=0 -o smtpd_client_connection_rate_limit=0
Total access 1301:本日 1:昨日 0