Author Topic: Fighting Spam: Block entire TLD (Top Level Domain) with Postfix  (Read 7380 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
100% tested with CWP7Pro + Centos 7.9.2009

1. Write the tlds to be blocked to the sender_blacklist file. (/etc/postfix/sender_blacklist)
Example;
/\.asia$/ REJECT All Domain
/\.bg$/ REJECT All Domain
/\.bid$/ REJECT All Domain
/\.biz$/ REJECT All Domain
/\.br$/ REJECT All Domain
/\.buzz$/ REJECT All Domain
(...)

2. Get root access on your server;
# cd /etc/postfix
# postmap hash:/etc/postfix/sender_blacklist
# systemctl restart postfix.service

3. open the main.cf file (/etc/postfix/main.cf);

# rules restrictions
smtpd_client_restrictions = reject_unknown_client, check_client_access hash:/etc/postfix/sender_blacklist
smtpd_helo_restrictions =
smtpd_sender_restrictions = pcre:/etc/postfix/sender_blacklist
smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:10031, permit_sasl_authenticated, permit_mynetworks, check_client_access hash:/etc/postfix/sender_whitelist, check_client_access hash:/etc/postfix/sender_blacklist, reject_unauth_destination, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net

save and exit.

4. And the end;
# systemctl restart postfix.service

Goodbye, spam mails ...  ;)

Offline
*
Re: Fighting Spam: Block entire TLD (Top Level Domain) with Postfix
« Reply #1 on: April 24, 2021, 07:52:24 AM »
Hi
To monitor outgoing & incoming spamming , Mailwatch is best option for CWP .



Let me know if you need any help

Offline
*
Re: Fighting Spam: Block entire TLD (Top Level Domain) with Postfix
« Reply #2 on: April 24, 2021, 09:56:02 AM »
Wow, I didn't know that this exists.
Spam is a really big concern on my servers, and CWP unfortunately is not helping with that :/

It would be great to see this kind of integration officially with CWP!

Offline
**
Re: Fighting Spam: Block entire TLD (Top Level Domain) with Postfix
« Reply #3 on: July 16, 2021, 06:48:25 PM »
Hi
To monitor outgoing & incoming spamming , Mailwatch is best option for CWP .



Let me know if you need any help

Hi could you please do a quick howto how to install it on cwp or post a working link?

This looks interesting.


thanks

Offline
*
Re: Fighting Spam: Block entire TLD (Top Level Domain) with Postfix
« Reply #4 on: August 03, 2021, 11:30:20 AM »
Hi

Already  using it with CWP Server , It's perfectly working