any way to block .tlds?

Discuss the ConfigServer MailScanner Front-End script
alexistkd
Junior Member
Posts: 5
Joined: 09 Apr 2013, 06:27

any way to block .tlds?

Post 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.
silver_2000
Junior Member
Posts: 115
Joined: 18 Dec 2006, 01:55

Re: any way to block .tlds?

Post 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
mauinet
Junior Member
Posts: 20
Joined: 09 Jan 2008, 00:01

Re: any way to block .tlds?

Post 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
silver_2000
Junior Member
Posts: 115
Joined: 18 Dec 2006, 01:55

Re: any way to block .tlds?

Post by silver_2000 »

Do it from the web interface in Cpanel per domain
sawbuck
Junior Member
Posts: 366
Joined: 10 Dec 2006, 16:20

Re: any way to block .tlds?

Post by sawbuck »

Use "From: /\.eu$/ yes" (without the quotes) and reload MS.
mauinet
Junior Member
Posts: 20
Joined: 09 Jan 2008, 00:01

Re: any way to block .tlds?

Post by mauinet »

Thanks for the suggestions, I will try them.
circusplexus
Junior Member
Posts: 22
Joined: 27 Jun 2007, 22:28

Re: any way to block .tlds?

Post 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?
patchwork3
Junior Member
Posts: 3
Joined: 23 Feb 2013, 22:13

Re: any way to block .tlds?

Post 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
Sergio
Junior Member
Posts: 1685
Joined: 12 Dec 2006, 14:56

Re: any way to block .tlds?

Post 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
espinosap
Junior Member
Posts: 3
Joined: 25 Feb 2010, 11:24

Re: any way to block .tlds?

Post by espinosap »

I love you Sergio
Post Reply