procmail
[Top] [All Lists]

err msg in log file from pipe cmd, to notify sender of rejected msg

2005-03-25 07:58:20
I'd appreciate any help I can get on this one, as I've come to my
wits end.  )=

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
  | (/usr/bin/formail -r -A "X-Loop: ourdomain.com" ; \
    cat /etc/messagetoobig.txt ) | $SENDMAIL -t -frejection_notice

  :0:
  /dev/null
}
-E-N-D---------------------

I've even tried this pipe variant:
-S-T-A-R-T-----------------
  | /usr/bin/formail -r -A "X-Loop: apid.net" | \
    cat - /etc/messagetoobig.txt | $SENDMAIL -t -frejection_notice

-E-N-D---------------------


And, here is the item from 'man procmailex' from which I built this rule:
-S-T-A-R-T---------------------
:0 h c
* !^FROM_DAEMON
* !^X-Loop: your(_at_)own(_dot_)mail(_dot_)address
  | (formail -r -I"Precedence: junk" \
    -A"X-Loop: your(_at_)own(_dot_)mail(_dot_)address" ; \
    echo "Mail received.") | $SENDMAIL -t
-E-N-D-------------------------

Anyone have any ideas why it's erroring on this? Is it due to return values? Do I need to spec 'w' or 'W', or possibly 'i'? 'W' or 'i' would seem like a cop-out to me (like putting a bandaid on a gunshot wound)...

  Again, I'd really appreciate any help!

Brad/TLD


____________________________________________________________
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