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

Trash Plugin

The Trash plugin. When saving a message would make user go over quota, this plugin automatically deletes the oldest mails from configured mailboxes until the message can be saved within quota limits.

In beta9 it used two hardcoded configuration files. Timo changed this now and updated dovecot-example.conf:

 # Trash plugin. When saving a message would make user go over quota, this
 # plugin automatically deletes the oldest mails from configured mailboxes
 # until the message can be saved within quota limits. The configuration file
 # is a text file where each line is in format: <priority> <mailbox name>
 # Mails are first deleted in lowest -> highest priority number order
 #trash = /etc/dovecot-trash.conf

Example plugin section in dovecot.conf

plugin {
  trash = /etc/dovecot-trash.conf
}

Example dovecot-trash.conf file

1 Spam
2 Trash
3 Sent

NB: this Wiki page was written from details from an email to the list, and from information read in the wiki. If any of it's wrong, sorry. I'll update it when I have it working.