On Mon, 26 Aug 1996, Rick Macdonald wrote: > > So, I figure I need a program to use as an external movemail program for > Netscape (I've been using its internal one) that has the smarts of a > mail filter. > > Can procmail or mailagent be used as a batch "movemail" program like > this?
Yes, procmail comes with a sample script for doing this with procmail. Since my system doesn't allow forwarding to a program (grrrrr), I just run this script that I call 'getmail' from my login shell. I suppose it would work as you want with netscape, but I can't guarantee anything. Procmail can use local locks on the folders which I assume that netscape would honor, but I haven't tried it. Appended is the 'getmail' script. Tony. #!/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