Rob Hudson wrote:

> What's the best way to test a procmail recipe?

*A* way is like this.

    $ cat > testmsg
    From [EMAIL PROTECTED] 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>
                                        [EMAIL PROTECTED]
_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug

Reply via email to