procmail
[Top] [All Lists]

how to bounce message on write error??

2002-10-30 11:42:21
Hello,
I would like to configure procmail to bounce (or re-queue if called with the
"-t" option) messages when it is unable to write to the destination in a
ruleset.  for example, I have the following procmail.rc:

---

:0BH w
* .*name=.*\.(exe"?$|vbs"?$ [...]
{
 :0 fh w
 | $FORMAIL -i"X-Envelope-from: $1" -i"X-Envelope-to: $2" 

 LOG="MIME attachment detected "

 :0BH
 /var/spool/procmail/quar
}

[...]

! -f "$FROM" "$RCPT"

---

If a message matches the "name" condition it should be saved in
/var/spool/procmail/quar.  If it doesn't match it is passed through other
rulesets (ommitted for brevity) and ultimately delivered using the final
command.  But if something happens to the /var/spool/procmail/quar directory
(eg disk dies) I get the error "Error while writing to
"/var/spool/procmail/quar"" but the message goes through the rest of the .rc
file and gets delivered!  

This is obviously a Bad Thing, and I think procmail should bounce the
message.  Is there any way to configure this, or should I include some code
at the beginning of the script to check the status of the various
filesystems?

Thanks for any suggestions.

Dustin


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

<Prev in Thread] Current Thread [Next in Thread>