$ apt-get install file bzip2 lha unarj unrar zooarc は Debianのパッケージにはないので、 RedHat のrpmパッケージ(arc-5.21e-6.i386.rpm)を、 alienで deb に変換してインストールしました。
$ alien arc-5.21e-6.i386.rpm $ dpkg -i arc_5.21e-7_i386.deb
$ apt-get install libio-stringy-perl libunix-syslog-perl libmailtools-perl libmime-base64-perl libmime-perl libconvert-uulib-perl libconvert-tnef-perl libcompress-zlib-perl libarchive-tar-perl libarchive-zip-perl libnet-perl libtimedate-perl
$ adduser --system --no-create-home --group vscanアーカイブを展開しコンパイルします。
$ tar -xzvf ~michi/amavis-perl-11.tar.gz $ cd amavis-perl-11 $ ./configure --enable-smtp --enable-postfix $ make $ make check #ちゃんと動くかテストします。 ================== All 4 tests passed #テストが合格すればOK! ================== $ make install
content_filter = vscan:
/etc/postfix/master.cf に次の行を追加します。
vscan unix - n n - 10 pipe user=vscan argv=/usr/sbin/amavis ${sender} ${recipient} localhost:10025 inet n - n - - smtpd -o content_filter=最後に、Postfixに設定ファイルを読み込ませます。
$ postfix reload
ウィルスに感染したメールの送り主には、
Subject: VIRUS IN YOUR MAIL From: postmaster@domain.jp To: sousin@domain.jp V I R U S A L E R T Our viruschecker found the 'Eicar-Test-Signatur' virus(es) in your email to the following recipient(s): -> jyusin@domain.jp Delivery of the email was stopped! Please check your system for viruses, or ask your system administrator to do so. For your reference, here are the headers from your email: ------------------------- BEGIN HEADERS ----------------------------- ここに、ウィルスに感染したメールのヘッダーが添付されます。 -------------------------- END HEADERS ------------------------------というメールが送られます。
Subject: FOUND VIRUS IN MAIL from sousin@domain.jp From: postmaster@domain.jp To: virusalert@domain.jp A virus was found in an email from: sousin@domain.jp The message was addressed to: -> jyusin@domain.jp The message has been quarantined as: /var/lib/amavis/virusmails/virus-20020830-201717-2949 Here is the output of the scanner: AntiVir / Linux Version 2.0.3.22 Copyright (C) 1994-2002 by H+BEDV Datentechnik GmbH. All rights reserved. Loading /usr/lib/AntiVir/antivir.vdf ... VDF version: 6.15.0.5 created 27 Aug 2002 AntiVir license: XXXXXXXX for Yamamoto Michinari , XXXXX checking drive/path (list): /usr/../var/lib/amavis/amavis-XXWSukmp/parts /usr/../var/lib/amavis/amavis-XXWSukmp/parts/msg-2949-1.txt Date: 30.08.2002 Time: 20:17:16 Size: 69 VIRUS: file contains code of the virus 'Eicar-Test-Signatur' ----- scan results ----- directories: 1 files: 1 infected: 1 repaired: 0 deleted: 0 renamed: 0 scan time: 00:00:01 ------------------------ Thank you for using AntiVir. Here are the headers: ------------------------- BEGIN HEADERS ----------------------------- ここに、ウィルスに感染したメールのヘッダーが添付されます。 -------------------------- END HEADERS ------------------------------というメールが送られます。