Navigation : Top / procmailでspamを撃退

procmailでspamを撃退

procmailでは届いたメールにフィルターががかけられる.

1. .forwardの設定

"|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #mori" 

2. .procmailrcの設定

PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:. 
MAILDIR = $HOME/Mail 
DEFAULT = /var/mail/mori 
LOGFILE = $MAILDIR/procmaillog 
LOCKFILE = $HOME/.lockmail 
SPAM = $MAILDIR/spam 

# 
# --- filter for spam 
# 

:0 
* ^(To|CC):.*Undisclosed\.Recipients 
$SPAM 

# --- subject filter  

:0 
* ^Subject:.*Casino 
$SPAM 

# --- address filter 

:0 
* ^From:.*yahoo.com 
$SPAM 

★参考 http://web.tac.tsukuba.ac.jp/~hiromi/Guide/procmail.html