Date: Thu, 3 Jul 2003 10:12:22 -0700 From: "Drew Tomlinson" <drew@mykitchentable.net> To: <freebsd-questions@freebsd.org>, <paul+fbsd@it.ca> Subject: Re: Procmail Recipie For FreeBSD Lists? Message-ID: <00de01c34186$445cc760$6e2a6ba5@lc.ca.gov> References: <000e01c3417b$407491b0$6e2a6ba5@lc.ca.gov><20030703160310.GA12934@sublevel3.org> <20030703161246.GA67762@mail.it.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- From: "Paul Chvostek" <paul+fbsd@it.ca> To: "Christian Stigen Larsen" <csl@sublevel3.org> Cc: <freebsd-questions@freebsd.org> Sent: Thursday, July 03, 2003 9:12 AM > On Thu, Jul 03, 2003 at 08:53:30AM -0700, Drew Tomlinson wrote: > > > > About a year or two ago, someone posted his recipe for sorting FreeBSD > > lists. This particular one was nice in that it extracted the list name > > from the "From" line (I think) and then created the appropriate folder > > if it didn't exist. So freebsd-questions list items were put in the > > 'questions' folder, freebsd-stable in the 'stable' folder, and so on. I > > have search the archives for this post for the past two days but have > > been unsuccessful. I've tried to write it myself but this is not my > > area of expertise. Does anyone have such a recipe they are willing to > > share? > > Easy enough: > > :0: > * List-Id:[^<]+<\/freebsd-[^.] > $MATCH > > This will store each list in a folder prefixed by "freebsd-". If you > want freebsd-questions to be stored in a folder named "questions", just > move the \/ (which marks the beginning of the MATCH variable) to after > the "freebsd-". > > And if you want it to support other RFC2919-compliant lists (that is, > ones which include the "List-Id:" header), simply remove "freebsd-" from > the recipe. Thank you for your reply. I have tried implementing your suggestions to my specific environment but still do not have it quite right. I am using Maildir delivery to my home directory and also use Courier-IMAP. Thus a message to freebsd-questions ultimately needs to be delivered to Maildir/FreeBSD/Questions/new relative to my home directory. If this directory does not exist, I want it to be created. Based on your example, the messages were all added to a file called freebsd-questions in my home directory. I attempted to modify the recipe to achieve my desired results. Here's what I've put in my procmailrc: :0: * ^List-Id:[^<]+<freebsd-\/[^.]+ Maildir/FreeBSD/$MATCH/new And I'm getting messages like this in my procmail log: procmail: Assigning "PATH=/home/drew/bin:/bin:/usr/bin:/usr/local/bin" procmail: Lock failure on "Maildir/FreeBSD/alpha/new.lock" procmail: Error while writing to "Maildir/FreeBSD/alpha/new" OK, I assume the error is because Maildir/FreeBSD/alpha/new does not exist. How can I get procmail to create the directory it needs? Thanks for your help. As you can probably tell, I'm real new at this and I appreciate your assistance. Drew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00de01c34186$445cc760$6e2a6ba5>