Now that Greylisting is out in WHM 11.50, I have some suggestions.
1. Do not enable the option for whitelisting connecting IPs that pass SPF checks by default.
Why? Because you'll whitelist nearly all of the spamming IPs that are currently targeting cPanel servers since spammers use SPF/CKIM.
2. Enable much more robust logging in the mail logs
the developers of the CP greylist daemon should really check out smf-grey-milter for ideas. You need to provide decent logging that indicates that a message came in and was deferred due to greylisting, and then keep track of how long it was between the time the message was initially deferred and the time it was accepted by the server.
Make separate distinct log entries to differentiate between when the message was deferred and when it was accepted
3. Add an X-header to messages subjected to greylisting.
Use the information to add an X-header to the processed emails so that recipients can look at their message headers and see (a) that the message had originally been greylisted and (b) how long it was greylisted for.
4. Add the ability to whitelist by full/partial PTR match
This really is a must.
WhitelistPTR .ac1.yahoo.com #
WhitelistPTR .ac2.yahoo.com #
WhitelistPTR .ac3.yahoo.com #
WhitelistPTR .ac4.yahoo.com #
WhitelistPTR mailserver.bob.com #
Of course, with PTR / partial PTR whitelisting, you also need to perform a forward lookup and ensure that forward/reverse match up. Otherwise, there is nothing that prevents spammers from using .ac4.yahoo.com in their reverse [because the spam friendly companies are glad to provide the spammers with the ability to set any PTR they want].
Assume you whitelist .mx.mydomain.com (any host whose PTR record ends in .mx.mydomain.com)
An IP address connects with a PTR of d.mx.mydomain.com. The greylisting daemon does a forward lookup on d.mx.mydomain.com to make sure the returned IP matches the Ip address of the connecting server. If it doesn't, whitelisting doesn't occur.
I'm sure I'll have more comments. Hopefully the cPanel folks are open to further enhancing the greylisting daemon. Adding the ability to greylist is a great start, but my feeling is that you [cPanel] have a long way to go [and I'm sure you realize that].
SMF-GREY-MILTER works beautifully. I've used it for many years. You should take a look at its features to get an idea of what should be added to the CP greylisting daemon.
M
I am really looking forward to using greylisting to help curtail spam. That said, one of my biggest concerns is causing excessive delays in delivering mail from known good mail sources. I can't possibly list all of Yahoo or GMail or Spam Experts mail IPs, as they are likely very fluid. I would, instead, like to be able to to whitelist wildcard host names (as Mike has eluded to in point #4 above.
I also agree that the "whitelist with good SPF" option is not a good idea. Spot checking the spam that gets through Spam Assassin almost always shows good SPF. The spammers can easily setup an SPF record for their spamming domain, and ado!
- Scott
I am really looking forward to using greylisting to help curtail spam. That said, one of my biggest concerns is causing excessive delays in delivering mail from known good mail sources. I can't possibly list all of Yahoo or GMail or Spam Experts mail IPs, as they are likely very fluid. I would, instead, like to be able to to whitelist wildcard host names (as Mike has eluded to in point #4 above.
I also agree that the "whitelist with good SPF" option is not a good idea. Spot checking the spam that gets through Spam Assassin almost always shows good SPF. The spammers can easily setup an SPF record for their spamming domain, and ado!
- Scott
Although I haven't tested it yet, I don't see why checking SPF would be a bad idea. If spammers have an SPF record then they most likely also have a real mail server. If they have a real mailserver then they will pass the Grey listing.
Do spammers who have their server IP's in SPF not have mailserver that can try again ?
Although I haven't tested it yet, I don't see why checking SPF would be a bad idea. If spammers have an SPF record then they most likely also have a real mail server. If they have a real mailserver then they will pass the Grey listing.
Do spammers who have their server IP's in SPF not have mailserver that can try again ?
"Although I haven't tested it yet, I don't see why checking SPF would be a bad idea. If spammers have an SPF record"
This is exactly the case where whitelisting incoming mail that passes SPF doesn't make sense as it lets the spam through. If one disables the whitelisting [from greylisting] of incoming mail passing SPF, then the spam email that passes SPF will still be greylisted.
M
"Although I haven't tested it yet, I don't see why checking SPF would be a bad idea. If spammers have an SPF record"
This is exactly the case where whitelisting incoming mail that passes SPF doesn't make sense as it lets the spam through. If one disables the whitelisting [from greylisting] of incoming mail passing SPF, then the spam email that passes SPF will still be greylisted.
M
"This is exactly the case where whitelisting incoming mail that passes SPF doesn't make sense as it lets the spam through."
Grey listing only stops spam that isn't sent from a real mail server. A real mail server will try again.
If a spammer goes to the trouble of setting up an SPF record, won't he also setup a real mail server ? If spammers create an SPF record without using a real mail server, then yes whitelisting SPF records is useless.
Whitelisting has the advantage of making it more transparent for the end user.
What about allowing each cPanel user to choose to :
Greylist only e-mails that don't have the IP in the SPF record
Greylist all incomming e-mails
This way, users who get alot of spam can choose to enable full greylisting and users who don't don't have to suffer the extra delay in recieving e-mail.
"This is exactly the case where whitelisting incoming mail that passes SPF doesn't make sense as it lets the spam through."
Grey listing only stops spam that isn't sent from a real mail server. A real mail server will try again.
If a spammer goes to the trouble of setting up an SPF record, won't he also setup a real mail server ? If spammers create an SPF record without using a real mail server, then yes whitelisting SPF records is useless.
Whitelisting has the advantage of making it more transparent for the end user.
What about allowing each cPanel user to choose to :
Greylist only e-mails that don't have the IP in the SPF record
Greylist all incomming e-mails
This way, users who get alot of spam can choose to enable full greylisting and users who don't don't have to suffer the extra delay in recieving e-mail.
Yes, spammers do use real mail servers. But the spammers who are the biggest pains in the butt these days are the ones who spam one time time [brief period, less than 8 hours, usually much much less] from each IP address. Simply causing them to defer for the first ten minutes, does indeed give the RBLs/URIBLs places some time to collect some data on those particular spam messages and list the IPs / domains referenced in the emails. By the time they come back and successfully pass greylisting, they emails end up getting scored high enough [if you are using RBLs / URIBLs] that they are designated as spam.
At least that is my case. In addition, thus far, the spammers simply aren't keeping the IPs alive long enough after a spam run to even retry in many cases. So although they are legitimate servers pumping out spam, they are often only doing it, per IP, for a brief period of time.
Listen, I do things my way and you do things yours. I'm not suggesting anybody must do things my way. I'm seeing great results [stellar, so far] by _not_ whitelisting IPs from greylisting that pass SPF. If you guys don't want to go through the trouble and you want to ensure that all the big spammers [who are most often using SPF] are able to inject their mail into your system, go for it :)
M
Yes, spammers do use real mail servers. But the spammers who are the biggest pains in the butt these days are the ones who spam one time time [brief period, less than 8 hours, usually much much less] from each IP address. Simply causing them to defer for the first ten minutes, does indeed give the RBLs/URIBLs places some time to collect some data on those particular spam messages and list the IPs / domains referenced in the emails. By the time they come back and successfully pass greylisting, they emails end up getting scored high enough [if you are using RBLs / URIBLs] that they are designated as spam.
At least that is my case. In addition, thus far, the spammers simply aren't keeping the IPs alive long enough after a spam run to even retry in many cases. So although they are legitimate servers pumping out spam, they are often only doing it, per IP, for a brief period of time.
Listen, I do things my way and you do things yours. I'm not suggesting anybody must do things my way. I'm seeing great results [stellar, so far] by _not_ whitelisting IPs from greylisting that pass SPF. If you guys don't want to go through the trouble and you want to ensure that all the big spammers [who are most often using SPF] are able to inject their mail into your system, go for it :)
M
Is this available in Reseller WHM or Root WHM?
The Docs NEVER say if they're referring to "Root WHM" or "Reseller WHM"...you just have to guess.
I know the feature just came out, but please Enable it for Reseller WHM too. Root should be able to Enable/Disable & set the Default for the server (On or Off), but a Reseller should be able to Enable/Disable for their sub-accounts (if the feature is "Enabled" as "Default On" or "Default Off", in Root WHM).
Furthermore, as long as it's "Enabled" in Root WHM & Reseller WHM, cPanel & Webmail users should be able to turn it on/off for themselves too...
Root WHM...
Greylisting- Default On
- Default Off
- Disabled
Reseller WHM...
Greylisting
For my account...- Use Default (<status>) — <status> being either "On" or "Off" from the Root's settings
- On
- Off
- Use Default (<status>) — <status> being either "On" or "Off" from the Root's settings
- Default On
- Default Off
- Disabled
For sub-accounts...
cPanel user...
Greylisting
For my account...- Use Default (<status>) — <status> being either "On" or "Off" from the Reseller's settings
- On
- Off
- Use Default (<status>) — <status> being either "On" or "Off" from the Reseller's settings
- Default On
- Default Off
- Disabled
For Webmail users...
Webmail user...
Greylisting- Use Default (<status>) — <status> being either "On" or "Off" from the cPanel user's settings
- On
- Off
...also each level of user should be able to Whitelist (& change other settings) for themselves & their sub-ordinate users, sub-ordinate users should be able to ignore their parent's Whitelist (& other settings) & use their own...for example, a Reseller can ignore Root's Whitelist, a cPanel user can ignore the Reseller's Whitelist & a Webmail user can ignore the cPanel users Whitelist...I wasn't gonna list them all, but I wanted to be clear. Each type of user can "ignore" or "supplement" their parents Whitelist.
PS: Where can I report bugs with this feedback/comment system? — I didn't think this comment was gonna appear correctly, due to bugs I experienced while trying to make it & unfortunately this system has no Preview function...however, after posting, I saw that I was able to edit it, that's good at least!.
Is this available in Reseller WHM or Root WHM?
The Docs NEVER say if they're referring to "Root WHM" or "Reseller WHM"...you just have to guess.
I know the feature just came out, but please Enable it for Reseller WHM too. Root should be able to Enable/Disable & set the Default for the server (On or Off), but a Reseller should be able to Enable/Disable for their sub-accounts (if the feature is "Enabled" as "Default On" or "Default Off", in Root WHM).
Furthermore, as long as it's "Enabled" in Root WHM & Reseller WHM, cPanel & Webmail users should be able to turn it on/off for themselves too...
Root WHM...
Greylisting- Default On
- Default Off
- Disabled
Reseller WHM...
Greylisting
For my account...- Use Default (<status>) — <status> being either "On" or "Off" from the Root's settings
- On
- Off
- Use Default (<status>) — <status> being either "On" or "Off" from the Root's settings
- Default On
- Default Off
- Disabled
For sub-accounts...
cPanel user...
Greylisting
For my account...- Use Default (<status>) — <status> being either "On" or "Off" from the Reseller's settings
- On
- Off
- Use Default (<status>) — <status> being either "On" or "Off" from the Reseller's settings
- Default On
- Default Off
- Disabled
For Webmail users...
Webmail user...
Greylisting- Use Default (<status>) — <status> being either "On" or "Off" from the cPanel user's settings
- On
- Off
...also each level of user should be able to Whitelist (& change other settings) for themselves & their sub-ordinate users, sub-ordinate users should be able to ignore their parent's Whitelist (& other settings) & use their own...for example, a Reseller can ignore Root's Whitelist, a cPanel user can ignore the Reseller's Whitelist & a Webmail user can ignore the cPanel users Whitelist...I wasn't gonna list them all, but I wanted to be clear. Each type of user can "ignore" or "supplement" their parents Whitelist.
PS: Where can I report bugs with this feedback/comment system? — I didn't think this comment was gonna appear correctly, due to bugs I experienced while trying to make it & unfortunately this system has no Preview function...however, after posting, I saw that I was able to edit it, that's good at least!.
Another feature / improvement for cpgreylistd is the ability to _easily_ export the full content of the whitelisted entries and subsequent easy import into another server. Once a company gets one machine set up with their preferred whitelisted hosts, it then becomes an extremely tedious process to do the same for each additional server they are running.
Being able to easily export the whitelist entries and then import it into every other new server deployed will save a tremendous amount of time and ensure that the hosting company's servers are effective [without penalizing their favored whitelisted hosts].
Please consider a utility to easily export / import whitelist data between servers.
Mike
Another feature / improvement for cpgreylistd is the ability to _easily_ export the full content of the whitelisted entries and subsequent easy import into another server. Once a company gets one machine set up with their preferred whitelisted hosts, it then becomes an extremely tedious process to do the same for each additional server they are running.
Being able to easily export the whitelist entries and then import it into every other new server deployed will save a tremendous amount of time and ensure that the hosting company's servers are effective [without penalizing their favored whitelisted hosts].
Please consider a utility to easily export / import whitelist data between servers.
Mike
....or better yet, synchronize them......... :)
....or better yet, synchronize them......... :)
Indeed, synchronize would be nice, BRT.
The more machines I set up with greylisting, the more of a major nightmare this becomes. I'm sure cPanel would have the answer of "simply enable the whitelisting of hosts that pass SPF." But, that is not an option. If you do that, you might as well not bother using greylisting as a spam prevention measure. For greylisting to truly be effective, you need to NOT allow hosts to bypass greylisting just because they have valid SPF in place. Why? All the good spammers use SPF. And that is a fact.
I'm working on server #3 now and finding the time that it takes me to scour a month worth of mail logs looking for appropriate items to whitelist is just taking way too much time and energy. We should be able to do it once and then export it and import it into another server.
Mike
Indeed, synchronize would be nice, BRT.
The more machines I set up with greylisting, the more of a major nightmare this becomes. I'm sure cPanel would have the answer of "simply enable the whitelisting of hosts that pass SPF." But, that is not an option. If you do that, you might as well not bother using greylisting as a spam prevention measure. For greylisting to truly be effective, you need to NOT allow hosts to bypass greylisting just because they have valid SPF in place. Why? All the good spammers use SPF. And that is a fact.
I'm working on server #3 now and finding the time that it takes me to scour a month worth of mail logs looking for appropriate items to whitelist is just taking way too much time and energy. We should be able to do it once and then export it and import it into another server.
Mike
I'd also like the ability to search the IPs on the Greylisting page (and, if possible, have it match an IP even if it is in the middle of a defined range)
For example, let's say that you learn of a couple of new blocks of IPs that GMail is using. I'd like to see if I have these already listed, but it's pretty time consuming to scroll through the list (although I realize they are sorted by the first octet).
cPanel uses cool ajax search in a lot of places, so hopefully this isn't too difficult to implement someday.
- Scott
I'd also like the ability to search the IPs on the Greylisting page (and, if possible, have it match an IP even if it is in the middle of a defined range)
For example, let's say that you learn of a couple of new blocks of IPs that GMail is using. I'd like to see if I have these already listed, but it's pretty time consuming to scroll through the list (although I realize they are sorted by the first octet).
cPanel uses cool ajax search in a lot of places, so hopefully this isn't too difficult to implement someday.
- Scott
I found something interesting today. After upgrading to 11.50 and enabling GreyListing, I noticed that some large mail providers were already whitelisted and assumed that this meant that ALL of the IPs that are listed in cPanel's documentation at https://documentation.cpanel.net/display/ALD/Common+Mail+Service+IP+Addresses were in this list. But that is NOT the case. It seems selectively only some of the IPs are whitelisted for you automatically... you MUST run a script manually to get ALL of these IPs added to your Whitelist.
Here is the command you will want to run:
I found something interesting today. After upgrading to 11.50 and enabling GreyListing, I noticed that some large mail providers were already whitelisted and assumed that this meant that ALL of the IPs that are listed in cPanel's documentation at https://documentation.cpanel.net/display/ALD/Common+Mail+Service+IP+Addresses were in this list. But that is NOT the case. It seems selectively only some of the IPs are whitelisted for you automatically... you MUST run a script manually to get ALL of these IPs added to your Whitelist.
Here is the command you will want to run:
The amount of spam that just made it through my servers today was enormous, despite (a) all domains have greylisting enabled and (b) the IP blocks of the spammers are not whitelisted.
I had a ticket open about this, but I was left having to do all the work figuring out what the problem is and I just don't have time for that. There is some error in the cpgreylistd logic, or perhaps some problem when one adds their own whitelisting blocks, that suddenly causes incoming hosts to be able to totally bypass greylisting.
I think before any features need added, this needs resolved. And it is possible that If nobody else is seeing what I'm seeing, then (a) they aren't looking or (b) they haven't added a bunch of their own entries to the whitelist or (c) or they bypass greylisting on hosts that pass SPF.
The issue I describe is a real issue. The IP blocks are never deferred, even if its the first time the IPs have been seen in four weeks.
Greylisting is great, when it works.
m
The amount of spam that just made it through my servers today was enormous, despite (a) all domains have greylisting enabled and (b) the IP blocks of the spammers are not whitelisted.
I had a ticket open about this, but I was left having to do all the work figuring out what the problem is and I just don't have time for that. There is some error in the cpgreylistd logic, or perhaps some problem when one adds their own whitelisting blocks, that suddenly causes incoming hosts to be able to totally bypass greylisting.
I think before any features need added, this needs resolved. And it is possible that If nobody else is seeing what I'm seeing, then (a) they aren't looking or (b) they haven't added a bunch of their own entries to the whitelist or (c) or they bypass greylisting on hosts that pass SPF.
The issue I describe is a real issue. The IP blocks are never deferred, even if its the first time the IPs have been seen in four weeks.
Greylisting is great, when it works.
m
"Consider IP in same /24 as a match during retries" would be a very, very useful feature. A /24 would have matched everything I've had to go manually whitelist so far because of IP jumping as mentioned.
"Consider IP in same /24 as a match during retries" would be a very, very useful feature. A /24 would have matched everything I've had to go manually whitelist so far because of IP jumping as mentioned.
For all of you wanting cpgreylistd to whitelist all IPs in a /24 where one IP was whitelisted, you really should think long and hard about that.
The real key to effective greylisting is NOT autowhitelisting AND populating a whitelist from the start with meaningful data. Sure, it takes works [it took a couple weeks for me to do this on my servers].
Imagine this scenario [and it would happen often] -- A spam run starts from an IP in 1.2.3.0/24. One single spam manages to make it through the greylisting mechanism, and then suddenly the whole /24 is available to the spammer to spam without any delay or consequence. You've now just defeated the whole purpose of greylisting.
Despite RFCs or anything else, greylisting should never automatically whitelist blocks of IP space. Or, if it does, it should be an _optional_ setting.
Some people, like myself, spend weeks prepopulating the database with whitelist entries. Now that I've done that, I rarely ever have to touch it. But, there are no blocks of spammer IPs whitelisted.
If a "feature" is added to cpgreylistd to whitelist /24s, it must be an optional thing . Please, cPanel, before you enable this feature do consider making it an optional setting.
I already know, on my servers, that if a future version of cpgreylistd defaults to whitelisting /24s and there is no way for me to disable that, then the greylisting has become totally unffective for me.
Mike
For all of you wanting cpgreylistd to whitelist all IPs in a /24 where one IP was whitelisted, you really should think long and hard about that.
The real key to effective greylisting is NOT autowhitelisting AND populating a whitelist from the start with meaningful data. Sure, it takes works [it took a couple weeks for me to do this on my servers].
Imagine this scenario [and it would happen often] -- A spam run starts from an IP in 1.2.3.0/24. One single spam manages to make it through the greylisting mechanism, and then suddenly the whole /24 is available to the spammer to spam without any delay or consequence. You've now just defeated the whole purpose of greylisting.
Despite RFCs or anything else, greylisting should never automatically whitelist blocks of IP space. Or, if it does, it should be an _optional_ setting.
Some people, like myself, spend weeks prepopulating the database with whitelist entries. Now that I've done that, I rarely ever have to touch it. But, there are no blocks of spammer IPs whitelisted.
If a "feature" is added to cpgreylistd to whitelist /24s, it must be an optional thing . Please, cPanel, before you enable this feature do consider making it an optional setting.
I already know, on my servers, that if a future version of cpgreylistd defaults to whitelisting /24s and there is no way for me to disable that, then the greylisting has become totally unffective for me.
Mike
I personally wasn't necessarily talking about -whitelisting- the /24, but rather that if a message comes from 10.10.10.131 and the -same- message arrives ten minutes later from 10.10.10.72, it could be accepted as a match.
Proceeding to whitelist the whole /24 wouldn't be a good idea, no.
I personally wasn't necessarily talking about -whitelisting- the /24, but rather that if a message comes from 10.10.10.131 and the -same- message arrives ten minutes later from 10.10.10.72, it could be accepted as a match.
Proceeding to whitelist the whole /24 wouldn't be a good idea, no.
Greylisting is ok but there are problems with email delay.
For that i have two suggestions
1. Currently cPanels greylisting implementation allows a triplet to send mail (after successful delivery ), which in my opinion is not enough.
For example if user1@domain.com sends a successful mail from IP : 1.2.3.4 , then for a a period of time cpgreylistd will accept all mail from that user1@domain.com and IP : 1.2.3.4 ; but will greylist for example user2@domain.com ( from same IP )
I would suggest that accept anything from that IP , or at least anything from that IP and domain.com source domain.
1.2.3.4 already proved that has a proper queuing , so we don't gaining anything from delaying/greylisting the other mails .
2. Its a more complicated suggestion: i would like an option to greylist based on IP sender scores ( for example http://senderscore.org, their scores is available via a RBL like DNS list ).
I would accept any mail from IPs having a score bigger than for example 80, and would allow normal greylisting rules for the ips having less ( or having no score).
While high scoring IP's can send spam, they have proper mail server behind, so greylisting wouldn't help anyway.
Greylisting is ok but there are problems with email delay.
For that i have two suggestions
1. Currently cPanels greylisting implementation allows a triplet to send mail (after successful delivery ), which in my opinion is not enough.
For example if user1@domain.com sends a successful mail from IP : 1.2.3.4 , then for a a period of time cpgreylistd will accept all mail from that user1@domain.com and IP : 1.2.3.4 ; but will greylist for example user2@domain.com ( from same IP )
I would suggest that accept anything from that IP , or at least anything from that IP and domain.com source domain.
1.2.3.4 already proved that has a proper queuing , so we don't gaining anything from delaying/greylisting the other mails .
2. Its a more complicated suggestion: i would like an option to greylist based on IP sender scores ( for example http://senderscore.org, their scores is available via a RBL like DNS list ).
I would accept any mail from IPs having a score bigger than for example 80, and would allow normal greylisting rules for the ips having less ( or having no score).
While high scoring IP's can send spam, they have proper mail server behind, so greylisting wouldn't help anyway.
I think whitelisting a C class is perfectly possible without risks, but only for same sender and same recipient...
This way, for that sender/recipient, you may accept mails whitelisted from the C class, but not other emails...
If the sender/recipient is different, the C class is not considered.
I think whitelisting a C class is perfectly possible without risks, but only for same sender and same recipient...
This way, for that sender/recipient, you may accept mails whitelisted from the C class, but not other emails...
If the sender/recipient is different, the C class is not considered.
Replies have been locked on this page!