Revision of Autocreate folders from Wed, 12/09/2009 - 12:54

Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.

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 1.2.x - already include
  • Dovecot 1.1.x - plugin must be downloaded and compiled by hand:
    cd /extra/src
    mkdir dovecot-autocreate
    cd dovecot-autocreate
    wget http://www.dovecot.org/patches/1.1/autocreate-plugin.c

    Export an environment variable with the location of the source we used to compile Dove (1.1.5)

    export DOVECOT=/extra/src/dovecot-1.1.5

    Then compile the plugin:

    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 autocreate_plugin.so

    Then copy the plugin into the Dovecot install:

    cp autocreate_plugin.so /usr/local/lib/dovecot/imap/autocreate_plugin.so

Configuration
In the protocol imap section of /usr/local/etc/dovecot.conf edit (and uncomment) the plugins section to enable the plugin:

protocol imap {
  mail_plugins = autocreate
  mail_plugin_dir = /usr/local/lib/dovecot/imap
}

Further down in /usr/local/etc/dovecot.conf, edit the plugin section to add the commands to create and subscribe to some folders:

plugin {
  autocreate = testFolder
  autosubscribe = testFolder
  autocreate2 = testFolder2
  autosubscribe2 = testFolder2
  autocreate3 = testFolder.subfolder
  autosubscribe3 = testFolder.subfolder
}

Recent Updates

  • 1 year 1 week ago
    1.27.2 update
  • 1 year 3 weeks ago
    Drupal 10/11 config
  • 1 year 3 weeks ago
  • PHP
    1 year 3 weeks ago
    PHP 8.3.11 and AlmaLinux
  • 1 year 3 weeks ago
    New version of Pound