Tips to Protect Your cPanel Hosting From Incoming and Outgoing SPAM

Tips to Protect Your cPanel Hosting From Incoming and Outgoing SPAM

Most of the email messages being sent on the Internet are SPAM. Businesses found the power of email marketing and started using it by sending millions of emails to gain new customers and increase revenue. There is nothing wrong with email marketing as long as the emails are sent to subscribers who provided their email addresses themselves and agreed to receive those kind of messages. What happens in reality is that companies use bots and web spy machines which would crawl web sites to find emails. Then they save them into a database and start sending them offers for different kind of products. There are many people who are doing it without realizing that is illegal. They don’t know what SPAM is. Basically, that is sending of unsolicited email messages in an attempt to advertise a product. You can learn more about it at

Why you should be concerned?

Spamming is not tolerated on the internet. If you use your server to send unsolicited messages you will have all kind of troubles. Your server’s provider will receive complaints which will forward to you. If you don’t handle them properly your provider will disable access to the server and even cancel your account. You must know what spamming is and avoid using it to grow your business. There are many other ways which are legal and you can successfully use them to grow and increase your client base. Spamming is not one of them and you can be sure about that. Email marketing is but there is a huge difference between legal email marketing and SPAM. The difference is how the email addresses were obtained. If the person provided their email address on their own and they agreed to receive marketing emails from you then it is email marketing. If you found somewhere their email address and decided to send them advertising emails then it is spam.


Some businesses or individuals try to advertise their product or service by sending SPAM messages from different servers. They do that as an attempt to hide themselves and pretend they do not send SPAM. Here is how it works. They host their web site on server A. They send SPAM from servers B, C, D and E with marketing messages advertising their web site on server A. That is spam-vertising. It is as illegal as SPAM. It’s not allowed to be done and you should not do it. If you receive a complaint from your web hosting provider about your web site being spamvertized and you didn’t do that here is what happened. Your web site will have such an issue if someone has access to it to upload phishing or malware content. Then they send spam messages to advertise the phishing/malware links on your web site. The reason for that is to steal personal information such as credit cards, PayPal login details or other sensitive information or to infect computers with viruses/trojans and again steal personal information. That’s why you must be very strict about the security of your web site. When you receive such a notice from your hosting provider the first thing you need to do is to scan your web site for malware with a tool such as ClamAV or Maldet. If it doesn’t find the malicious content you will have to scan manually each of your files and removing any malware content you find. The best idea is to reinstall your web site from scratch though or restore from a fresh backup that is clean.

Mail spoofing

Another illegal method used on the internet to steal personal information is mail spoofing. Email spoofing is the sending of email messages with a forged email sender. Practically, you can use any mail server to send email messages from any email box and pretend you are someone else. The other party that receives your message must have technical skills to find out that what they receive is mail spoofing. Why people do mail spoofing? It is very easy to steal personal information by using mail spoofing. The most spoofed domains are domain names of financial institutions such as banks, payment gateways, big ecommerce web sites. They send spoofed emails to random email boxes and a small percentage of them will not understand they receive a spoofed message. They will enter their paypal login details or provide their credit card details. Then someone else can use them to order services on the internet.

How is most of the SPAM being sent?

The largest amount of SPAM messages comes from compromised servers and web sites. In order to avoid spam from being sent from your server you must keep your web site secure. If you have a cPanel reseller hosting account, you must also advise your customers regularly to keep their accounts secure. If you have a server then a systems administrator should manage it for you. The easiest way is to have a managed VPS where your hosting provider will do that part for you.

Spammers are getting smarter and they attack all devices which have an internet connection. Then they use them to send SPAM. One of the latest big spamming case happened via compromising online cameras. Since spammers are ready to attack even the software of cameras to send spam imagine what efforts they do on daily basis to compromise web sites. They scan web sites on the internet all the time and run brute force attacks, scan for outdated plugins or anything else they can use to get access and send spam. Why? Because it is free. It is cheaper to compromise a web site and use the resources of the server for free rather than to pay for your own server. The other reason for that is there are millions of insecure servers and web sites on the internet and they can be easily and automatically compromised. Don’t be one of those web sites and keep yours secure.

How can you protect your web site?

First of all, spamming happens in two directions – incoming and outgoing spam. The incoming spam are unsolicited messages to your email box. Other servers send them and they have nothing to do with the security of your web site. There are several ways you can use to filter incoming spam. There is free and paid software to do that.

