Fedora 13
Sponsored Link

アンチウィルス Clamav との連携2010/06/02

[1] clamav はインストール済み( [1]の yum でインストールする手順 )として、postfix と clamav を連携させて メールをリアルタイムスキャンできるようにします。
[root@mail ~]#
yum -y install amavisd-new


[root@mail ~]#
vi /etc/amavisd/amavisd.conf


# 21行目:ドメイン名指定

$mydomain
= '
srv.world
';


# 55行目:自ネットワークに変更

@mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
                       
10.0.0.0/24
);

# 152行目:コメント解除しFQDN指定

$myhostname
= '
mail.srv.world
';


# 154行目:以下2行コメント解除

$notify_method
= 'smtp:[127.0.0.1]:10025';

$forward_method
= 'smtp:[127.0.0.1]:10025';


[root@mail ~]#
vi /etc/postfix/main.cf


# 最終行へ追記

content_filter=smtp-amavis:[127.0.0.1]:10024


[root@mail ~]#
vi /etc/postfix/master.cf


# 最終行へ以下全行追記

smtp-amavis unix -       -       n      -     2 smtp
      -o smtp_data_done_timeout=1200
      -o smtp_send_xforward_command=yes
      -o disable_dns_lookups=yes
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_client_restrictions=
      -o smtpd_helo_restrictions=
      -o smtpd_sender_restrictions=
      -o smtpd_recipient_restrictions=permit_mynetworks,reject
      -o mynetworks=127.0.0.0/8
      -o strict_rfc821_envelopes=yes
      -o smtpd_error_sleep_time=0
      -o smtpd_soft_error_limit=1001
      -o smtpd_hard_error_limit=1000


[root@mail ~]#
/etc/rc.d/init.d/clamd.amavisd start

Starting clamd.amavisd: LibClamAV Warning: ***********************************************************
LibClamAV Warning: *** This version of the ClamAV engine is outdated. ***
LibClamAV Warning: *** DON'T PANIC! Read http://www.clamav.net/support/faq ***
LibClamAV Warning: ***********************************************************
[  OK  ]
[root@mail ~]#
/etc/rc.d/init.d/amavisd start

Starting Mail Virus Scanner (amavisd):
[  OK  ]

[root@mail ~]#
/etc/rc.d/init.d/spamassassin start

Starting spamd:
[  OK  ]

[root@mail ~]#
/etc/rc.d/init.d/postfix restart

Shutting down postfix:
[  OK  ]

Starting postfix:
[  OK  ]

[root@mail ~]#
chkconfig clamd.amavisd on

[root@mail ~]#
chkconfig amavisd on

[root@mail ~]#
chkconfig spamassassin on
  メールを送ってみると以下のようなヘッダがつきます。
 
関連コンテンツ