Stop Receiving Spam with Cpanel Published: Dec 20, 2005
  • Rating

    4/5

There are few simple steps you can follow to minimize the amount of spam you receive to your inbox with Cpanel. We cover email filtering, spamassasin, default address and more tools.

There are few simple steps you can follow to minimize the amount of spam you receive to your inbox.

Don't Accept Mail to Users Mailboxes That Don't Exist! - Default Address
By default all unrouted email will be directed to your main mailbox, where it will use disk space and resources of your account. This means that someone can send to [email protected] and you'll still receive it to [email protected] (where inbox is your Cpanel username). This is how spammers send out mass messages as well as viruses. A common practice between worms, viruses and spammers is to generate or create a false email address they think you'll receive.

Login to your Cpanel, click on Mail, Default Address, at the bottom click  Set Default Address

Select the domain in the drop down menu, I recommend repeating this for all domains listed.
In the to: field - enter
:fail: no such address here

Click on Change to save your changes.

 

Filter Your Mail Automatically - Cpanel E-mail Filtering
Cpanel also has the ability to use Mail Filters - a nice little addon that will examine all your messages, sort them, do the action you tell it ad delivery you the results. This is an excellent method and often unused tool that can save you hours and hours of browsing spam. For example the Sober viruses sends out a series of messages that all have common subjects, you can completely delete anything that meets those exact subjects, preventing your inbox building up with spam and protecting you from viruses.

Login to your Cpanel, click on Mail, E-mail Filtering, at the bottom top click  Add Filter.
In the Filter section you have two drop downs, the first is what you are filtering.
Subject, From, To, Body, Any Header, SpamAssasin Spam Header.

The next drop down is how you are filtering it.
contains, equals, matches regex, and begins with.

The input box is the filter. Enter the text you want to filter here.

For example, I keep getting spam messages with the same subject and I want to filter them. The spam messages have the subject line: Ultimate Online Pharmaceutical

I'd create a filter as follows:

What? Subject
How? Equals
Filter? Ultimate Online Pharmaceutical
Destination? Discard

This now automatically deletes any messages that I receive with the subject: Ultimate Online Pharmaceutical
so they never even get to my inbox, perfect!

Once you've added a filter you can test it, enter a message that you think you want to filter in the test window, with subject, from address and body to make sure the filter works the way you want.

WARNING - setting up filters incorrectly can reslt in mail never received and the sender will never know. If you setup filters wrong then valid email can be deleted as well so be careful.

 

Accept from Trusted Senders Only
BoxTrapper Spam Trap is a tool that can help reduce spam significantly. Someone emails you, if they're not on your white list then they must reply to a message they receive after emailing you. After replying they are put on a white list so they don't have to respond every time they send you a message to validate the email. Basically you give them the big OK that the sender is a person and not a virus or spammer - they usually never respond so this cuts down spam a lot.

 

Flag Mail As Spam using SpamAssasin
SpamAssasin is another tool you can use which helps score or rate messages as potential spam. We'll come back and cover SpamAssasin more at a later date.

  • Rating

    4/5

Related Articles

Comments (3)

  • Gravatar - spam_hater
    spam_hater 17:38, July 19, 2006
    Is it possible to Filter spam at the WHM level. <br />
    <br />
    ie. Apply filters just like in cpanel, but the filter will apply to every account on the server.
  • Gravatar - klp
    klp 20:16, July 25, 2006
    excellent tips with c-panel if I must say. Can we also filter out IP addresses located in the header, if we do know that a large portion of spam is coming from such a location? usually with the IP addresses, (based on my experience) the last to digits are always changing. But if this can still work, wow! that would be like a cherry on top of the cake!
  • Gravatar - Steve
    Steve 16:47, July 26, 2006
    Yes, you need to add the rules manually through shell though. Edit the file /etc/antivirus.exim this is the central filter for the mail server and can protect incoming and outgoing.

Add Your Thoughts

WebHostGear.com is a hosting directory, not a web host.

Copyright © 1998-2024 WebHostGear.com