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

Purpose

The purpose of this deleted_to_trash-plugin is that IMAP client,such as outlook doesn't work well with dovecot, it can not copy deleted email to Trash folder automatically. So, this plugin is to copy deleted item to Trash folder. Also, need to tell the difference between "move" and "delete" action on Outlook side, since both action deleted_to_trash marks the original email as deleted. for a "move" case, we don't copy to the trash folder.

Compatible dovecot version

1.1.x (not tested with current version)

1.2.x

Changelog

*14-09-2009 (by Lex Brugman <lex dot brugman at gmail dot com>): Revised the plugin to make it work with 1.2.x, tested with 1.2.4 (plugin version 0.1).

*24-10-2009 (by Lex Brugman <lex dot brugman at gmail dot com>): The plugin now always uses the Trash folder in the inbox namespace instead of the current namespace. Created an ebuild for Gentoo users. (plugin version 0.2).

*20-03-2010 (by Lex Brugman <lex dot brugman at gmail dot com>): Fixed an issue when deleting more than 2000 messages. The Trash folder name is now configurable in the dovecot.conf file. (plugin version 0.3).

Installation

Compiling

Download and extract the sourcecode.

Edit the Makefile to match your environment:

# Dovecot's header directory
DOVECOT_INC_PATH = /usr/include/dovecot
# Dovecot's IMAP plugin path
DOVECOT_IMAP_PLUGIN_PATH = /usr/lib/dovecot/imap

Run:

make
make install

dovecot.conf

Add the plugin to your mail_plugins in the imap protocol section

protocol imap {
        [...]
        mail_plugins = deleted_to_trash
}

Set the name of the trash folder in the plugin section of your configuration file

plugin {
        [...]
        deleted_to_trash_folder = Trash
}

Restart Dovecot, and that's all.

Download

v0.3

dovecot_deleted_to_trash-0.3.tar.gz

dovecot_deleted_to_trash-0.3.ebuild (for Gentoo users)

v0.2

dovecot_deleted_to_trash-0.2.tar.gz

dovecot_deleted_to_trash-0.2-r1.ebuild (for Gentoo users)

v0.1

dovecot_deleted_to_trash-0.1.tar.gz

Plugins/deleted-to-trash (last edited 2010-06-29 08:51:47 by LexBrugman)