Fedora17 Clamavでメーのリアルタイムスキャン機能追加
事前にClamav のインストールが必要です。
Postfix + Clamav でメールをリアルタイムスキャンします。
●Clamasmtpのインストール
[root@localhost ~]# yum -y install clamsmtp
インストール:
clamsmtp.x86_64 0:1.10-9.fc17
依存性関連をインストールしました:
clamav-server.x86_64 0:0.97.5-1700.fc17
完了しました!
▼設定ファイルの編集
[root@localhost ~]# vi /etc/clamsmtpd.conf
6行目を変更します
# The address to send scanned mail to.
# This option is required unless TransparentProxy is enabled
OutAddress: 10026
↓
OutAddress: 127.0.0.1:10026
22行目をコメントを解除し変更します
# Address to listen on (defaults to all local addresses on port 10025)
#Listen: 0.0.0.0:10025
↓
Listen: 127.0.0.1:10025
28行目のコメントを解除します
# A header to add to all scanned email
#Header: X-Virus-Scanned: ClamAV using ClamSMTP
↓
Header: X-Virus-Scanned: ClamAV using ClamSMTP
34行目のコメントを解除します
# What to do when we see a virus (use 'bounce' or 'pass' or 'drop'
#Action: drop
↓
Action: drop
●postfixの設定変更をします
▼最終行に追加します
[root@localhost ~]# vi /etc/postfix/main.cf
#ClamSMTP機能追加
content_filter = scan:127.0.0.1:10025
▼最終行に全文追加します
[root@localhost ~]# vi /etc/postfix/master.cf
scan unix - - n - 16 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
127.0.0.1:10026 inet n - n - 16 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_style=host
-o smtpd_authorized_xforward_hosts=127.0.0.0/8
●各種サービススタート、自動起動、再起動をします。
[root@localhost ~]# systemctl start clamsmtp-clamd.service
[root@localhost ~]# systemctl start clamsmtpd.service
[root@localhost ~]# systemctl enable clamsmtp-clamd.service
ln -s '/usr/lib/systemd/system/clamsmtp-clamd.service' '/etc/systemd/system/multi-user.target.wants/clamsmtp-clamd.service'
[root@localhost ~]# systemctl enable clamsmtpd.service
ln -s '/usr/lib/systemd/system/clamsmtpd.service' '/etc/systemd/system/multi-user.target.wants/clamsmtpd.service'
[root@localhost ~]# systemctl restart postfix.service
Fedora17 Mailサーバー暗号化の設定![]() ![]() Fedora17 Mailサーバー暗号化の設定
最終行に以下5行追加します #SSL設定 masterファイルの編集です 24~25行目 コメントを解除します tlsmgr unix - - n 1000? 1 tlsmgr
8行目 暗号化要求の設定
自分の環境に合わせてください。 ▼dovecot再起動 以下のポート開放が確認できればOKです
サイトマップ・お奨め記事
★CentOS7 まとめ
スポンサードリンク
リンク
![]() ・はじめての自宅サーバ構築 - Fedora/CentOS - 相互リンク更新情報 BookMark GPUベンチマーク(ドスパラ) VMware OS仮想化 EaseUS Fedora releases ISO 【Http外部からの表示確認】 ポートスキャンチェック IPA情報処理推進機構 無料DNS ieServer 無料DNS-MyDNS yahooログイン履歴チェック メール不正中継拒否テスト Fedora Project allbootdisks Edy Viewer ESXi動作実績ハードウェア@Wiki IEEE Standards ---ライセンス認証解除系リンク--- ShadowProtect Personal .NET製品 弥生 --所有サーバーWiki-- NEC Express5800/S70 HP ProLiant ML110G5 PRIMERGY TX100 S3 カテゴリ
![]() Linux ブログランキングへ
カテゴリ2
SCCM Backup 遠隔操作 VirtualBox FeliCaポート/パソリ ESXi
カウンター
RSSリンクの表示
アクセスランキング
![]() Windows ブログランキングへ ![]() にほんブログ村
全記事表示リンク
検索フォーム
RSSリンクの表示
![]() Linux ブログランキングへ @pcmemorin からのツイート
<%plugin_third_title><%plugin_third_description> <%plugin_third_content><%plugin_third_description2> 上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。 ![]() |