From owner-freebsd-questions@FreeBSD.ORG Mon Mar 29 02:39:48 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D54F5106564A for ; Mon, 29 Mar 2010 02:39:48 +0000 (UTC) (envelope-from subscriber+freebsd@markshroyer.com) Received: from frodo.paleogene.net (frodo.paleogene.net [206.125.175.178]) by mx1.freebsd.org (Postfix) with ESMTP id B7D178FC15 for ; Mon, 29 Mar 2010 02:39:48 +0000 (UTC) Received: from auth-client.paleogene.net (auth-client.paleogene.net [206.125.175.178]) (Authenticated sender: hidden) by frodo.paleogene.net (Postfix) with ESMTPSA id 071EA3F499 for ; Sun, 28 Mar 2010 22:39:47 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=markshroyer.com; s=default; t=1269830388; bh=IaWv1YESo9/SKcTzBXWeamKH0m9miGWDP0Qlg/g4tLs=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=q6H9Gz8mJoGqmlzsKSapDKoKax9bZLfTDhwf84Bd9yd3mWFL444bQBB9CYOvcwG34 7Dvz+KlG7CX6KLSWDlxdAVBCfUz1K8f0xBcHKakib3Ge9pLFIRX2RAFSrrDPvugROi pln6kYbwWPK0sJHNmzG7A8Ilgi6joUbPfSwBYtb0= Message-ID: <4BB012F1.6020202@markshroyer.com> Date: Sun, 28 Mar 2010 22:39:45 -0400 From: Mark Shroyer User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <471394.79697.qm@web111611.mail.gq1.yahoo.com> In-Reply-To: <471394.79697.qm@web111611.mail.gq1.yahoo.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: procmail regex help ... sometimes works, sometimes doesn't... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 02:39:48 -0000 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: > > UNREADABLE='[^?"]*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987|ks_c_5601|3Deuc-kr|koi8' > :0: > * ^Content-Type:.*multipart > * B ?? $ ^Content-Type:.*^?.*charset="?($UNREADABLE) > unreadable_messages > > I know that this works because my "unreadable_messages" mail file is > now full of messages with headers like: > > From: =?GB2312?B?xMLTq9Or?= > Subject: =?GB2312?B?MjAxMMTqyMvBptfK1LS4w9bYytPKssO0?= > To: "me" > Content-Type: text/html; > charset="gb2312" > > However, a lot of mail gets through to my inbox that matches: > > From: "osdeiiftnvpp@gmail.com" > Reply-To: "osdeiiftnvpp@gmail.com" > Message-ID: <533pbxxy2oc> > To: me > 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; > boundary="1-104247307-2712732737=:8213" > Status: RO > X-Status: > X-Keywords: > X-UID: 63502 > > --1-104247307-2712732737=:8213 > 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.) -- Mark Shroyer http://markshroyer.com/contact/