I have a client who has email forwarded to Gmail (for better spam filtering). I set up the forwarding in Plesk but left a mailbox so that she can send email from her own domain rather than from Gmail. Unfortunately Plesk/Qmail leaves a copy of every (forwarded) email in her Inbox on my server, which periodically shuts my server down after filling the hard drive.
I've tried setting up a scheduled task in Plesk, but it's not working. I just found 25,000+ emails in her box. This is the command that I got to work from SSH:
/var/qmail/mailnames/herdomain.com/hername/Maildir/cur -mtime +3 -print | xargs rm
(domain names have been changed to protect the "innocent")
Why wouldn't this work on my Linux server running Plesk Parallels 12.0.18?
Check
new
folder: /var/qmail/mailnames/herdomain.com/hername/Maildir/new