New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Fighting Spam: Block entire TLD (Top Level Domain) with Postfix

Started by detay, March 19, 2021, 10:44:20 AM

Previous topic - Next topic

detay

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 ...  ;)

DNA

Hi
To monitor outgoing & incoming spamming , Mailwatch is best option for CWP .



Let me know if you need any help

dp41646

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!

Painkiller88

Quote from: DNA 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

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

This looks interesting.


thanks