Date: Fri, 03 Sep 2010 11:45:54 -0700 From: Drew Tomlinson <drew@mykitchentable.net> To: freebsd-questions@freebsd.org Subject: Regex Help For Procmail Message-ID: <4C814262.5060504@mykitchentable.net>
next in thread | raw e-mail | index | archive | help
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"<Announce@email.famous-smoke.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C814262.5060504>