Autocreate folders

How to automatically create folders in the user's maildir when they login. Handy for creating folders for maildrop.

Dovecot has an Autocreate pluging that can automatically create and subscribe folders when a user logs in.

Installation
Dovecot since version 2.1.x can create/subscribe mailboxes automatically, which is useful for creating special folders for users. It can also assign SPECIAL-USE tags. A good use for those is for "combining" the different special folders that various mail clients use, i.e. "Sent" (Roundcube, Thunderbird), "Sent Messages" (OS X, iOS), or "Sent Items" (Outlook).
To autocreate some folders for dspam retraining:

  mailbox Spam {
    auto = subscribe
  }
  mailbox Spam.MissedSpam {
    auto = subscribe
  }
  mailbox Spam.NotSpam {
    auto = subscribe
  }

To create mark "Deleted Messages" as a Trash folder for iOS/OSX, edit /usr/local/etc/dovecot/conf.d/15-mailboxes.conf:

mailbox "Deleted Messages" {
    special_use = \Trash
  }

Credits

Various bits of code, scripts, and procedures were put together with information from John Simpson's qmail.jms1.net website. It's an excellent resource on managing and setting up a Qmail server.

Recent Updates

  • 5 months 1 week ago
  • 5 months 1 week ago
  • 5 months 1 week ago
    php 8.x
  • 5 months 1 week ago
    10.6.7
  • 5 months 2 weeks ago
    Drop Centos 5/6 stuff