「筆記」安裝防廣告信機制 SpamAssassin
安裝完 procmail 後,必須修改 sendmail.cf,該如何讓 sendmail 利用 procmail 來過濾信件?man 1 procmail 中有一段:
----------------------------------------------------------------------
Examples for rcfile recipes can be looked up in the procmailex(5) man
page. A small sample rcfile can be found in the NOTES section below.
Skip the rest of this EXAMPLES section unless you are a system adminis-
trator who is vaguely familiar with sendmail.cf syntax.
The -m option is typically used when procmail is called from within a
rule in the sendmail.cf file. In order to be able to do this it is
convenient to create an extra `procmail' mailer in your sendmail.cf
file (in addition to the perhaps already present `local' mailer that
starts up procmail). To create such a `procmail' mailer I'd suggest
something like:
Mprocmail, P=/usr/local/bin/procmail, F=mSDFMhun, S=11, R=21,
A=procmail -m $h $g $u
-----------------------------------------------------------------------
/usr/local/etc/procmailrc 該如何設定?以讓 procmailrc 利用 SpamAssassin 來處理垃圾廣告信?
/usr/local/share/doc/p5-Mail-SpamAssassin/procmailrc.example 是範例檔可供參考。
利用 SpamAssassin
1.利用 ports 安裝 SpamAssassin ,設定檔位於:/usr/local/etc/mail/spamassassin/local.cf
2.可利用 SpamAssassin 設定檔產生器直接設定:
SpamAssassin Configuration Generator
3.設定檔參數說明:
http://spamassassin.apache.org/full/3.0.x/dist/doc/Mail_SpamAssassin_Conf.html
4.廣告郵件後續處理:
將廣告信件移到每位user家目錄的 mail/spam-mail
:0:
* ^X-Spam-Status: Yes
$HOME/mail/spam-mail
留言
張貼留言