> On 07 Feb 2016, at 04:50, Tom Johnson <t...@terramar.net> wrote: > > I have some users where I'd like to expunge their mail at different times. > > For example, I may have some users who I want to expunge everything from > every folder at 30 days. > > Others where I'd like to expunge everything at 90 days. > > And still others where I only want to expunge mail from the Trash and Junk > folders, and nowhere else. > > Is there a way to do some sort of lookup for this? Or is this beyond the > ability of the autoexpunge feature? Should I just use a cron job and use > "doveadm expunge" on a user-by-user basis?
You can override any mail-related setting from userdb. So for example if you have: namespace inbox { mailbox Trash { autoexpunge = 30d } } You can have your userdb return namespace/inbox/Trash/autoexpunge=90d extra field for other users. http://wiki2.dovecot.org/UserDatabase/ExtraFields has some examples.