On 20-Sep-2007, at 14:48, Scott Moseman wrote:
On 8/31/07, Scott Moseman <scmoseman(_at_)gmail(_dot_)com> wrote:
1) cat ~/mail/test | formail -xFrom:
2) FROM=`formail -xFrom:`
When running the formail by hand against a message, I'd get...
From: Scott Moseman <scmoseman(_at_)gmail(_dot_)com>
But when running the same syntax from procmail, I would get...
From scmoseman(_at_)gmail(_dot_)com Fri Aug 31 08:16:24 2007
Does anyone know why I'm getting different header entries based
on whether I run it from my shell session or it runs from procmail?
formail -x should return the header without the label, so it should be
scmoseman(_at_)gmail(_dot_)com Fri Aug 31 08:16:24 2007
in no case should -x ever return "From ...."
testing against some spam:
% cat spam.email | formail -xFrom:
"Bidz Auctions" <return(_at_)spammer(_dot_)com>
% cat spam.email | formail -XFrom:
From: "Bidz Auctions" <return(_at_)spammer(_dot_)com>
% cat test.prc
LOGFILE=test.log
TEST=`formail -xFrom:`
TEST2=`formail -XFrom:`
LOG="
$TEST
$TEST2
"
LOG="END OF TEST
"
$ procmail -m test.prc < spam.email
$ cat test.log
"Bidz Auctions" <return(_at_)spammer(_dot_)com>
From: "Bidz Auctions" <return(_at_)spammer(_dot_)com>
END OF TEST
From <return(_at_)spammer(_dot_)com> Wed Sep 12 09:31:23 2007
Subject: Jewelry auctioned at a Dollar
Folder:
**Bounced** 0
So you're doing something wrong (like using -X as I pointed out last
month) or your formail is borked, or you are seeing the "From
<blahblah" and thinking that that line is related to your assignment,
when it isn't.
--
"You can think and you can fight, but the world's always movin', and
if you wanna stay ahead you gotta dance."
____________________________________________________________
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