Bob MillerMon Dec 12 20:38:26 PST 2005
Rob Hudson wrote:
> What's the best way to test a procmail recipe?
*A* way is like this.
$ cat > testmsg
From a at a Thu Jan 1 00:00:00 GMT 1970
Interesting-Header: interesting value
Body.
^D
$ cp .procmailrc testprocmailrc
:0
* Interesting-Header:
testmbox
^D
$ tail -f testmbox &
$ until echo -n 'Done? '
> read x
> [[ "$x" ~= [Yy]* ]]
> do
> man procmailrc
> "$EDITOR" testprocmailrc
> procmail testprocmailrc < testmsg
> done
$ mv testprocmailrc .procmailrc
--
Bob Miller K<bob>
kbob at jogger-egg.com