procmail
[Top] [All Lists]

Odd behavior or incorrect recipe?

2002-04-18 19:27:16
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

These are the lines in the header of a typical email I get.

Message-ID: <t2mads2w018(_dot_)fsf(_at_)objenv(_dot_)com>
X-Spam-Status: No, hits=-4.2 required=5.0 

I'm using the following procmail recipe which I would like to pull
out the number of hits in X-Spam-Status and the Message-ID:

SPAM_STATUS=`grep X-Spam-Status |cut -d' ' -f3|cut -d'=' -f2 |sort
- -n` MESSAGE_ID=`formail -xMessage-ID:: \
| sed -e 's/[;\`\\]/ /g' \
| expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`

DATE=`date +"%m/%d/%y %H:%M"`
nada=`echo $DATE $SPAM_STATUS $MESSAGE_ID >> $HOME/email-scores`

The output looks like this:
04/18/02 21:14 <t2mads2w018.fsf>

When I want it to look like this:
04/18/02 21:14 -4.2 <t2mads2w018.fsf>

Any idea why?

Mike Loiterman
mike(_at_)ascendency(_dot_)net
PGP Key 0xD1B9D18E


-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.4
Comment: Message digitally signed by Mike Loiterman

iQA/AwUBPL991WjZbUnRudGOEQKukACgwDuSrZDFMJB5rfVHeqowfz790cUAnAnj
ak7iwDkM9SWOuAHeaRz0B0An
=5J5B
-----END PGP SIGNATURE-----

_______________________________________________
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>