procmail
[Top] [All Lists]

Re: Running Procmail from Command Line

1996-08-17 06:20:31
Paul O. Bartlett writes on 17 August 1996 at 07:56:23
[...]
it when I looked back at man procmail, but for future reference, is
there some way to run procmail from the command line to clear up the
backlog in the queue and distribute the mail as it would have been

Here's a "post_process_procmail" shell script; swiped from a posting
to the list from long ago.

#!/bin/sh
PATH=$PATH:/usr/local/bin; export PATH

   umask 077
   lockfile -l3600 $HOME/.newmail.lock
   lockfile -l3600 -ml
   cat /usr/mail/$LOGNAME >>$HOME/.newmail &&
   cat /dev/null >/usr/mail/$LOGNAME
   lockfile -mu
   formail -s procmail <$HOME/.newmail
   rm -f $HOME/.newmail $HOME/.newmail.lock
exit 0

   Dan
------------------- message is author's opinion only ------------------
J. Daniel Smith <DanS(_at_)bristol(_dot_)com>        http://www.bristol.com/~dan
Bristol Technology B.V.                   +31 33 450 50 50, ...51 (FAX)
Amersfoort, the Netherlands               {info,jobs}(_at_)bristol(_dot_)com

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Running Procmail from Command Line, J. Daniel Smith <=