UNIX/設定、設定ファイル/.procmailrc


"|IFS=' '&&p=/usr/local/bin/procmail&&test -f $p&&exec $p -Yf-||exit 75 #[id]"

Table of Contents
PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:/usr/ucb:/usr/bsd
LOGFILE=$HOME/Mail/procmail.log
MAILDIR=$HOME/Mail/
:0
*^From: .*spam.*|^From: .*uzai.*
/dev/null
:0 c
*^Subject: .*lectures.*
lectures/.
:0 c
*!^From: .*keitai@keitai.com.*
! keitai@keitai.com
:0
*^Subject: .*command.*
| command
PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:/usr/ucb:/usr/bsd

LOGFILE=$HOME/Mail/procmail.log

MAILDIR=$HOME/Mail/

:0 [flags] [ : [locallockfile] ]
* <zero or more conditions (one per line)>
<exactly one action line>
:0
*^From: .*spam@spam\.com.*|^From: .*uzai.*
/dev/null

^From: .*spam@spam\.com.*
:0
*^From: .*spam@spam\.com.*|^From: .*uzai.*
/dev/null
:0
*^From: .*spam@spam\.com.*
*^From: .*uzai.*
/dev/null
:0 c
*!^From: .*keitai@keitai\.com.*
! keitai@keitai.com

:0 c
*!^From: .*keitai@keitai\.com.*
! keitai@keitai.com
:0 c
*^Subject: .*lectures.*
lectures/.

:0
*^Subject: .*command.*
| command

:0
*^Subject: test
{
   :0 c
   *<1000
   ! hoge@hogehoge.or.jp
   :0 c
   test/.
}
*^Subject: test

:0 c
* ^Subject: test|^Subject: jikken
test/.
:0 c
*^Subject: hoge
hoge/.
:0 c
*!^Subject: test
*!^Subject: jikken
*!^Subject: hoge
else/. 

% mv ~/.procmailrc ~/.procmailrc.bak

# まともでない Content-Type
:0:
* ^Content-Type:.*(text/html|DEFAULT_CHARSET)
/dev/null
# 何かのワームがつける
:0:
* ^-path:.*
/dev/null
:0
* ^Content-Type:.*multipart/alternative;
{
   # テキストが HTML パートしかない
   :0 B
   * ^Content-Type:.*text/html;
   * ! ^Content-Type:.*text/plain;
   /dev/null

   # 不正な charset
   :0 B
   * ^Content-Type:.*charset="?iso-(1111|2222|3333|4444|5555|6666|7777|8888|9999|0000)
   /dev/null
}

xrea