This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.
Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2006-06-18 09:50:35
Size: 1128
Editor: TimothyWhite
Comment: Inital Page Creation
Revision 4 as of 2007-05-03 00:32:35
Size: 873
Editor: van-pix
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
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. 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. Requires the quota plugin to be enabled.
Line 4: Line 4:
In beta9 it used two hardcoded configuration files. Timo changed this now
and updated dovecot-example.conf:
The configuration file is a text file where each line is in format: {{{<priority> <mailbox name>}}}. Mails are deleted in lowest -> highest priority number order.
Line 7: Line 6:
'''Example dovecot.conf:'''
Line 8: Line 8:
 # 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
}}}
protocol imap {
  mail_plugins = trash
}
Line 16: Line 12:
'''Example plugin section in dovecot.conf'''
{{{
Line 25: Line 19:
# Spam mailbox is emptied before Trash
Line 26: Line 21:
# Trash mailbox is emptied before Sent
Line 27: Line 23:
# If both Sent and "Sent Messages" mailboxes exist, the next oldest message
# to be deleted is looked up from both of the mailboxes.
Line 28: Line 26:
3 Sent Messages
Line 29: Line 28:

'''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.

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. Requires the quota plugin to be enabled.

The configuration file is a text file where each line is in format: <priority> <mailbox name>. Mails are deleted in lowest -> highest priority number order.

Example dovecot.conf:

protocol imap {
  mail_plugins = trash
}

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

Example dovecot-trash.conf file

# Spam mailbox is emptied before Trash
1 Spam
# Trash mailbox is emptied before Sent
2 Trash
# If both Sent and "Sent Messages" mailboxes exist, the next oldest message
# to be deleted is looked up from both of the mailboxes.
3 Sent
3 Sent Messages

None: Plugins/Trash (last edited 2010-06-15 16:37:06 by TimoSirainen)