* Michael Elkins <m...@sigpipe.org> [2012-12-31 15:10:29 +0000]:

> On Mon, Dec 31, 2012 at 09:04:21AM +0000, Jamie Paul Griffin wrote:
> >I use something very similar: I read the Maildirs directly on my mx
> >server using mutt but use imap from my Mac to the server also using mutt
> >and ssh tunnel; however, I do use procmail in conjunction with Dovecot
> >lda which delivers to and creates Maildirs if they don't exist.
> 
> Just FYI, procmail can create the maildirs itself as well:
> 
>       If  the  mailbox  is  specified  to be an MH folder or maildir folder, 
> procmail will create the necessary directories if they don't
>       exist, rather than treat the mailbox as a non-existent filename.  When 
> procmail is delivering to directories, you can specify  mul‐
>       tiple directories to deliver to (procmail will do so utilising 
> hardlinks).
> 

Yes this is what I do, in conjunction with dovecot lda (since I recently
installed the imap server).

An excerpt from my .procmailrc:


SHELL=/bin/sh
PATH=$HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
MAILDIR=$HOME/.maildir
PMDIR=$HOME/.procmail
LOGFILE=$HOME/.procmail/log
DELIVER=/usr/local/libexec/dovecot/deliver
ORGMAIL=$HOME/.maildir/
DEFAULT=$HOME/.maildir/

:0
* ^Sender:.*owner-mutt-us...@mutt.org
| $DELIVER -m mutt

:0
* ^List-Id:.*beginners.perl.org
| $DELIVER -m perl

With a configuration setting in Dovecot to automatically create
Maildirs/Mailboxes if they don't already exit. I get mailboxes with a
'.' prepended to them - as I pointed out earlier, this can be changed
using the LAYOUT=fs setting in Dovecot. 

Certain muttrc variables have be set to accommodate this layout.

set folder=$MAIL
set mask=.
...

ksh ~/.profile:
...

export MAIL='$HOME/.maildir/'

Sorry that some of this has already been suggested in the thread,
thought I'd contribute my configuration settings in more detail for
clarity. 

I hope that helps in some way. Jamie


-- 
Primary Key: 4096R/1D31DC38 2011-12-03
Key Fingerprint: A4B9 E875 A18C 6E11 F46D  B788 BEE6 1251 1D31 DC38

Reply via email to