blocking tld and it's subdomains

dibello

Member
Oct 6, 2013
22
0
51
cPanel Access Level
Root Administrator
greetings...

I am trying to block a tld and it's subdomains. The subdomains, IP address and name are always changing making various methods posted in this forum ineffective.

Code:
[174.135.15.7]:<[email protected]>
[24.229.69.40]:<[email protected]>
[216.9.176.191]:<[email protected]>
[66.182.116.193]:<[email protected]>
[87.125.122.14]:<[email protected]>
[52.119.17.193]:<[email protected]>
[88.196.40.111]:<[email protected]>
[208.118.156.49]:<[email protected]>
[99.135.78.58]:<[email protected]>
[192.34.143.103]:<[email protected]>
I've tried:
Code:
if first_delivery
and ("$h_to:, $h_cc:" contains ".top")
or ("$h_from:" contains ".top")
then
seen finish
endif
and also:
Code:
if first_delivery
and $h_from matches " \\N\\.top$\\N"
then
seen finish
endif
both do not work.

any help would be greatly appreciated

and a new one without inboxmsg as a common factor
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

A user on another thread reports success with a specific rule at:

Need to filter ALL email

Could you let us know if that helps?

Thanks!
 

danielpmc

Well-Known Member
Nov 3, 2016
78
33
18
usa
cPanel Access Level
Reseller Owner
Hello dibello,

I am trying to block a tld and it's subdomains.
Try using Global Email Filters in your cPanel.

Use the following filters:

From
Contains .top
Discard Message (or choose another action)

From
Contains inboxmsg
Discard Message (or choose another action)

From
Contains .info-
Discard Message (or choose another action)

Hope this helps you,
danielpmc
 
Last edited:

dibello

Member
Oct 6, 2013
22
0
51
cPanel Access Level
Root Administrator
Initially it worked when "discarded" was selected. The "discarded" selection also signifies that the email was "accepted". Which I don't want especially since most of these are being sent to a non-existant email address on the server.

So I changed the filter from "discarded" to "failed with message" and now the emails are coming through again.

I need a wild card for sender. subdomain1 and subdomain2. along with the tld.

[email protected]