procmail
[Top] [All Lists]

formail error on large emails

1998-10-15 13:37:48
I have the following .procmailrc recipe that I've been using for months 
to forward the From: and Subject: line of emails to my mobile phone 
over SMS.

:0 c
* !^X-Loop: $MYADDR
{
        FROM=`formail -rt -zxTo:`
        SUBJECT=`formail -zxSubject:`

        :0
        | (formail -rI"From: $FROM" \
                -I"Subject: $SUBJECT" \
                -I"To: $SMSEMAIL" \
                -I"X-Loop: $MYADDR" ;\
                echo "$FROM $SUBJECT") \
                | $SENDMAIL -oi -t
}

I've finally decided to try and track down a sporadic problem that 
causes me to receive two copies of each email. It turns out that this 
recipe is returning an error if the incoming mail is larger than 32K.
In this case, I get the following procmail.log error message:

procmail: Error while writing to " (formail -rI"From: $FROM" \
                -I"Subject: $SUBJECT" \
                -I"To: $SMSEMAIL" \
                -I"X-Loop: $MYADDR" ;\
                echo "$FROM $SUBJECT") \
                | $SENDMAIL -oi -t"

Which causes me to receive an extra copy of the mail.

Any idea what I'm doing wrong?

procmail v3.10 1994/10/31 (not my system, though I may be able to get 
it upgraded if that's the problem).

Cheers,
Paul

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