How can I rebuild the "Trusted Hosts" list in Greylisting

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,304
68
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Hello guys. I have this server where after activating Greylisting, it has no entries in the Trusted Hosts list. Only the current host IP range is added to the whitelist.

I've seen in the past that the list in charge of it is located at /etc/greylist_trusted_netblocks. In my other servers the list is complete with the built-in list of IP ranges from well known ESP as it is shipped with cPanel. But the same file in this server hasn't.

I've tried copying the contents of one wortking file to this one with the issue, but after restarting Exim, it is reset and emptied again.

Is there any command I can run to have it working back to normal?

Thanks in advance!
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
466
113
UK
cPanel Access Level
Root Administrator
Hi Kent,

Look in your Common Mail Providers in Home » Email » Greylisting

I think you will see the list of Mail Providers that are trusted and the auto-update options that trigger each upcp run.

I have to assume that the fact that one cannot see the IP's of the Mail Providers in the Trusted Hosts section any more is by design, although this was certainly disconcerting when I first noticed it, one hopes that they are actually downloaded and used :confused:
 
Last edited by a moderator:
  • Like
Reactions: Gino Viroli

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,304
68
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
It's weird at least. In all my other servers the Trusted Hosts list is correctly populated with the IP ranges of those ESP present in the Common Mail Providers list.

I cannot keep enabled the Greylisting feature if it will constantly defer everything. I need a solution asap.

Anybody from cPanel?
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
466
113
UK
cPanel Access Level
Root Administrator
I ran a series of tests using various hosts, and all the mail sent from hosts listed and enabled in Common Mail providers that I was able to test; was delivered immediately, whilst all the others were seen to be added to the greylisting queue.

I am quite happy in my own mind that the Common Mail Providers IP listings are being respected, even if they are not being shown in the Trusted Hosts page.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,245
463
Hello,

Is the server in question using a different version of cPanel compared to the other servers?

As of cPanel 58, the common mail provider IP list associated with the Greylisting feature is stored in the following file:

/etc/greylist_common_mail_providers

The "Trusted Hosts" list is separate, and designed for IP addresses you choose to manually trust.

Thank you.
 

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,304
68
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Hello,
Is the server in question using a different version of cPanel compared to the other servers?
As of cPanel 58, the common mail provider IP list associated with the Greylisting feature is stored in the following file:
/etc/greylist_common_mail_providers
The "Trusted Hosts" list is separate, and designed for IP addresses you choose to manually trust.
Thank you.
No. All servers are using the same cPanel version, cPanel stable 56.
Still didn't find a solution. Is there any command or something to repopulate this list?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,245
463
Here's an example of how the interface looks in cPanel version 56.0.28:

greylisting.png

As you can see, the "Common Mail Providers" tab includes the trusted hosts, and the "Trusted Hosts" tab is for IP addresses you manually add to the interface. Are you seeing something different?

Thank you.
 

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,304
68
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Thanks for your answers Michael. The support buddies told me that this behaviour I observed is due to the new way in which the Greylisting will handle Trusted Zones. In the old method you was able to see exactly what were the IP ranges of every Common Provider, maybe making some obnoxious to read the list of Trusted Zones. But now they are hidden to allow a more comprehensive view of what YOU have manually whitelisted.

So, it was not a bug; it was indeed a feature :)
Thanks and good bye
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,245
463
I'm happy to see your question was answered. Thanks for updating us with the outcome.