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

"Komal Tagdiwala (ktagdiwa)" <[email protected]>
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
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: [email protected] [mailto:[email protected]] On Behalf Of LuKreme
Sent: Saturday, August 24, 2013 6:52 PM
To: [email protected] Procmail
Subject: Re: Finding key-value pairs in email body [Plain Text version]


On 24 Aug 2013, at 19:33 , Komal Tagdiwala (ktagdiwa) <[email protected]> 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/
[email protected]
http://mailman.rwth-aachen.de/mailman/listinfo/procmail
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.