Protecting from incoming SPAM

The easiest and free way to filter unsolicited email messages is by using SpamAssassin. You can access it in cPanel -> Apache SpamAssassin which is under the Email section. Just click on the Enable Apache SpamAssassin button. Once you do that SpamAssassin will start to scan all incoming emails before delivering them to your Inbox. Depending on the false positives or false negatives you can increase or decrease the spam score so that more or less messages are flagged as spam.

Tips to Protect Your cPanel Hosting From Incoming and Outgoing SPAM

Apache SpamAssassin has features for automatic removal of spam messages. You can also configure it so that SpamAssassin saves spam messages to a separate folder called Spam Box. Then you can review them later just in case.

If you click on the Configure SpamAssassin button at the bottom of the screen you will be able to blacklist or whitelist specific email addresses or even domain names. That feature is great in case you have trusted senders and you don’t want to miss a single email from them no matter what.

Apache SpamAssassin is not the best tool for filtering incoming SPAM but it’s free. If you want to have a better anti-spam protection you must consider using an enterprise solution. Enterprise solutions cost money.

Another tool you can use to filter unsolicited email is the Global Email Filters tool which is available in cPanel under the Email section. Once you click on it and the Create a New Filter button you will see a new page. From there you can add custom mail filters. You can specify to block/discard email messages on multiple factors.

Tips to Protect Your cPanel Hosting From Incoming and Outgoing SPAM

Once you fill in the form and enter how exactly the global mail filter will work you can choose what will be the action that your mail server will take once the filter’s conditions is met.

Tips to Protect Your cPanel Hosting From Incoming and Outgoing SPAM

If you want to have the best anti-spam protection for incoming spam though you need an enterprise tool. We have it and it filters 99.96% of the unsolicited email messages without any extra configuration from your end. It does that out of the box. The name of our anti-spam system is SpamExperts. The system contains multiple servers which work in a cluster with built-in load balancing. If one of the filtering servers fails another one will continue to filter the emails and there will be no interruption to the service. ScalaHosting offers SpamExperts for free on all cheap web hosting plans. It costs extra if you want to use it with your cPanel reseller hosting account or an ssd cloud server. We don’t have a single unhappy customer using SpamExperts.

Protection from outgoing SPAM

Keeping your web site and server secure is the most important thing and the most efficient that you can do to avoid outgoing spam from your server. If your server sends SPAM its IP address gets listed in blacklists. As a result, no one on the server can send e-mail messages. They will bounce due to the mail IP block in blacklists. I can’t stress enough how important mail communication is. If you manage a cloud server or a reseller hosting account to host web sites of your clients and they can’t send emails – your business will suffer and you will lose customers. What else can you do? Use whatever tools you have to secure as much as possible your web site and the server. Install a firewall, pay for security software or get a fully managed service from your hosting provider to manage your server and make sure it doesn’t send SPAM.

Protection from mail spoofing

Protect your customers from receiving spoofed email messages. Configure your mail server to detect and reject such emails. If you don’t know how to configure it contact your systems administrator. Educate your customers how to protect their domains from being spoofed. I will show you how to do that below. The process is pretty easy and does not require technical knowledge since you can do it from your control panel cPanel. So, login to cPanel and click on the Authentication icon under the Email section. Then under SPF click on the Enable button in case it is disabled. That is not everything though.

Make sure to select the box All Entry. After that click on the Update button. Look at the screenshot below.

Tips to Protect Your cPanel Hosting From Incoming and Outgoing SPAM

This step is very important as it tells the mail servers which check for the existance of an SPF record that if the message comes from another mail server that is not authorized in the SPF record the message must be rejected. By enabling an SPF record you authorize which mail servers can send messages from your domain. Mail servers which do SPF checks will not accept the emails from servers which do not exist in your SPF record. Keep in mind that not all mail servers on the internet do SPF checks but enabling SPF for your domain adds another layer of protection against spoofed emails.

Vlad G.


Vlad has 20 years of experience in the web hosting industry. He wants to make the Internet a safer place for everyone by allowing every online business to have their own fully managed VPS with a control panel and daily backups at the same price as shared hosting. Vlad is a performance-driven individual who is passionate about technology, innovations, and leadership. He believes that every website should be hosted on its own server as that is the only way to achieve maximum security, speed, and reliability. Vlad is currently a co-founder and CEO of Scala Hosting LLC and SPanel LLC.

Write a Comment