Postfix + spampd + SpamAssassin
概要
spampdは,SMTP Proxyとして動作するContent Filtering Daemonです.SpamAssassinのSMTP wrapperのようなプログラムです.
環境
- Debian sarge
- SpamAssassin
- spampd
作業手順
(1) spampdをインストール
# apt-get install spampd
(2) /etc/default/spampdを編集
# vi /etc/default/spampd
特に編集するところはない.以下のことがわかる.
(3) /etc/postfix/master.cfを編集
編集前
smtp inet n - - - - smtpd
編集後(2行目以降を追加)
smtp inet n - - - - smtpd -o content_filter=scan:[127.0.0.1]:10025 -o receive_override_options=no_address_mappings scan unix - - - - 16 smtp -o smtp_send_xforward_command=yes 127.0.0.1:10026 inet n - - - 10 smtpd -o content_filter= -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks -o smtpd_helo_restrictions= -o smtpd_client_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
(4) Postfix再起動
# /etc/init.d/postfix reload
(5) Permissions変更 (Spampd用)
May 6 13:47:39 MYHOSTNAME spampd[14209]: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile /var/lib/spamassassin/auto-whitelist.lock.MYFQDN.14209 for /var/lib/spamassassin/auto-whitelist.lock: 許可がありません
と,文句を言われたのでPermission変更.
# chgrp spampd /var/lib/spamassassin # chgrp spampd /var/lib/spamassassin/auto-whitelist