From owner-freebsd-questions@FreeBSD.ORG Tue Sep 7 01:51:28 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 10B1B10656CA for ; Tue, 7 Sep 2010 01:51:28 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from asmtp3.iomartmail.com (asmtp3.iomartmail.com [62.128.201.159]) by mx1.freebsd.org (Postfix) with ESMTP id 987DA8FC17 for ; Tue, 7 Sep 2010 01:51:27 +0000 (UTC) Received: from asmtp3.iomartmail.com (localhost.localdomain [127.0.0.1]) by asmtp3.iomartmail.com (8.13.8/8.13.8) with ESMTP id o871pPNL010373; Tue, 7 Sep 2010 02:51:25 +0100 Received: from orange.esperance-linux.co.uk (80-45-152-196.static.dsl.as9105.com [80.45.152.196]) (authenticated bits=0) by asmtp3.iomartmail.com (8.13.8/8.13.8) with ESMTP id o871pObY010369; Tue, 7 Sep 2010 02:51:25 +0100 Received: by orange.esperance-linux.co.uk (Postfix, from userid 1001) id 94A7A33C3D; Tue, 7 Sep 2010 02:51:24 +0100 (BST) Date: Tue, 7 Sep 2010 02:51:24 +0100 From: Frank Shute To: Drew Tomlinson Message-ID: <20100907015124.GA21193@orange.esperance-linux.co.uk> References: <4C814262.5060504@mykitchentable.net> <4C814634.1000003@gmail.com> <4C8164C7.9000107@mykitchentable.net> <4C83C65B.6060508@mykitchentable.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C83C65B.6060508@mykitchentable.net> User-Agent: Mutt/1.4.2.3i X-Face: *}~{PHnDTzvXPe'wl_-f%!@+r5; VLhb':*DsX%wEOPg\fDrXWQJf|2\,92"DdS%63t*BHDyQ|OWo@Gfjcd72eaN!4%NE{0]p)ihQ1MyFNtWL X-Operating-System: FreeBSD 8.1-RELEASE amd64 X-Organisation: 'shute.org.uk' Cc: Glen Barber , freebsd-questions@freebsd.org Subject: Re: Regex Help For Procmail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Frank Shute List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2010 01:51:28 -0000 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" > > 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 > I additionally don't like the look of your Maildir. It's quoted, you should set MAILDIR in procmailrc, you should get rid of the space and it should end in "new". Result: :0 * ^From:.*famous-smoke\.com .Shopping/Famous_Smoke/new I don't know what you're using for maildirmake but here's a script you can adapt: ---- #!/bin/sh # # Usage: maildirmake mkdir $1 mkdir $1/new mkdir $1/cur mkdir $1/tmp chown frank:frank $1/new chown frank:frank $1/cur chown frank:frank $1/tmp chmod 700 $1 chmod 700 $1/new chmod 700 $1/cur chmod 700 $1/tmp ---- You have to run it from where you keep your maildirs i.e MAILDIR So if you have your maildirs in Mail: $ cd ~/Mail $ mkdir .Shopping $ cd .Shopping $ maildirmake Famous_Smoke For your ref, here's my procmailrc PATH=/usr/local/bin SHELL=/bin/sh ORGMAIL=$HOME/Maildir/new PMDIR=$HOME/.procmail LOGFILE=$PMDIR/log VERBOSE=on MAILDIR=$HOME/Mail DEFAULT=$HOME/Maildir/new LOGNAME=frank INCLUDERC=$PMDIR/rules Regards, -- Frank Contact info: http://www.shute.org.uk/misc/contact.html