I was just looking around cPanel and noticed that the default mail account is taking up over a gigabyte of storage. I opened it up in webmail and saw there are over 200,000 spam e-mails sent to randomly generated e-mails like [email protected]. I am unable to delete them because the webmail installed on cPanel can't handle such a large number of e-mails and won't load the inbox. How do I clear out these e-mails?
If it matters, I am running CentOS 5.5 on a dedicated box, but I'd rather not have to delete from the command line if at all possible.
Part of the issue here is that you are simply allowing any email to your domain to work vs letting them :fail:
in cPanel NEVER SET A DEFAULT ADDRESS TO FORWARD ALL MAIL - but rather set it as
:fail: no Such User Here Now Go Away and Spam someone else
Why you should use :fail:
There are sound technical reasons that you should only use :fail: and not :blackhole: on a cPanel server running exim.
In general the two different settings both discard email not destined for a POP3 account, an alias or a catchall alias. However, ever since cPanel included the verify = recipient code in the standard cPanel ACL section for exim, the way email is discarded differs with the two methods quite starkly:
Using :blackhole:
Using :fail: the email is never accepted into the server. During the initial SMTP negotiation when the senders SMTP server connects to your SMTP server, the sending SMTP server issues a RCPT command notifying your server which email address the email to follow is intended for. Your server then checks whether the recipient email actually exists on your server (a POP3 account, an alias or a catchall alias) and if it does not, it issues an SMTP DENY which terminates the attempt to deliver the email.
Here is a simple explanation of what happens during the SMTP conversation
Using :fail: is wise - because As far as your server is concerned, all that has happened is a little SMTP chatter and no email has been received and no bounce sent
special thanks to Chirpy on the cpanel forums for an excellent write up and his work with configserver to help with this post.
This appears to be a backscatter attack.
More about rejecting these emails here:
http://spamlinks.net/prevent-secure-backscatter.htm