Hi, I want to make shell script to delete old email messages in ubuntu 20.04 and using ispconfig. But i don't know where is the path of email messages. I want to create shell script to execute command like below find /home/username/mail/yourdomain.com/*/cur -type f -mtime +30 -exec rm -f {} \; Please help me , where is the path of email messages Thanks
The mail folders are usually under /var/vmail/domain.com/user/Maildir/ on an ispconfig system. If you use dovecot, you may be able to use doveadm to look up the user home (eg. 'doveadm user [email protected]').
Remove Mails from Trash: Code: doveadm expunge -u EMAIL mailbox Trash sentbefore 30d doveadm purge -u EMAIL