Spamassassin - blacklist all TLD allow whitelisted TLD?

ampapa

Member
Mar 14, 2018
5
0
1
US
cPanel Access Level
Website Owner
First post to the forum... Hello!

I was wondering if it's possible to blacklist all TLD's then whitelist only a few TLD's (.com, .org, .net, etc.).

How would I do that in Cpanel?

Thanks.

ampapa,
 

ampapa

Member
Mar 14, 2018
5
0
1
US
cPanel Access Level
Website Owner
My interpretation of this is a bit fuzzy... can anyone put this is layman terms for me??

/
.*@.*\.(?!(.*\.)?(com|net|org|int|edu|gov|biz|mil|coop|us))
/
g
.*
matches any character (except for line terminators)
* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
@ matches the character @ literally (case sensitive)
.*
matches any character (except for line terminators)
* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
\. matches the character . literally (case sensitive)
Negative Lookahead (?!(.*\.)?(com|net|org|int|edu|gov|biz|mil|coop|us))
Assert that the Regex below does not match
1st Capturing Group (.*\.)?
? Quantifier — Matches between zero and one times, as many times as possible, giving back as needed (greedy)
.*
matches any character (except for line terminators)
\. matches the character . literally (case sensitive)
2nd Capturing Group (com|net|org|int|edu|gov|biz|mil|coop|us)
1st Alternative com
com matches the characters com literally (case sensitive)
2nd Alternative net
3rd Alternative org
4th Alternative int
5th Alternative edu
6th Alternative gov
7th Alternative biz
8th Alternative mil
9th Alternative coop
10th Alternative us
Global pattern flags
g modifier: global. All matches (don't return after first match)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463