# Postfix delivers mail to Maildir\ instead of mailbox

## ecataranciuc

Hello!

I have a problem with postfix delivering mail to /var/spool/mail instead of users home directory. I have left the default settings for home_mailbox and mail_spool_directory (it is uncommented). In the comments for the home_mailbox field in said that by default postfix will deliver mail to /var/spool/mail/user or /var/mail/user, but mail is delivered to /home/user/.maildir .

If I specify mail_spool_directory = /var/spool/mail mail still gets delivered to users home directory.

By the way, as far as I understand maildir is a format in which mail is kept (and mbox too). But mailbox is "RFC 5321, defines an email address as a character string that identifies a user to whom mail will be sent or a location into which mail will be deposited. The term mailbox refers to that depository. In that sense, the terms mailbox and address can be used interchangeably." So my questions are: Why is there the mailbox option for home_mailbox parameter since the right one would be mbox? And wouldn't it be better to name this option as mailbox_format instead of home_mailbox? I understand that these questions are better suit to address to the developers of postfix but I give it a try here. Maybe I don't understand something.

Thank you!

----------

## Herring42

Postfix usually uses a local delivery agent, such as maildrop or procmail. Check to see if you have one of these installed, and where it is configured to put your mail.

----------

## ecataranciuc

Well, I have none of them.  :Smile:  But I don't really get it. If postfix needs one of these tools to store mail in a user defined folder then why does it have home_mailbox and mail_spool_directory?

Thanks!

----------

## ecataranciuc

By the way, in postfix documentation is written that by default mail is delivered to /var/mail/user or /var/spool/mail/user. And my case is totally different.

----------

## Herring42

Fair enough!   :Smile: 

----------

## ecataranciuc

Thank you. I have dovecot installed and I didn't know it does have a LDA.

----------

## cach0rr0

"mbox" is not the same as "mailbox"

mbox is a storage format, where all messages are kept in one single enormous file, concatenating new messages onto the large file as they arrive

as opposed to "maildir", where each email that arrives exists as a separate file on the system

the "home_mailbox" setting has nothing to do with the mbox format.

----------

## punki

I just installed postfix. In combination with dyndns, it's freak'n awesome.

If you do want an mbox formatted mailbox, make sure you compile it with the mbox USE flag.

----------

