Vijay Kumar Gajula
asked on
block mails from a particular country in postfix
Is there any possibility to block mails from country wise in Postfix. Â for Example I need to block all mails coming from China. Please let me know the process.
Thanks,
Vijay.G
Thanks,
Vijay.G
The most straightforward way is blocking the /8 IP block of the associated country, via iptables.
The list of IPv4 is here - http://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.xhtml
Ipv6 is here - https://www.iana.org/assignments/bgp-extended-communities/bgp-extended-communities.xhtml#non-trans-ipv6
Regardless of your postfix config, if you block via iptables rules, they won't be able to get mail or any other packets to your server...like bruteforce, etc.
The list of IPv4 is here - http://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.xhtml
Ipv6 is here - https://www.iana.org/assignments/bgp-extended-communities/bgp-extended-communities.xhtml#non-trans-ipv6
Regardless of your postfix config, if you block via iptables rules, they won't be able to get mail or any other packets to your server...like bruteforce, etc.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Use PFblocker
ASKER
is PFblocker is open source? can we install it in my mail server which is UBUNTU back-end. If So Please let me know the procedure.
Thanks
Thanks
Yes PFblocker is open source, however it only installs on PFsense from what I know and found. So maybe use PFsense as your firewall then you'll have all this functionality
ASKER
Thanks
http://freesoftware.zona-m.net/how-to-reject-spam-from-certain-countries-if-you-must-really-really-do-it/