[ale] Processing mail

Gary Maltzen maltzen at mm.com
Fri Jun 25 11:10:55 EDT 1999


First answer was incomplete; from `man procmail`

       Procmail  can  also  be  invoked to postprocess an already
       filled system mailbox.  This can be useful  if  you  don't
       want  to or can't use a $HOME/.forward file (in which case
       the following script could  periodically  be  called  from
       within cron(1), or whenever you start reading mail):

              #!/bin/sh

              ORGMAIL=/var/spool/mail/$LOGNAME

              if cd $HOME &&
               test -s $ORGMAIL &&
               lockfile -r0 -l1024 .newmail.lock 2>/dev/null
              then
                trap "rm -f .newmail.lock" 1 2 3 13 15
                umask 077
                lockfile -l1024 -ml
                cat $ORGMAIL >>.newmail &&
                 cat /dev/null >$ORGMAIL
                lockfile -mu
                formail -s procmail <.newmail &&
                 rm -f .newmail
                rm -f .newmail.lock
              fi
              exit 0


-----Original Message-----
 From: Jim Popovitch <jimpop at rocketship.com>


I have an account on my Linux server with an inbox already full of email.
What can I trigger to process that email against a new .procmailrc file?






More information about the Ale mailing list