Autoexpunge and special user namespace

Timo Sirainen tss at iki.fi
Wed Dec 9 10:30:36 UTC 2015


On 09 Dec 2015, at 01:36, Joseph Tam <jtam.home at gmail.com> wrote:
> 
> 
> I'm interested in replacing my cron script that expunges old
> deleted mail with the new feature announced in 2.2.20
> 
>> + Added mailbox { autoexpunge=<time> } setting. See
>>  http://wiki2.dovecot.org/MailboxSettings for details.
> 
> To use it, I need to specify which mailbox needs them using
> the namespace configuration.  For example
> 
> 	namespace inbox {
> 		mailbox Trash {
> 			auto = no
> 			special_use = \Trash
> 			autoexpunge = 7d
> 			mailbox_list_index = yes
> 		}
> 		mailbox trash {
> 			auto = no
> 			special_use = \Trash
> 			autoexpunge = 7d
> 			mailbox_list_index = yes
> 		}
> 		mailbox "Deleted Messages" {
> 			auto = no
> 			special_use = \Trash
> 			autoexpunge = 7d
> 			mailbox_list_index = yes
> 		}
> 		mailbox "Deleted Items" {
> 			auto = no
> 			special_use = \Trash
> 			autoexpunge = 7d
> 			mailbox_list_index = yes
> 		}

mailbox_list_index=yes is a global setting. You can't have it here.

> 		...
> 	}
> 
> Different readers use different mailboxes, so I include the common ones.
> Some questions:
> 
> 	1) Do I need the special_user configuration at all?  Will some
> 	clients start using different mailboxes to store deleted mail
> 	if I keep the special_use lines?

special_use is independent of the autoexpunge. I guess it wouldn't necessarily hurt.. but it's also somewhat better to have only a single \Trash mailbox so clients don't become confused when more than one of those mailboxes exist.

> 	2) I also expunge old mail in INBOX marked as deleted -- is
> 	there any way to handle this case?  Create virtual mailbox?

I guess a virtual mailbox might work. I haven't really thought of it.



More information about the dovecot mailing list