5

everyone. I am learning to set up a dovecot home IMAP server using a virtual Ubuntu 12.04 machine. My intention is eventually to have a home server that uses POP3 to take email from several addresses and remove them from my ISP's servers, while making them accessible through a home IMAP server (this is similar to the setup described at https://help.ubuntu.com/community/POP3Aggregator, which explains how to set up the system with dovecot version 1, and is thus outdated). I intend to use the ISP's server directly when sending messages, and to BCC all sent messages to myself.

I've completed the basic set up of the test server: getmail uses POP3 to fetch messages from two test email accounts, and successfully delivers them to the respective Maildir-style new folders on the virtual machine. Dovecot then successfully sees these messages.

I have two questions:

1) I had to set up new, cur, and tmp folders for both of the test accounts manually to get this setup to work. Is there a way to get dovecot to create these Maildir folders automatically when I create a new virtual user account (e.g., when I add a user and password combination to my dovecot password file), or is it expected that I write a bash script to automate that task?

2) I would welcome any comments you have on how this approach could be improved as I learn to set it up. My motivations with this approach are 1) to enable archiving/storing emails from several hosting providers that impose a cap on server storage, and 2) to give me somewhat greater control over email storage without requiring that I set up and administrate a mail server from scratch (which I'm not yet prepared to do) (this follows the recommendations at https://ssd.eff.org/tech/email).

Thank you!

2 Answers 2

5

Dovecot creates the maildir structure so that an email arrives. You don't need to worry about it.

You can configure dovecot to create some mailboxes (folders) automatically when you login first time.

For example, created/edit /etc/dovecot/conf.d/15-mailboxes.conf:

namespace inbox {
  mailbox Trash {
    special_use = \Trash
    auto = subscribe
  }
}
-1

Dovecot doesn't create the main folder for virtual users, you have to do that yourself. It WILL create the mailboxes under that folder, but you have to go in and do a ~maildirmake~ mkdir /usr/local/virtual/<user> before the dovecot LDA will deliver mail.

2
  • 1
    Don't know what Dovecot you're using but my Dovecot automatically creates mail directories for new virtual users when they log in for the first time.
    – fnkr
    Jun 22, 2017 at 11:29
  • Dovecot creates the mail directories, it does not create the main folder for a virtual user.
    – lbutlr
    May 13, 2020 at 13:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .