procmail
[Top] [All Lists]

Re: procmail error log..

2001-02-02 07:03:21
oh thx . i will try to do it later.

Nick

-----Original Message-----
From: Philip Guenther <guenther(_at_)gac(_dot_)edu>
Date: Fri, 02 Feb 2001 02:56:43 -0600
To: email(_at_)mcmug(_dot_)org
Subject: Re: procmail error log.. 


email(_at_)mcmug(_dot_)org writes:
i want to use procmail to filter when a new message come.. it send me a icq 
me
ssage.. 
then i try send it to my icqnum(_at_)pager(_dot_)icq(_dot_)com 

but i found that my qmail log ..have some error log 

MAILFROM=`/usr/bin/formail -xFrom:` 
:0 c 
|(/usr/bin/formail -X "" \ 
-I "To: 123456(_at_)pager(_dot_)icq(_dot_)com" -X "To:" \ 
-I "Cc: " -X "Cc:" \ 
-I "Bcc: " -X "Bcc:" \ 
-I "From: abc(_at_)abc(_dot_)com" -X "From:"; \ 
echo "Email from:$MAILFROM "; \ 
echo " " ) | $MAILMAIL 


and the qmail log.. is that 

@400000003a77ed5f35833224 delivery 15: success: 
procmail:_Error_while_writing_to_"(/usr/bin/formail_-X_""_\/_-I_"To:_123456@ 
pager.icq.com"_-X_"To:"_\/______-I_"Cc:_"__-X_"Cc:"_\/______-I_"Bcc:_"__-X_" 
Bcc:"_\/_-I_"From:_abc(_at_)abc(_dot_)com"_-X_"From:";_\/_echo_"Email_from:$MAI

LFROM_";_\/______echo_"_"_)_|_$MAILMAIL_"/did_0+0+1/did_0+0+1/ 

so any idea??? 

The command you have as the recipe action will only read in the header of
the message fed to it.  As a result, if the message body is larger than
PIPEBUF (usually 8192) bytes, procmail will receive a write error trying
to fed the message to the action.  By default, procmail will interpret
this as failure by the action.  The solution is to tell procmail to
only fed the header of the message to the action by putting the 'h'
flag on the recipe.

BTW: it's usually a bad idea to hardcode paths to commands.

Hmm, there's also no need to include separate -X options for each field
you add, as the -X "" cover all headers.  In fact, once you add the 'h'
flag to the recipe, there's no need to use the -X option at all:

      :0 hc
      | ( formail -I "To: 123456(_at_)pager(_dot_)icq(_dot_)com" \
              -I "Cc: " \
              -I "Bcc: " \
              -I "From: abc(_at_)abc(_dot_)com" ; \
          echo "Email from: $MAILFROM"; \
          echo " " ) | $SENDMAIL -t


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


-- 
_______________________________________________
Get your free email from http://www.mcmug.org/webmail.html
@mcmug.org  @mcdull.net
DOWNLOAD McMug 2001 Calendar la.. .
http://www.mcmug.org

Powered by Outblaze
_______________________________________________
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>