(1)ユーザ登録とダウンロード
|
|
|
|
(2)AntiVir MailGateインストール |
|
$cd /usr/local
$tar xvzf avlxmgt.tgz
$cd antivir-mailgate-2.0.2-9 ←数字はバージョンにより変化
#su
#./avinstall.pl
|
- ダウンロードしたファイルavlxmgt.tgzを解凍する。
|
(3)AntiVir MailGate設定
|
|
##############################################
## avmailgate.conf
##
##############################################
User uucp
# Group antivir
Group uucp
Postmaster postmaster
# MyHostName localhost
MyHostName inohara.net ←自分のドメインを入力
SpoolDir /var/spool/avmailgate
AntiVirDir /usr/lib/AntiVir
TemporaryDir /tmp
SMTPBanner "AntiVir MailGate"
# PidDir /var/tmp
PidDir /var/run/untivir
# ListenAddress 0.0.0.0 port 25
ListenAddress localhost port antivir
# ForwardTo SMTP: localhost port 825
ForwardTo SMTP: localhost port smtp-backdoor
# ExposeRecipientAlerts LOCAL
ExposeRecipientAlerts YES
# AlertsUser someone@anywhere.tld
AlertsUser kazuyoshi@inohara.net
|
#mkdir -m 755 /var/run/antivir
#chown uucp:uucp /var/run/antivir
#cd antivir-mailgate-2.0.2-9
#cp ./avmailgate/init/rc.avgate.redhat
/etc/init.d/avgate
#cd /etc/init.d
#chmod 755 avgate
#/sbin/chkconfig --add avgate
#/sbin/chkconfig --list avgate
avgate 0:off 1:on 2:on 3:on 4:off 5:on
6:off
#cp hbedv.key /usr/lib/AntiVir/
#chown uucp:uucp /usr/lib/AntiVir/hbedv.key |
- /etc/avmailgate.confを左記のとおり設定する。
- メールで届いたライセンスファイル「hbedv.key」を/usr/lib/AntiVir/にコピーする。
|
(4)Postfix設定 |
|
# Content Filter for postfix
antivir 10024/tcp #Port for avgated
smtp-backdoor 10025/tcp #Port for postfix
|
|
#antivir mailgate
localhost:smtp-backdoor inet n - n
-
-
smtpd -o content_filter=
|
|
# Antivir Einbindung
content_filter = smtp:127.0.0.1:10024
|
|
- /etc/postfix/master.cfに追加する。
- /etc/postfix/main.cfに追加する。
|
(5)動作確認 |
|
#/etc/rc.d/init.d/avgate start
#/etc/rc.d/init.d/postfix reload
#/etc/rc.d/init.d/postfix status
master (pid xxx)を実行中...
| X-AntiVirus: checked by AntiVir MailGate
(version: 2.0.2-9; AVE: 6.28.0.19; VDF: 6.28.0.101;
host: inohara.net) |
* * * * * * * * * * * * * * * AntiVir ALERT
* * * * * * * * * * * * * * *
This version of AntiVir is licensed for private
and non-commercial use.
AntiVir has detected the following in a mail
addressed to you:
Eicar-Test-Signature virus
The mail was not delivered.
Mail-Info:
--8<--
Message-Id: <20041202171033.5AC2.KAZUYOSHI@inohara.net>
From: =?ISO-2022-JP?B?GyRCQ3Y4NjBsNUEbKEI=?=
<kazuyoshi@inohara.net>
To: =?ISO-2022-JP?B?GyRCMGw1QRsoQg==?= <kazuyoshi@inohara.net>
Date: Thu, 02 Dec 2004 17:10:52 +0900
Subject: Fw: =?ISO-2022-JP?B?GyRCNTw7dyUmJSMlayU5QXc/LhsoQg==?=
--8<--
This version of AntiVir is licensed for private
and non-commercial use.
--
AntiVir for UNIX
Copyright (c) 1994-2004 by H+BEDV Datentechnik
GmbH.
All rights reserved.
For more information see http://www.antivir.de/
or http://www.hbedv.com/
|
|
- 自宅サーバのメールアドレスにメールを送信し、受信メールのヘッダーに左記のようなメッセージがあれば正常動作です。
- ウィルス添付のテストはeicarのThe Anti-Virus test fileのdownload areaのeicar.com.txtをダウンロードする。
- ダウンロードしたファイルを添付して自宅サーバのメールアドレスに送信。
- avmailgate.confの「AlertsUser」で設定した通知先へ左記のような駆除メールが届く。
|
(6)自動アップデート |
|
# /usr/lib/AntiVir/antivir --update
AntiVir / Linux Version 2.1.2-15 +gui
Copyright (c) 1994-2004 by H+BEDV Datentechnik
GmbH.
All rights reserved.
checking for updates
06.28.00.101 <=> 06.28.00.101 [vdf
database, loaded]
06.28.00.19 <=> 06.28.00.19 [scan engine,
running]
02.01.02.15 <=> 02.01.02.15 [main program,
running]
AntiVir is up-to-date
# cat /etc/crontab
略
35 * * * * root /usr/lib/AntiVir --update
-q
|
- パターンファイルの更新は、最初の一回を手動で実施する。(左記参照)
- /etc/crontabに毎時xx分に更新されるよう追加されていることを確認する。(左記の例では毎時35分に更新)
|