Postfixと共に使用して,ウィルススキャンすることができます.
# tar zxf clamav-0.84.tar.gz
# cd clamav-0.84 # ./configure --prefix=/usr/local/clamav --disable-dns --disable-zlib-vcheck # FC3 or # ./configure --prefix=/usr/local/clamav --disable-dns #RHL9 # make # make install上記の設定だと,ClamAV関係のファイルは,/usr/local/clamav以下に置かれます.
# cd /usr/local/clamav # mkdir log run # chown clamav:clamav *
LogFile /usr/local/clamav/log/clamd.log LogTime PidFile /usr/local/clamav/run/clamd.pid DatabaseDirectory /usr/local/clamav/share/clamav LocalSocket /tmp/clamd FixStaleSocket User clamav ScanOLE2 ScanMail ScanArchive |
DatabaseDirectory /usr/local/clamav/share/clamav UpdateLogFile /usr/local/clamav/log/freshclam.log PidFile /usr/local/clamav/run/freshclam.pid DatabaseOwner clamav DNSDatabaseInfo current.cvd.clamav.net DatabaseMirror database.clamav.net Checks 4 #HTTPProxyServer proxy.hogrhogr.jp # Proxyを使っている場合に指定 #HTTPProxyPort 8080 # Proxyのポート番号 |
# /usr/local/clamav/bin/freshclamを実行することで,更新されます.
# /usr/local/clamav/sbin/clamd -c /usr/local/clamav/etc/clamd.confにて,デーモンを起動させます(後述のClamSMTPで必要).
# tar zxf clamsmtp-1.4.1.tar.gz
# cd clamsmtp-1.4.1 # ./configure --prefix=/usr/local/clamsmtp # make # make install
OutAddress: 10026 ClamAddress: /tmp/clamd ScanHeader: X-AV-Checked: ClamAV0.84rc2 using ClamSMTP1.4.1 User: clamav |
queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix mail_owner = postfix myhostname = mail.kmisu.net mydomain = kmisu.net myorigin = $mydomain inet_interfaces = all mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain unknown_local_recipient_reject_code = 550 mynetworks_style = subnet mynetworks = 192.168.0.0/24, 127.0.0.0/8 alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail newaliases_path = /usr/bin/newaliases mailq_path = /usr/bin/mailq setgid_group = postdrop html_directory = no manpage_directory = /usr/local/man sample_directory = /etc/postfix readme_directory = no ### 以下を追記 ### allow_mail_to_commands = alias,forward,include smtpd_client_restrictions = permit_mynetworks,check_client_access hash:/etc/postfix/reject_list,permit smtpd_sender_restrictions = permit_mynetworks,check_sender_access hash:/etc/postfix/reject_list content_filter = scan:127.0.0.1:10025 receive_override_options = no_address_mappings |
smtp inet n - n - - smtpd pickup fifo n - n 60 1 pickup cleanup unix n - n - 0 cleanup qmgr fifo n - n 300 1 qmgr rewrite unix - - n - - trivial-rewrite bounce unix - - n - 0 bounce defer unix - - n - 0 bounce trace unix - - n - 0 bounce verify unix - - n - 1 verify flush unix n - n 1000? 0 flush proxymap unix - - n - - proxymap smtp unix - - n - - smtp relay unix - - n - - smtp showq unix n - n - - showq error unix - - n - - error local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - n - - lmtp anvil unix - - n - 1 anvil maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} old-cyrus unix - n n - - pipe flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user} cyrus unix - n n - - pipe user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user} uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - n n - - pipe flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient ### 以下を追記 ### scan unix - - n - 16 smtp -o smtp_send_xforward_command=yes 127.0.0.1:10026 inet n - n - 16 smtpd -o content_filter= -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks -o smtpd_helo_restrictions= -o smtpd_client_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks_style=host -o smtpd_authorized_xforward_hosts=127.0.0.0/8 |
citibank.com REJECT citizensbank.com REJECT hotmail.com REJECT smithbarney.com REJECT yahoo.co.jp REJECT yahoo.com REJECT |
# /usr/sbin/postmap /etc/postfix/reject_list
このサイト上で提供しているインストール法,設定例を,
適用した結果生じたいかなる障害・損害に対しても,
私(K.Misu)は責任を負いません.
このサイト上で提供している情報を利用する場合は,
各人の自己責任にて判断,適用して下さい.