From owner-freebsd-questions@FreeBSD.ORG Fri Sep 3 18:46:03 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 A84E31065698 for ; Fri, 3 Sep 2010 18:46:03 +0000 (UTC) (envelope-from drew@mykitchentable.net) Received: from smtp1.mc.surewest.net (qsmtp.mc.surewest.net [66.60.130.145]) by mx1.freebsd.org (Postfix) with SMTP id 821E78FC0C for ; Fri, 3 Sep 2010 18:46:03 +0000 (UTC) Received: (qmail 14062 invoked from network); 3 Sep 2010 11:41:13 -0700 Received: by simscan 1.1.0 ppid: 14058, pid: 14059, t: 0.1839s 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 smtp1.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: _CMAETAG_ Received: from unknown (HELO blacklamb.mykitchentable.net) (69.62.230.77) by smtp1 with SMTP; 3 Sep 2010 11:41:13 -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 889B51657C9 for ; Fri, 3 Sep 2010 11:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mykitchentable.net; s=default; t=1283539557; bh=S6G9CKT0IGzgDE+YEScUyh73p1NSQFW68aeOVnhDRpg=; h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type: Content-Transfer-Encoding; b=r4g4si3QtBcPfPCjzm0PBq7vb/0p6RIE/K/BkJRA5wE/YCceGXZr1t+Tj+ilNcwva HBG1qUKgfy9gAXcXn2YZhzGe6fGFnhyXcJ2kNkpTGsRBs37U53ztXrDkGvA+e24FPD 6+PLzpw/GbJkW13Z+jg82JnE85k6zY1o0+pkDjzM= Message-ID: <4C814262.5060504@mykitchentable.net> Date: Fri, 03 Sep 2010 11:45:54 -0700 From: Drew Tomlinson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 100903-1, 09/03/2010), Outbound message X-Antivirus-Status: Clean Subject: 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: Fri, 03 Sep 2010 18:46:03 -0000 I use procmail for mail delivery and I'm trying to concoct the right regex to match From: headers and deliver to a folder. However mail is sent from various addresses so I want to match all that end with "famous-smoke.com>". Here's an example of a header: From: "Famous Smoke Shop" Because I also occasionally order, I don't want to catch mail from anything that has the word "Orders" and "Famous" in the From field. Thus here is my procmail recipe: # Deliver order info to inbox :0 *^From:.[Ff]amous.*[Oo]rder.*famous-smoke.com>$ "${HOME}/Maildir/new/" # Deliver other email to folder :0 *^From:.*famous-smoke.com>$ "${HOME}/Maildir/.Shopping/Famous Smoke/Email/" According to my procmail log, the From: header does not match. I would expect the example From: header above to match the second regex and be delivered to the specified folder. Where is my error? Thanks, Drew -- Like card tricks? Visit The Alchemist's Warehouse to learn card magic secrets for free! http://alchemistswarehouse.com