Regex Help For Procmail

Frank Shute frank at shute.org.uk
Sun Sep 5 20:59:14 UTC 2010


On Sun, Sep 05, 2010 at 09:33:31AM -0700, Drew Tomlinson wrote:
>
[snip]
> 
> No, still not matching.  Basically, why doesn't this header:
> 
> From: "Famous Smoke Shop" <Announce at email.famous-smoke.com>
> 
> Match this procmail recipe:
> 
> :0
> * ^From:.*famous-smoke.com>$
> "${HOME}/Maildir/.Shopping/Famous Smoke/Email/"
> 
> From my procmail log:
> 
> procmail: No match on "^From:.*famous-smoke.com>$"
> 
> Thanks,
> 
> Drew

Drew, try this:

* ^From:.*famous-smoke\.com

I think it's not catching it because the period isn't backslash
escaped. Also don't bother catching the end of line as any whitespace
there will screw up your re.


Regards,

-- 

 Frank

 Contact info: http://www.shute.org.uk/misc/contact.html




More information about the freebsd-questions mailing list