procmail
[Top] [All Lists]

terrible time with procmail

1998-11-06 11:39:02
I have used procmail for several months now and all of
a suddend wierd things are happening.

I am running a script from the command line that sorts
by Netscape Inbox to folders that I specify.  The mail in
the Inbox does not get sorted and when the Inbox gets
written back out after running procmail most of the "From -"
lines are replaces with ">From -" so that these lines that
are replaced are not recognized as mail message separators
when I launch Netscape mail.  I cannot figure out why this
is happening.

Any help would be appreciated.

Attached is the script that I am running.

thanks

Roger
#!/bin/bash

BACKUP=$1;
ORGMAIL=/export/home/rsimmons/.mail/Inbox

echo "Making backup of Inbox";
cp $ORGMAIL $ORGMAIL.bak

if [ $BACKUP = "bu" ]; then
        echo "Making backup of mail";
        rm -rf $HOME/outbox/Mail/*
        rm -rf $HOME/outbox/Mail/.??*
        cp -r $HOME/.mail/* $HOME/outbox/Mail
        cp -r $HOME/.mail/.??* $HOME/outbox/Mail
else
        echo "No Backup Created";
fi

 if cd $HOME && 
    test -s $ORGMAIL && 
    lockfile -r0 -l3600 .newmail.lock 2>/dev/null 
 then
        trap "rm -f .newmail.lock" 1 2 3 15
        umask 077
        lockfile -l3600 -ml
        cat $ORGMAIL >> .newmail &&
        cat /dev/null > $ORGMAIL
        lockfile -mu
        echo "Sorting Mail.  Please wait ...";
        formail -s procmail < .newmail &&
        rm -f .newmail
        rm -f .newmail.lock
 fi
 echo "Done";
 exit 0

#cp /var/spool/mail/rsimmons /export/home/rsimmons/.mail/Inbox
#echo "" > /var/spool/mail/rsimmons
<Prev in Thread] Current Thread [Next in Thread>