This documentation is for Dovecot v1.x, see wiki2 for v2.x documentation.

Autocreate plugin

Comes with v1.2.alpha3+.

This plugin allows administrator to specify mailboxes that must always exist for all users. They can optionally also be subscribed. The mailboxes are created and subscribed always after user logs in. Namespaces are fully supported, so namespace prefixes need to be used where necessary.


protocol imap {
  mail_plugins = autocreate
plugin {
  autocreate = Trash
  autocreate2 = Spam
  #autocreate3 = ..etc..
  autosubscribe = Trash
  autosubscribe2 = Spam
  #autosubscribe3 = ..etc..

v1.0 or v1.1

The plugin is also available from To compile the plugin by hand, do the following:

# replace * with the correct version:
export DOVECOT=~/src/dovecot-1.*

gcc -fPIC -shared -g -Wall -I$DOVECOT -I$DOVECOT/src/lib \
-I$DOVECOT/src/lib-storage -I$DOVECOT/src/lib-mail \
 -I$DOVECOT/src/lib-imap -DHAVE_CONFIG_H \
autocreate-plugin.c -o

# $PREFIX is the installation directory, e.g. /usr/local or /usr:
cp $PREFIX/lib/dovecot/modules/imap/

# Make sure you include the plugin directory in the dovecot.conf file
# Example:
# mail_plugins = autocreate
# mail_plugin_dir = $PREFIX/lib/dovecot/modules/imap

The plugin does not need a lib_xy prefix.

None: Plugins/Autocreate (last edited 2010-03-31 23:48:58 by 254pc204)