How To Enable or Disable Greylisting In WHM?
In this article, we will learn about Greylisting and how to enable or disable Greylisting in WHM.
What is Greylisting?
Greylisting is a procedure of delaying emails from unknown senders. When an email arrives, Greylisting causes the server to return a message that says, busy at the moment try again in some time. Valid Mail Transfer Agents, like Exim, automatically retries many times. This retry time can be between several minutes to several days. Invalid Mail Transfer Agents usually gives up and move to the next spam target. WHM uses these retry attempts as a method to isolate good emails from bad ones.
cPanel Greylisting daemon also known as cpgrey, runs at SMTP receipt time. It means everything happens before any real data is sent. The cpgrey daemon looks for three things or triplets. They are mentioned below.
- a source IP address
- a source email address
- a destination IP address
If this combination is not seen in a set time frame which is configured in WHM, cpgrey will defer all emails from these triplet for a set initial block time set in WHM. After the initial block time has expired, the system will accept emails from the triplet until the max block time has expired.
Follow the steps below to enable/disable Greylisting in WHM.
- Login to your WHM account as root user.
- In the Email Section, go to Greylisting.
- By default, Greylisting will be disabled. You can click on the Greylisting button to enable it.
There are few other option we need to check in Greylisting.
- Configuration Settings
In Configuration Settings, you can set Initial Deferral Period, Resend Acceptance Period, and Record Expiration Time. We can use default or use our setting. You will also see an option, Bypass Greylisting for Hosts with Valid SPF Records. If you enable this option, you will receive an email with a valid SPF record faster.
- Trusted Hosts
The next option is Trusted Hosts. Here, we can add hosts from whom you receive emails regularly and you do not wish Greylisting to affect them.
- Common Mail Providers
In the Common Mails Provider option, you will see a list of common mail providers. They are trusted, and the list is updated automatically. If you are having an issue with any common mail provider, you can un-check them.
- Reports
The final option is Report Labs. Here, we can see the emails, which are suspended as defined by their sender IP address, From Address, and To Address.
That’s It! Greylisting is enabled and all our settings are done.