Country Code Deny

Post Reply
daferub
Junior Member
Posts: 2
Joined: 31 Oct 2012, 15:33

Country Code Deny

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

Re: Country Code Deny

Post by Sergio »

Yes, CC deny will deny any connection from that country to your server including email ports.

Sergio
JasGot
Junior Member
Posts: 35
Joined: 10 Jan 2008, 17:16

Re: Country Code Deny

Post 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.
nibb
Junior Member
Posts: 12
Joined: 20 Apr 2013, 03:15

Re: Country Code Deny

Post 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.
JasGot
Junior Member
Posts: 35
Joined: 10 Jan 2008, 17:16

Re: Country Code Deny

Post 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!
JasGot
Junior Member
Posts: 35
Joined: 10 Jan 2008, 17:16

Re: Country Code Deny

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

Re: Country Code Deny

Post by Sergio »

Do you use MailScanner?

If so, you can block anything you want using MCP rules.
JasGot
Junior Member
Posts: 35
Joined: 10 Jan 2008, 17:16

Re: Country Code Deny

Post 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
JasGot
Junior Member
Posts: 35
Joined: 10 Jan 2008, 17:16

Re: Country Code Deny

Post by JasGot »

This worked a treat!
Post Reply