[Top] [All Lists]

Re: How to make procmail create the spool dir in Maildir format?

2007-01-31 01:01:47
On Wed, Jan 31, 2007 at 01:13:58AM -0300, Oliver Schulze L. wrote:

I have a setup with:
sendmail + procmail + dovecot + maildir format + centos4

I keep personal folders in: /home/$USER/Maildir/
and the Inbox in the Spool dir: /var/mail/Maildir/$USER/

The problem is that when I create a new user, procmail
can not deliver the email until I create the directory

Is there way to tell procmail to create the directory on-the-fly?

I believe you're misdiagnosing the problem.  Procmail will have
no problem creating the new, cur, and tmp dirs as needed for
Maildir+ folders.  This is easy to test:

   8:42am [/var/tmp] 521[0]> ls -l foo
  gls: foo: No such file or directory
   8:42am [/var/tmp] 522[1]> procmail -m VERBOSE=y MAILDIR=. DEFAULT=foo/ 
/dev/null < /dev/null
  procmail: [1897] Wed Jan 31 08:42:21 2007
  procmail: Assigning "MAILDIR=."
  procmail: Assigning "DEFAULT=foo/"
  procmail: Rcfile: "/dev/null"
  procmail: Assigning "LASTFOLDER=foo/new/"
    Folder: foo/new/                          0
   8:42am [/var/tmp] 523[0]> ls -l foo
  total 6
  drwx------    2 dman     100           512 Jan 31 08:42 cur
  drwx------    2 dman     100           512 Jan 31 08:42 new
  drwx------    2 dman     100           512 Jan 31 08:42 tmp

You should recompile procmail with DEFAULT set to "$HOME/Maildir/" .
A poor second alternative (kludge, really) is to put a line in
/etc/procmailrc such that:

   MAILDIR = $HOME/Maildir/


procmail mailing list   Procmail homepage: