-AntiVirMailgate 導入-

   
 tar -zxvf avfbmgt.tgz

sub2# cd antivir-mailgate-2.0.1.16
sub2# ls
LIESMICH README VERSION avmailgate

sub2# cd avmailgate
sub2# ls
ChangeLog INSTALL.qmail bin man
INSTALL INSTALL.sendmail doc pgp
INSTALL.DE LICENSE etc script
INSTALL.exim LICENSE.DE init templates
INSTALL.postfix README.FreeBSD legal vdf

一応、中を確認しておきます^_^;
README.FreeBSD
Automatic installation:
-----------------------

Now there is a port of AntiVir MailGate for FreeBSD. You can
download this port from our ftp server ftp.antivir.de/freebsd/ports.
After downloading the port, change to the / directory and extract
the tarball.
Change to /usr/ports/security/avmailgate and do make and
make install.
If sendmail is running on port 25, kill sendmail before installing
AntiVir MailGate.


Manual installation:
--------------------

The installation on FreeBSD is almost the same procedure as on
Linux. Just some little notes.

The pid files per default reside in /var/run.
This directory usually is owned by root:wheel and the
permissions are drwxr-x---.
This inhibits AntiVir MailGate from creating the pid files there.
You may either use another directory for the pid files
or you can change the Group in avmailgate.conf to "wheel" and
make /var/run group writable. This should not inherit any
security risks.

postfix用の設定マニュアルも 見てみましょう(*^_^*)
INSTALL.postfix

Here is the description how to install AntiVir MailGate to work with postfix:

First you have installed AntiVir MailGate described in INSTALL.

There are two possible ways of integrating AntiVir MailGate under
postfix. One of these is to make AntiVir MailGate listen at port 25
and forward the emails to postfix. The other is to integrate AntiVir
MailGate in postfix as content filter. This is possible from
the Snapshot 20000520 version of postfix onwards. A release with
content filtering capacity is available from version 20010228 onwards.
We prefer to use the content filter method because the whole SMTP functionality
of Postfix will be available.

1. Content filter
-----------------

Edit the /etc/services and add the following entries:
# Content Filter for postfix
antivir 10024/tcp #Port for avgated
smtp-backdoor 10025/tcp #Port for postfix backdoor

Edit /etc/avmailgate.conf and modify the following entries:

# Select interface and port, the smtp daemon will listen on.
# Port may be given as a number or a service name.
ListenAddress localhost port antivir

# Select how mail should be forwarded.
# Send mail by piping it thru sendmail (this is the default)
#ForwardTo /usr/sbin/sendmail -oem -oi
# Or if you want the mail to be sent by SMTP
ForwardTo SMTP: localhost port smtp-backdoor

If you are using SuSE Mail Server 2 change also the following
line from:
#AllowSourceRouting NO
to:
AllowSourceRouting YES

Close AntiVir MailGate and restart it: /etc/init.d/avgate restart
Insert the following entry in /etc/postfix/master.cf:

# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (50)
smtp inet n - n - - smtpd
# F<FC>r AntiVir Maild<E4>mon
localhost:smtp-backdoor inet n - n - - smtpd -o content_filter=

Make sure that the first character in the table is not a space.
The entry smtpd -o content_filter deactivates the relevant line in a
second invocation of postfix. (to avoid generating a mail loop!)

Insert the following entry in /etc/postfix/main.cf:

# Antivir Einbindung
content_filter = smtp:127.0.0.1:10024

Restart postfix:
/etc/init.d/postfix restart

Note:
If postfix sets all emails to status "deferred" after installing
AntiVir MailGate search the line:
defer_transports = local

and add the following comment char using #:
#defer_transports = local


2. Listening on port 25
-----------------------

This is the second way how to implement AntiVir MailGate in postfix:

Edit the file master.cf. Locate the following line:
smtp inet n - n - - smtpd

and add the following comment char using #:
#smtp inet n - n - - smtpd

This will prevent postfix from listening at the SMTP port, and enable
avgated to do so instead. Emails forwarded by avgatefwd will then be
processed by sendmail wrapper /usr/lib/sendmail, which is included
with postfix.

Restart postfix:
/etc/rc.d/postfix restart

ディレクトリを作成して、設定ファイルをコピーしました。
sub2# mkdir /usr/lib/AntiVir
sub2# cp vdf/antivir.vdf /usr/lib/AntiVir
sub2# chown uucp:uucp /usr/lib/AntiVir
sub2# chown uucp:uucp /usr/lib/AntiVir/antivir.vdf
sub2# cp bin/antivir /usr/lib/AntiVir
sub2# chown uucp:uucp /usr/lib/AntiVir/antivir
sub2# cp etc/avmailgate.conf /etc
sub2# cp etc/avmailgate.acl /etc
sub2# cp etc/antivir.conf /etc
sub2# cp bin/avgated /usr/sbin
sub2# cp bin/avgatefwd /usr/sbin
sub2# mkdir /var/spool/avmailgate
sub2# chown uucp:uucp /var/spool/avmailgate
sub2# chmod 700 /var/spool/avmailgate
sub2# cd /var/spool/avmailgate
sub2# pwd
/var/spool/avmailgate
sub2# mkdir incoming
sub2# mkdir outgoing
sub2# chown uucp:uucp *
sub2# chmod -R 700 *


登録したメールアドレス宛に添付で届いたhbedv.keyを、
avmgate.keyと言う名前でコピーしました。

sub2# cp hbedv.key /usr/lib/AntiVir/avmgate.key
sub2# chown uucp:uucp /usr/lib/AntiVir/avmgate.key


10024/tcp 10025/tcpポートを追加記述しました。
sub2# vi /etc/services
# Network services, Internet style
#
# Note that it is presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; hence, most entries here have two entries
# even if the protocol doesn't support UDP operations.
#
# The latest IANA port assignments can be gotten from
#
# http://www.iana.org/assignments/port-numbers
#
# The Well Known Ports are those from 0 through 1023.
# The Registered Ports are those from 1024 through 49151
# The Dynamic and/or Private Ports are those from 49152 through 65535
#
# Kerberos services are for Kerberos v4, and are unofficial. Sites running
# v5 should uncomment v5 entries and comment v4 entries.
#
# $FreeBSD: src/etc/services,v 1.62.2.12 2003/02/01 16:48:17 schweikh Exp $
# From: @(#)services 5.8 (Berkeley) 5/9/91
#
# WELL KNOWN PORT NUMBERS
#
rtmp 1/ddp #Routing Table Maintenance Protocol
tcpmux 1/tcp #TCP Port Service Multiplexer
〜〜〜〜〜〜省略〜〜〜〜〜〜
antivir 10024/tcp                          
smtp-backdoor 10025/tcp               


〜〜〜〜〜〜省略〜〜〜〜〜〜