So I finally got to the point I had to do something! I'm getting about 25 junk mail messages a day spread over 5 different email accounts. If I go a few days without checking my email, I have a lot of work to do to clean out the trash!
The good news it that cPanel has an email filter available that can help. Here is what I did...
First, I set up an email account simply named "junkmail"!
Then I go to the email filter page and click on the "Add Filter" link.
[attachment=507:Email_Filter1.png]
We first do a filter for the body of the message by selecting "Body".
We then select "matches regex".
And for destination, we enter "junkmail@mydomain.com".
This will filter all of your email messages and move unwanted emails to the junkmail account where you can review them prior to deletion.
The regular expression I use is shown below:
CODE
.*(sperm|pr(a|4)d(a|4)|(l|1)(o|0)(a|4)n|gener(i|1)c|^cum|p(o|0)rn|d(i|1)or|fuck|d(i|1)ck|sex|ph(a|4)(l|1)(l|1)us|pen(i|1)s|ro(l|1)+ex|(l|1)uxury t(i|1)mep(i|1)ece|c(o|0)ck|cred(i|1)t c(a|4)rd|debt|v((i|1)+((a|4))+)+gr((a|4))+|c((i|1)+((a|4))+)+(l|1)+(i|1)+s|penetr(a|4)te|b(l|1)ue.?p(i|1)(l|1)(l|1)|hyrd(o|0)c(o|0)d(o|0)ne|erect(i|1)(l|1)e|erect(i|1)(o|0)n|(a|4)nt(i|1).?ed|s(c)?h(l|1)(o|0)ng|ph(a|4)rm(a|4)cy|drugst(o|0)re).*
I would list the filtered words but the forum filter will filter them out!
After you set up your filter for your "Body", then do the same for "Any Header" and you'll be done.
Be sure that you use the information specific to your account. You can "Discard" filtered emails but then you risk the chance that a wanted email is forever lost!
I offer no warranty for this information. It may allow unwanted email to be delivered. It may also filter legitimate emails and if no junk mail location is set, it will delete such emails. This also filters outgoing email so you won't be able to send an email from your account that contains one of these filtered words.
Basically, use at your own risk.
This is capturing about 90% of my junk mail and hasn't filtered legitimate emails on accident.
There is a filter tester available to see if certain words will be filtered correctly.
I hope this helps.
vujsa

