2

I want to setup Postfix and Dovecot with Postfix as the SMTP MTA (mail transfer agent) and the MDA (mail delivery agent) and Dovecot just as the IMAP server, but I want to make sure that they each understand the mailbox location, and I am not totally clear on this from the documentation.

If I use the following settings in the Postfix main.cf (username represents a system user that is setup to handle all virtual users):

virtual_mailbox_base=/home/username
virtual_mailbox_maps=hash:/etc/postfix/vmailbox

And in /etc/postfix/vmailbox (the / at the end of the mailbox path indicates a maildir mailbox):

info@example.com example.com/info/
sales@example.com example.com/sales/

So that the mailboxes would look like /home/username/example.com/info/ and so forth, as described in the documentation (http://www.postfix.org/VIRTUAL_README.html#virtual_mailbox).

And then use the following settings in the Dovecot dovecot.conf:

mail_home=/home/username/%d/%n
mail_location=maildir:~/Maildir

So that Dovecot has separate "home" and mailbox directories for the virtual users, as recommended in the documentation (http://wiki2.dovecot.org/VirtualUsers/Home), will this be a compatible setup?

Or, will Postfix be delivering mail to /home/username/example.com/info in cur, new, and tmp folders while Dovecot is looking for mail in /home/username/example.com/info/Maildir in cur, new, and tmp folders? Does the / to activate a maildir mailbox in the Postfix virtual_mailbox_maps indicate and automatically create a Maildir folder after example.com/info/ or will it create the difficulty I describe above?

Thank you.

2

For the above setup to work, the Dovecot dovecot.conf should contain:

mail_location=maildir:~

without the /Maildir

0

I would opt for dovecot's deliver mda, because it has a lot of additional features like immediate message indexing and sieve and it makes the whole mailserver config way simpler, because you have only one place where you configure the mailbox location.

  • This is better placed as a comment. The user is requesting a solution, which is provided by @user981178 with the accepted answer. – Oliver Williams Jul 4 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.