I am using : procmail v3.10 1994/10/3 on RedHat Linux 5.x
Ok this is driving me crazy. I am receiving email at my university
account and my .forward forwards it to my ISP account where I am
popping it with Netscape (mail is put in $HOME/Mail/Inbox)
I have the following environment variables set: (env | grep MAIL)
MAILDIR=/export/home/rsimmons/Mail
ORGMAIL=/export/home/rsimmons/Mail/Inbox
Notice that there are no trailing slases.
I have the the following entry in .procmailrc
(This entry will work)
:0
* ^To(_dot_)*port-i386(_at_)NetBSD(_dot_)ORG
NetBSD.sbd/port-i386
I have also tried this entry (and get the same unsatisfying results):
:0
* ^To(_dot_)*port-i386(_at_)NetBSD(_dot_)ORG
NetBSD\.sbd/port-i386
I am running procmail from the command line using the lines
found in "man procmail"
The following directorys exist:
/export/home/rsimmons/Mail/NetBSD.sbd
I get the following error when running the script:
procmail: Error while writing to "NetBSD.sbd/port-i386"
I get one of these messages for every entry in my Inbox so I know
that the rule in procmailrc is working correctly as I have it above.
The problem seems to be that procmail is not looking in MAILDIR for
the "NetBSD.sbd" directory. If I mkdir $HOME/NetBSD.sbd then things
get written to there. Is there a bug in procmail that it does not look
for files in MAILDIR?
Also after running the script the file /export/home/rsimmons/Mail/Inbox
is zeroed out (empty) and all non sorted mail is moved to
/var/spool/mail/rsimmons.
I do not want it moved to there I just want Inbox to remain intact. Why
is it moving
my mail? I have read the FAQ's and man pages and everything else and
cannot figure
this out.
Here is the script that I am running:
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
Any help will be appreciated.
RS