9

How do you make postfix create maildir folders automatically for all users?

I have these two lines in postfix main.cf, which supposed do create maildir folder after the first mail but it is not working. What am I missing?

home_mailbox = Maildir 
mailbox_command = 

At the moment mail looks to sent, but nowhere to be found.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Jason
  • 131
  • 2
  • 2
  • 4
  • 1
    Shouldn't it be `home_mailbox = Maildir/` with a slash (`/`) at the end if you want a qmail-style directory? See the documentation for [**home_mailbox**](http://www.postfix.org/postconf.5.html#home_mailbox). – Cristian Ciupitu May 30 '14 at 03:27
  • And with the slash: postfix creates non-existent Maildirs itself. – Robert Siemer Jun 27 '22 at 23:14

1 Answers1

14

Cristian's comment is correct: you need a trailing slash to make Postfix store incoming mail in Maildir format:

home_mailbox = Maildir/

If you leave it off, it stores the mail in an mbox-style file of the same name.

That is to say, this is not a setting where you are providing the name of a type of storage, you are providing the name of a file or directory, and Postfix infers mbox vs Maildir based on the trailing slash only. It will use any directory name you put here, not just Maildir.

Warren Young
  • 71,107
  • 16
  • 178
  • 168