From owner-freebsd-questions@FreeBSD.ORG Wed Sep 8 16:22:37 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 DC82810656A6 for ; Wed, 8 Sep 2010 16:22:37 +0000 (UTC) (envelope-from drew@mykitchentable.net) Received: from smtp2.mc.surewest.net (qsmtp.mc.surewest.net [66.60.130.145]) by mx1.freebsd.org (Postfix) with SMTP id AEBDF8FC1E for ; Wed, 8 Sep 2010 16:22:37 +0000 (UTC) Received: (qmail 25496 invoked from network); 8 Sep 2010 09:31:36 -0700 Received: by simscan 1.1.0 ppid: 25488, pid: 25491, t: 0.2410s scanners: regex: 1.1.0 attach: 1.1.0 spam: 3.1.7-deb X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on smtp2.surewest.net. X-Spam-Level: * X-Spam-Status: No, score=1.8 required=13.5 tests=RATWARE_GECKO_BUILD autolearn=disabled version=3.1.7-deb X-Spam-CMAE-Analysis: v=1.0 c=1 a=VphdPIyG4kEA:10 a=8nJEP1OIZ-IA:10 a=jDt-9pEAAAAA:8 a=xgoGgeL9wEaedXs90swA:9 a=RwA7gVijjcF6MUE3-LEA:7 a=qNXP3gN6he7Oqx2SiapKmVYFdgkA:4 a=wPNLvfGTeEIA:10 a=SV7veod9ZcQA:10 a=Sllw8v0m4fwA:10 Received: from unknown (HELO blacklamb.mykitchentable.net) (69.62.230.77) by smtp2 with SMTP; 8 Sep 2010 09:31:36 -0700 Received: from [127.0.0.1] (bigdaddy.mykitchentable.net [192.168.1.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by blacklamb.mykitchentable.net (Postfix) with ESMTPS id 63CFD165687; Wed, 8 Sep 2010 09:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mykitchentable.net; s=default; t=1283962956; bh=qPbImwl15FFB9OKVp9kig5J021duskwDKTo12q7eekE=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=RJ+s/unquIG5zDZSdVhGdWQM91wJ1Jn6ZqbGWDWQY4pPqUfEY1J5a0oJrK7CRYOJI 8jmQqJj4vfh7JL7W+ACuD1f6aCFgoUEmI+j1KsgsAzN9ZB6z/qBkf9kG854h7c/PWk P6IjBi7gs66xHLk1o0LJoehzStuN7y1Th3gUeca4= Message-ID: <4C87B844.4090505@mykitchentable.net> Date: Wed, 08 Sep 2010 09:22:28 -0700 From: Drew Tomlinson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 To: Robert Bonomi References: <201009080050.o880oZli002150@mail.r-bonomi.com> In-Reply-To: <201009080050.o880oZli002150@mail.r-bonomi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 100908-0, 09/08/2010), Outbound message X-Antivirus-Status: Clean Cc: freebsd-questions@freebsd.org Subject: Re: Regex Help For Procmail 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: Wed, 08 Sep 2010 16:22:37 -0000 On 9/7/2010 5:50 PM, Robert Bonomi wrote: >> From owner-freebsd-questions@freebsd.org Mon Sep 6 12:46:59 2010 >> Date: Mon, 06 Sep 2010 10:46:47 -0700 >> From: Drew Tomlinson >> To: perryh@pluto.rain.com >> Cc: frank@shute.org.uk, freebsd-questions@freebsd.org >> Subject: Re: Regex Help For Procmail >> >> On 9/5/2010 4:02 PM, perryh@pluto.rain.com wrote: >>> Frank Shute wrote: >>> >>>> Drew, try this: >>>> >>>> * ^From:.*famous-smoke\.com >>>> >>>> I think it's not catching it because the period isn't backslash >>>> escaped ... >>> Unless there's some edge case that I'm not thinking of, adding a >>> backslash to escape a period will never convert a non-match into >>> a match. An unescaped period in an RE matches any character, >>> including a period. An escaped period matches only a period. >> I have confirmed this. I did add the backslash but procmail is still >> not matching. >> >>> Adding the backslash _does_ better represent what the OP wants >>> to accomplish, but the lack of it is not the cause of the RE not >>> matching. (I'm not sufficiently familiar with how procmail uses >>> REs to figure out what _is_ causing it not to match.) >> True and thus I'll leave the backslash. However I have no idea what >> _is_ causing it not to match either. I'm stumped. > Chances are you're 'over-specifying' what you want. take off the trailing > $, and maybe even the '>' > > There's _something_ in the header that is not what you 'think' it is, > which is what is causing the problem. the difficulty is -finding- what > that 'something' is. > > From whatever file procmail is dumping that message into, try using a > minimal text editor (something that is *NOT* language/charset aware, > delete everything _but_ that 'From: ' line, and then use that as input > to 'od -xc' to see _exactly_ what's there. > Here is that output: blacklamb> od -xc x 0000000 7246 6d6f 203a 4622 6d61 756f 2073 6d53 F r o m : " F a m o u s S m 0000020 6b6f 2065 6853 706f 2022 413c 6e6e 756f o k e S h o p " < A n n o u 0000040 636e 4065 6d65 6961 2e6c 6166 6f6d 7375 n c e @ e m a i l . f a m o u s 0000060 732d 6f6d 656b 632e 6d6f 0a3e - s m o k e . c o m > \n And this procmail recipe does *not* match: # Deliver other email to folder :0 * ^From:.*famous-smoke\.com "${HOME}/Maildir/.Shopping/Famous Smoke/Email/" Do you see anything I'm missing? Thanks, Drew -- Like card tricks? Visit The Alchemist's Warehouse to learn card magic secrets for free! http://alchemistswarehouse.com