Page 1 of 1

Country Code Deny

Posted: 14 Apr 2013, 06:29
by daferub
Hello,

I'm receiving a lot of spam from Germany and need to know if blocking this country in the country code deny of csf it stop the spam.

Awaiting replies

Regards

Re: Country Code Deny

Posted: 15 Apr 2013, 01:22
by Sergio
Yes, CC deny will deny any connection from that country to your server including email ports.

Sergio

Re: Country Code Deny

Posted: 18 Apr 2013, 14:04
by JasGot
May I ask a question on this same topic? Does the CC_Deny or CC_Filter block all incoming mail also? Or just blocks attempts to use the smtp server to send mail?

I want to stop all CC codes except US from logging in to the pop3d or using the smtp to send mail, but I do not want to stop legitimate mail from other countries being delivered to my local users.

Thanks.

Re: Country Code Deny

Posted: 20 Apr 2013, 18:26
by nibb
Use that feature with precaution, unless you have a very powerful server I would not block a whole country. A whole country list is huge, this means you will load thousands of blocks of IP into iptables which will make it crawl or even possible not boot at all.

Also, the country list is not perfect, it can and will probably block IPs which are not for that country. It would be better maybe to only block that ISP or try to narrow your target.

Re: Country Code Deny

Posted: 20 Apr 2013, 22:04
by JasGot
Ya, I see my IP tables file is about 15,000 lines long now. But it has been a blessing to get rid of the constant hits from China and India, as well as others!

Re: Country Code Deny

Posted: 01 May 2013, 21:34
by JasGot
This has been working for me for CN,IN,MY,PH,UA,HK but after I added PW, I noticed it doesn't block any PW messages.

I just looked at one of the spam messages. The FROM address is blah@blah.pw but when I look at the sending server is from France.

How can I block all e-mail whose FROM address end in .pw????

Re: Country Code Deny

Posted: 01 May 2013, 23:35
by Sergio
Do you use MailScanner?

If so, you can block anything you want using MCP rules.

Re: Country Code Deny

Posted: 02 May 2013, 02:24
by JasGot
I do. I think I figured it out a short while ago. I'm watching the recent messages list now to see how it goes.

I put this:

From: /\.pw$/ yes

in the spam.blacklist.rules

Re: Country Code Deny

Posted: 02 May 2013, 13:40
by JasGot
This worked a treat!