Page 1 of 2

any way to block .tlds?

Posted: 17 Jul 2014, 04:21
by alexistkd
Hi im looking to block all emails from .eu as im getting alot of spam i tried to configure filter in exim but no luck how i can achieve this?

thank you.

Re: any way to block .tlds?

Posted: 29 Oct 2014, 04:58
by silver_2000
yes use the black list function in cpanel under mailscannner config / Email Black/Whitelist settings and add
domains in this format
*@*.me
*@*.in
*@*.eu
*@*.asia
*@*.uk
*@*.link

Re: any way to block .tlds?

Posted: 06 Feb 2015, 18:14
by mauinet
Hello,
I tried the listing exactly as above in /usr/mailscanner/etc/rules/spam.blacklist.rules.
It does not block these. Is there something else I have to do to or another setting in mailscanner to make it take affect?

Thanks,
TR

Re: any way to block .tlds?

Posted: 06 Feb 2015, 18:27
by silver_2000
Do it from the web interface in Cpanel per domain

Re: any way to block .tlds?

Posted: 06 Feb 2015, 20:45
by sawbuck
Use "From: /\.eu$/ yes" (without the quotes) and reload MS.

Re: any way to block .tlds?

Posted: 09 Feb 2015, 01:35
by mauinet
Thanks for the suggestions, I will try them.

Re: any way to block .tlds?

Posted: 01 Sep 2015, 15:50
by circusplexus
I have been blocking these in MSFE through WHM not in Cpanel per user. That would take forever. I do have a question about .xyz. I would like to block it, but now that Google has registered alphabet.xyz I fear real people might also start using that tld. I've even seen registrars advertise it.

Anyone have thoughts on what to block/not block server-wide? What's the best practice?

Re: any way to block .tlds?

Posted: 10 Jun 2016, 21:46
by patchwork3
I've been trying automatically delete emails actually marked as {Spam?} and from certain TDL's, such as
.download .pro .xyz .click .faith .top

I've tried the global email filter in cpanel but that doesn't work, and I've been looking for a way to do it in mailscanner but I'm not getting too far.

I've setup the filter in thunderbird for my own private email and it works great with 0% false positives so far, but I would really like to fine a way to do it server wide without tons of hassle.

I want
subject: contains spam AND from: ends with .download

Pete

Re: any way to block .tlds?

Posted: 11 Jul 2016, 07:57
by Sergio
I created the following rule to block all the .TLDS that I don't want to accept in my server, if you use it is at your own risk, I don't accept any responsibilities; on the other hand, it will be great to know if it worked for you:

Code: Select all

# start TLDs blocked rule by Sergio
# you use it is at your own risk,
# not responsibilities accepted.

header __FROM_TLDFROM From =~ /\.(bid|book|click|club|cricket|date|democrat|directory|download|faith|help|host|link|ninja|online|party|press|pro|racing|reviews?|rocks|science|site|social|space|stream|top|uno|webcam|website|work|win|xyz)\>/i

header __FROM_TLDFROMA From:address =~ /\.(bid|book|click|club|cricket|date|democrat|directory|download|faith|help|host|link|ninja|online|party|press|pro|racing|reviews?|rocks|science|site|social|space|stream|top|uno|webcam|website|win|work|xyz)$/i

meta FROM_TLD ( __FROM_TLDFROM + __FROM_TLDFROMA >= 1 )
score FROM_TLD 11
describe FROM_TLD Sergio's Forbiden TLDs

# ends TLDs blocked rule
To use it:
- go to /etc/mail/spamassassin and create a file called "blacklist.cf"
- edit "blacklist.cf" and copy paste the above rules and save
- goto MailScanner and reload

You can add or delete TLDs but double check that you do it on both rules TLDFROM and TLDFROMA.

Sergio

Re: any way to block .tlds?

Posted: 22 Jul 2016, 18:59
by espinosap
I love you Sergio