procmail regex help ... sometimes works, sometimes doesn't...
subscriber+freebsd at markshroyer.com
Mon Mar 29 02:39:48 UTC 2010
On 3/28/2010 6:34 PM, George Sanders wrote:
> I have added a very standard, very common regex line to my
> .procmailrc to filter character sets I can't read:
> * ^Content-Type:.*multipart
> * B ?? $ ^Content-Type:.*^?.*charset="?($UNREADABLE)
> I know that this works because my "unreadable_messages" mail file is
> now full of messages with headers like:
> From: =?GB2312?B?xMLTq9Or?= <uigvrutit at heki.net>
> Subject: =?GB2312?B?MjAxMMTqyMvBptfK1LS4w9bYytPKssO0?=
> To: "me" <me at me.com>
> Content-Type: text/html;
> However, a lot of mail gets through to my inbox that matches:
> From: "osdeiiftnvpp at gmail.com" <xjyfgzyjm at gmail.com>
> Reply-To: "osdeiiftnvpp at gmail.com" <xjyfgzyjm at gmail.com>
> Message-ID: <533pbxxy2oc>
> To: me <me at me.com>
> Subject: Fw: \xb8\xf2\xad\xe8\xa5X\xa8\xd3\xbd\xe6~\xb1o\xb4\xa9\xa9f\xaa\xb1\xb5L\xaeM\xa4\xba\xaeg\xb2n\xa7o
> X-Mailer: inhalation
> Organization: Microsoft Outlook Express 6.00.2462.0000
> Mime-Version: 1.0
> Content-Type: multipart/alternative;
> Status: RO
> X-UID: 63502
> Content-Type: text/plain; charset="big5"
> Content-Transfer-Encoding: quoted-printable
> However, "big5" is very clearly listed in my regex above, and as far
> as I can tell, this mail should match perfectly...
> I cannot see why these "big5" emails are not matching my procmail
> regex ... is it obvious to anyone ?
This is just a shot in the dark, but do you find that the unreadable
messages that this rule successfully matches have the relevant
Content-Type header in the message's "main" header group, whereas the
messages that should match but fail to do so have the Content-Type
header in a MIME attachment, as in your example?
(Apologies for the imprecise terminology.)
More information about the freebsd-questions