Topic: Cleaning other folders - Trash and Junk
==== Required information ====
- iRedMail version: 0.9
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6.5
- Related log if you're reporting an issue: -
====
Hello,
questions about cleaning Trash and Junk folders. Can you help me?
1) I'm using, in CRON, this command:
55 7 * * * /usr/bin/doveadm expunge -A mailbox Trash savedbefore 30d ; /usr/bin/doveadm expunge -A mailbox Junk savedbefore 60d
Interate sql is ok. I've moved messages from other server today. I have old messages (from 2013) in this folders. The command won't run for 30/60 days because it checks the creation date (today) and not the real message date? Am I right? Command will work after 30/60 from today?
2) I read some lines in dovecot.conf about expire plugin. I've uncommented them. This is enough? Will conflict the CRON entry?
expire = Trash 30 Trash/* 30 Junk 60 Junk/* 60
expire_dict = proxy::expire
Also uncommented:
dict {
expire = db:/var/lib/dovecot/expire/expire.db
...
Will work? Or need to enable something else?
3) I'm in Brazil. OutLook, not sure, sometimes save messages in "Itens Excluídos" instead of "Trash". And "Lixo Eletrônico" instead of "Junk". Doveadm can exclude messages from this folders too? Note that folder name has spaces. Or need another way, like a bash "find... exec rm" thing?
Thank you!!
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.