On Fri, Mar 25, 2005 at 08:38:51AM -0600, Mr Duck wrote:
I basically have a procmail recipe set up to catch oversize messages
(in this case, over 5 meg -- roughly 7meg after uuencoding). It is
then supposed to send an email to the sender, telling them of the
email rejection, and then dump the email in the trash (/dev/null).
Now, I've got my recipe set up, which mimics a recipe taken directly
from 'man procmailex'. The rule works. It DOES send the email
rejection notice.
However, it always leaves an error in the log file:
-S-T-A-R-T-------------------
procmail: Error while writing to " (/usr/bin/formail -r -A "X-Loop:
ourdomain.com" ;
\
cat /etc/messagetoobig.txt ) | $SENDMAIL -t -frejection_notice"
-E-N-D-----------------------
I can't tell why it's giving this error.. i've tried all kinds of
variations on the recipe, and still I always get that error. VERBOSE
mode doesn't provide any other info on the error, either.
Here is my rule:
-S-T-A-R-T-----------------
:0
* > 7000000
* !^FROM_DAEMON
* !^X-Loop: ourdomain.com
{
LOG="Reason: Message over 5meg in size. Refusing
"
:0 c: toolarge.lock
1) What happened to the h-flag from the example you showed in
the man page? I think you want the h-flag here.
2) No reason to lock the sendmail process. Get rid of the
lockfile colon and name.
| (/usr/bin/formail -r -A "X-Loop: ourdomain.com" ; \
cat /etc/messagetoobig.txt ) | $SENDMAIL -t -frejection_notice
3) Is formail in /usr/bin? Why are you stating a path at all?
Just write "formail" and let the compiled-in path work as intended.
:0:
/dev/null
3) Why are you cloning (c-flag) the message only to write the
cloned copy to /dev/null? Why are you putting a lockfile on
/dev/null? Heaven forfend we should have a race condition
writing to /dev/null -- why, we might corrupt the resulting
mail file and not be able to read it later! :-) :-)
}
-E-N-D---------------------
So -- this is quite untested -- try this as your recipe below the log entry:
:0 h
| ( formail -r -A "X-Loop: ourdomain.com" ; \
cat /etc/messagetoobig.txt ) | $SENDMAIL $SENDMAILFLAGS -t
--
dman
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail