> On 12/11/2024 09:12 EET Sirius via dovecot <dovecot@dovecot.org> wrote:
> 
>  
> On Tue, 2024/11/12 at 03:45:57 +0100, Ralph Seichter via dovecot wrote:
> > * Hua Young via dovecot:
> > 
> > > where can I setup dovecot to auto clear trash periodically?
> > 
> > See the doveadm-expunge(1) manual page for one possible way to do that,
> > when combined with a cron job or similar.
> 
> DATESTR=$(date --date='TZ="UTC" 0 2 week ago' +'%d-%b-%Y')
> doveadm expunge -u <user> mailbox Trash before ${DATESTR}
> 
> Adjust to taste. And careful with expunge if you run it on other mailboxes
> than Junk and Trash. Always qualify the search with 'deleted' when you do
> that.
> 
> Use 'doveadm search -u <user> mailbox ...' to make sure that you see what
> you expect to see from the query before you put the search string to use
> in an expunge. doveadm-search and doveadm-search-query man pages were
> helpful when I was learning this.
> 
> -- 
> Kind regards,
> 
> /S

Or you can use the more modern way, 

https://doc.dovecot.org/2.3/configuration_manual/namespace/#core_setting-namespace/mailbox/autoexpunge

Aki
_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org

Reply via email to