0

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?

Pokechu22
  • 4,984
  • 9
  • 37
  • 62

2 Answers2

0

Check new folder: /var/qmail/mailnames/herdomain.com/hername/Maildir/new

Oleg Neumyvakin
  • 9,706
  • 3
  • 58
  • 62
0

I use this

find /var/qmail/mailnames/domain/user/Maildir/curr -mtime +X -print | xargs rm
find /var/qmail/mailnames/domain/user/Maildir/new -mtime +X -print | xargs rm

where +X is your time

+7 = 7 days

Simon Ilett
  • 91
  • 1
  • 7