Re: Finding key-value pairs in email body [Plain Text version]
LuKreme <[email protected]>
| Newsgroups | gmane.mail.procmail |
|---|---|
| Message-ID | <[email protected]> |
On 25 Aug 2013, at 22:05 , Komal Tagdiwala (ktagdiwa) <[email protected]> wrote: > I tried the "r" flag to look against the raw source but procmail says that "Extraneous raw-mode flag ignored". Yes, because raw mode does not do at all what you think it does. Did you read the man page for procmailrc? Because it is quite specific about the one and only thing that the r flag does. > I also tried to specifically look for the text/plain mimepart before proceeding with the check for the key "Email:" The raw source of your message (have you looked at it yet?) is base64 gibberish. You either have to search for the base64 version of what you are looking for (good luck, this will be nigh-impossible<1>), or you have to decode the message before you tell procmail to look at it. There is no text/plain part of your message. You really really need to look at the *RAW* message. It looks like this: --_000_894914628459621371507728815JavaMailnobodyjsj2tc502webex_ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGVsbG8gQ2hyaXMgRC4sDQoNCkt1bmFsIFZlZXJhIGxlZnQgdGhpcyBtZXNzYWdlIGFmdGVyIHRo ZSByZXF1ZXN0IHdhcyBub3QgaGFuZGxlZCBieSBhbnkgQ1NSLg0KDQotLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQpRdWV1ZSBpbmZvcm1hdGlv bg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LQ0KU2l0ZSBVUkw6IGh0dHBzOi8vY2lzY29zdXBwb3J0LndlYmV4LmNvbQ0KRGF0ZSAvIFRpbWU6 IE1vbmRheSwgSnVuZSAxNywgMjAxMyAzOjIyIHBtIFBhY2lmaWMgRGF5bGlnaHQgVGltZSAoU2Fu IEZyYW5jaXNjbywgR01ULTA3OjAwKQ0KUXVldWU6IEdUUkMgLSBXZWJFeCBDb25uZWN0DQpXYWl0 IFRpbWU6IDUgbWludXRlcw0KQ1NSczogV3lhdHQgQmlzc2V0dA0KDQotLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQpDdXN0b21lciBpbmZvcm1h dGlvbg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLQ0KTmFtZTogS3VuYWwgVmVlcmENCkVtYWlsOiBrdmVlcmFAY2lzY28uY29tPG1haWx0bzpr dmVlcmFAY2lzY28uY29tPg0KUGhvbmU6IE5vbmUNClF1ZXN0aW9uOiBXZSdyZSBzb3JyeSwgYWxs IGFnZW50cyBhcmUgY3VycmVudGx5IHVuYXZhaWxhYmxlLiBQbGVhc2UgbGVhdmUgYSBtZXNzYWdl IGZvciBhbiBlbWFpbCByZXNwb25zZToNCg0KDQo= Do you see the string "Email:" in there? No? Right, *NEITHER DOES PROCMAIL*. Is there any reason you can't put this tag in the HEADERS of the emails? At least there you have some control. > -----Original Message----- Do not top post. Do not put quoted material at the same quote level as your own text. <1> Email: encodes to "RW1haWw6" while "The Email:" with a no-break space encodes to "VGhl4oCMwqBFbWFpbDo=" and "<tab>Email:" encodes to "DQoNCg0KCUVtYWlsOg==". Do you see a similarity there? You are going to need to decode base64 messages before you feed them to procmail if you want to scan the contents. -- And I just don't care what happens next / looks like freedom but it feels like death / it's something in between, I guess