procmail
[Top] [All Lists]

RE: Finding key-value pairs in email body [Plain Text version]

2013-08-25 23:08:28
I tried the "r" flag to look against the raw source but procmail says that 
"Extraneous raw-mode flag ignored".

I also tried to specifically look for the text/plain mimepart before proceeding 
with the check for the key "Email:" in the email body. But no luck. Listed 
below the updated recipe is the procmail log output for my test case.

Below is my updated recipe:
:0Br
* Content-Type: text/plain;
*$$\WEBEX_SENDER_KEY
{
:0BH
* ^(From):.*(\<ktagdiwa@cisco\.com)
* ^Email:(.*\<)\/[^  ].*
{ EMAIL_FOUND=$MATCH }

        :0hfw
  | /opt/local/bin/formail -i "From: $EMAIL_FOUND"

LOG="************************* EMAIL_FOUND is set to: '$EMAIL_FOUND' 
*************************"
}


Procmail log output for my test email
===========================
procmail: Assigning 
"INCLUDERC=/home/cem/recipe-dev/rc.searchNameValuePairInBody"
procmail: No match on "^(From):.*(\<messenger@webex\.com)"
procmail: Match on "Content-Type: text/plain;"
procmail: No match on "()Email:"
procmail: Extraneous raw-mode flag ignored

I did read the comment about base64 encoding from Bart but I don't know how to 
proceed with the suggestion.

Regards,
Komal
-----Original Message-----
From: procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)de 
[mailto:procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)de] On Behalf Of 
LuKreme
Sent: Saturday, August 24, 2013 6:52 PM
To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de Procmail
Subject: Re: Finding key-value pairs in email body [Plain Text version]


On 24 Aug 2013, at 19:33 , Komal Tagdiwala (ktagdiwa) 
<ktagdiwa(_at_)cisco(_dot_)com> wrote:

They are all HTML formatted emails and I confirmed that the key is present in 
those emails (at least visually).

You *Must* match against what is in the RAW SOURCE of the message. Until you 
look at that, you are completely out of luck.

There are all sorts of things that could be interfering, from extra characters, 
HTML tags, or base64 encoding. It is *impossible* for us to guess.

--
Today the road all runners come/Shoulder high we bring you home.  And set you 
at your threshold down/Townsman of a stiller town.


____________________________________________________________
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

____________________________________________________________
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