procmail
[Top] [All Lists]

Re: Procmail error when writing to a pipe

2003-07-23 10:38:38
Dallman Ross wrote,

That's really very good, David, thanks.

You're welcome, and thank you for the compliment.

As for whether $ORGMAIL can be ls'd, though, it's certainly permissible
for the inbox to have been downloaded and hence not exist.  That's
what I thought of when I first saw that "2>/dev/null", anyway.

Hmm. I've never used a system where $ORGMAIL is removed rather than emptied out. If it does get removed, wouldn't procmail have re-created it during the sanity check? And if even then it is nonexistent (say the sanity check occurred while mail was being fetched, and $ORGMAIL was removed since then), neither ls -l nor wc -c is going to throw a clean "0" to stdout. So let's provide for its possibly being nonexistent, but presumably, if procmail got this far, it can be re-created:

 LOCKFILE=$ORGMAIL$LOCKEXT

 :0i
 INBOXSIZE=| dummy=`ls -l $ORGMAIL` && set -- $dummy && echo $5

 :0 # regional lockfile is in effect
 * -1^1 >1
 * $ -${INBOXSIZE:-0}^0
 * $ $QUOTA^0
 * 1^0
 $ORGMAIL

 LOCKFILE


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail