procmail
[Top] [All Lists]

Re: Maildir support in Procmail 3.14 -- how?

2000-05-16 20:52:45
From: Russell Hoover <rj(_at_)panix(_dot_)com>

and that I can change my procmail recipes from one like this:

:0
* ^TO.*mutt-(users|users-request)
|maildir Mail/m/

to one like this:

:0
* ^TO.*mutt-(users|users-request)
~/Mail/m/

But when I get rid of maildir.c and remove
"|maildir " from the recipes, all my messages end up in the ~/Mail/m/
directory *alongside* the cur/, new/ and tmp/ subdirectories, not
*inside* any of them, as they should.

So how do I get the new procmail to deliver to maildirs without the
previously necessary add-ons?  I know that I'm calling version 3.14
of procmail in my .forward file, and I use the trailing slash in all
recipes.

I don't know much about mh, but I do know that procmail doesn't
interpet the ~ in your second recipe.  That may well be your problem.
Use $HOME or use a formal path.

Also -- is it still necessary with the new procmail to generate a
lines header?  In other words, can I remove the following from my
.procmailrc?


# -----------------------------------------------
# Generate a "Lines:" header
# (needed for maildir mailbox format)
# Only msg-body lines are counted (not the hdrs):

:0 bw
LINES=|wc -l | tr -d " "

:0 fhw
|formail -a "Lines: $LINES"
# -----------------------------------------------

I don't know whether you still need the header or not; but you can, in
any event, do it in one operation instead of two.

First, though, the "standard" way to get rid of the leading whitespace
would be to use xargs instead of your call to tr:

        LINES=|wc -l | xargs

works fine, and is less demanding than a call to tr.  But I prefer
this:

        LINES=|grep -c ^

-- 
    \     .-.     .-.     .-.     .-.     .-.     .-.     .-.     /
     \-d-/-m-\-a-/-n-\-(_at_)-/-n-\-e-/-t-\-c-/-o-\-m-/-.-\-c-/-o-\-m-/
      '-'     '-'     '-'     '-'     '-'     '-'     '-'     '-'

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Maildir support in Procmail 3.14 -- how?, Dallman Ross <=