procmail
[Top] [All Lists]

processing existing mail -- any problems?

1996-04-18 17:07:04

-----BEGIN PGP SIGNED MESSAGE-----

From the man page:

     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=/usr/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

Can this script _ever_ lose mail?  I have this deep suspicion that some of
my mail is getting lost, but I can't be completely sure.

Thanks for any help.

- -- 
Internet: dummy(_at_)c2(_dot_)org                   In real life: Robert Brown,
URL: http://www.c2.org/~dummy                          in sunny Berkeley, CA
         >> Californians!  Repeal Prop 13! <<          waiting for The Big One
            >> Embargo China, not Cuba. <<             (510) 464-4604


-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQB1AwUBMXbYKzZMMbnCKCB9AQHG8gMAx7perq7EQMp+WKYj7+ADHIAbQR51wcAk
ntXecvHyF6pq5nEGPBfOaQppfDH9TTHvhe6/P0P1cpjMCIweq2RCggOz4dQu/oyL
1mVe6iPDrKn3gfj46zlc8Mj7MYT+PkSu
=HBVi
-----END PGP SIGNATURE-----

My PGP public key (automatically included) follows:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQBtAy+uZ4AAAAEDAPUN+s6td7KJKdhpIefcdTsR6d9Na2hlG774DYDq5MLdUxXb
rpY22CO7n8r9PPpZ8m8Huf8Wlg61tHoOCqrpjFa6a1amKJLzfHyFuTcn2a8Hh779
unLxGXA2TDG5wiggfQAFEbQMZHVtbXlAYzIub3JntA1kdW1teUBlbWYubmV0
=IlpO
-----END PGP PUBLIC KEY BLOCK-----

<Prev in Thread] Current Thread [Next in Thread>
  • processing existing mail -- any problems?, Robert <=