Block Emails By Domain Extension
Hi,
Is it possible to block all incoming emails from domain extensions?
I've receiving a lot of spam from .icu domains and I want to block this entire domain extension.
Is it possible?
Can this be done from Filter Incoming Emails by Domain feature Filter Incoming Emails by Domain - Version 84 Documentation - cPanel Documentation ?
Something like *.icu
-
Hi, I'm not sure if if it's possible to use a wildcard like this, *.*.icu it will have to be tested but most likely not. 0 -
Hello, The interface for this details the syntax as follows: [QUOTE] Filter Incoming Emails by Domain This interface allows you to manage a list of domains that may not send mail to your server. The system will reject any messages that it receives whose "From" address matches one of this list"s domains. You can reject all subdomains of a given domain by prefixing the name with an asterisk (*). For example, "*.example.com" will cause this server to reject all messages sent from any subdomain of "example.com". This interface accepts IDNs.
They use a subdomain as the example but you could use a wildcard to block all from that tld. For example I blocked *.dk and asked my friend with a .dk domain to send me an email:2019-10-30 15:12:56 H=host.name.tld []:26888 X=TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256 CV=no F= rejected RCPT : Sender domain is banned
The bounce he received looked as follows:Final-Recipient: rfc822; lauren@mydomain.us Original-Recipient: rfc822;lauren@mydomain.us Action: failed Status: 5.0.0 Remote-MTA: dns; mydomain.us Diagnostic-Code: smtp; 550 Your host is not allowed to connect to this server.
Thanks!0 -
Thanks for reply. I've one more question. How do we block all domains which have only numbers in domain names. E.g. 1234.com 2319.com etc.. Does this block support regex? If it's not possible to do it from here, then is there any other way to do it? 0 -
I do not believe this will support regex, what you could do is create an exim system filter which would support regex. We have a guide on this here: How to Customize the Exim System Filter File - cPanel Knowledge Base - cPanel Documentation 0 -
I already have this filter see one below. Does anyone know how to add regex to block all domains with all numbers in it? if first_delivery and ("$h_to:, $h_cc:" contains ".icu") or ("$h_from:" contains ".icu") then seen finish endif0
Please sign in to leave a comment.
Comments
5 comments