場合
[pepo1@~]$ cat .procmailrc
#$HOME/.procmailrc
VERBOSE=on
LOGFILE=$HOME/procmail.log
# Is it coming from Cron If yes, DELETE IT!!!
# Other coming in mbox
:0
* ^Subject.*Cron
/dev/null
# Cron以外の全てmboxへ
#:0
#* ! ^Subject: Cron
#mbox
とコメントアウトしてテスト
[root@~]# mail root
Subject: Test no mbox
Test no mbox
.
Cc:
[root@~]#
きちんとspoolされとる。。当たり前か
[pepo1@~]$ mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/pepo1": 1 message 1 new
>N 1 root@www.pepolinux.l Wed Mar 18 12:26 21/841 "Test no mbox"
& 1
Message 1:
From root@www.pepolinux.local Wed Mar 18 12:26:09 2009
X-Original-To: root@www.pepolinux.local
Delivered-To: pepo1@pepolinux.local
Delivered-To: root@www.pepolinux.local
Date: Wed, 18 Mar 2009 12:26:09 +0900
From: root <root@www.pepolinux.local>
To: root@www.pepolinux.local
Subject: Test no mbox
Test no mbox
& q
Saved 1 message in mbox
[pepo1@~]$
[pepo1@~]$ cat procmail.log
procmail: Match on "^Subject.*Cron"
procmail: Assigning "LASTFOLDER=/dev/null"
procmail: Opening "/dev/null"
procmail: Notified comsat: "pepo1@0:/dev/null"
From root@www.pepolinux.local Wed Mar 18 12:25:01 2009
Subject: Cron <root@www> /usr/bin/webalizer -c /etc/webalizer.conf
Folder: /dev/null 1451
procmail: No match on "^Subject.*Cron"
procmail: Bypassed locking "/var/mail/pepo1.lock"
procmail: Assigning "LASTFOLDER=/var/mail/pepo1"
procmail: Opening "/var/mail/pepo1"
procmail: Acquiring kernel-lock
procmail: Notified comsat: "pepo1@0:/var/mail/pepo1"
From root@www.pepolinux.local Wed Mar 18 12:26:09 2009
Subject: Test no mbox
Folder: /var/mail/pepo1