How does CWP use postfix for anti-spam?Avoid spam settings

CWP Control PanelHow to solve spam problem with postfix mail server?

How does CWP use postfix for anti-spam?Avoid spam settings

Before starting, we should stop the postfix mail server ▼

service postix stop

How does CWP use postfix for anti-spam?

First, let's count the number of emails stuck in the mail server queue ▼

postqueue -p | grep -c "^[A-Z0-9]"

Select several similar emails and use ID to check them ▼

postqueue -p

Similar results will be displayed▼

2F0EFC28DD 9710 Fri 15 03:20:07  hello@ abc. com

Now we need to read that email by ID ▼

postcat -q 2F0EFC28DD
  • By reading the content of the email, we can determine if it is spam.
  • If the email is spam, then you need to find its source.
  • If the email source contains something like sasl login: This means that the "sasl" password for the email account "[email protected]" was hacked to log in.

To protect your server, you need to change your email account password:

After changing the account password, you should restart postfix ▼

service postfix restart

Remove all messages from the queue ▼

postsuper -d ALL

Before deleting any emails, you should check their source as it could be a php script hacked inside.

If you can't solve the problem of hackers spamming spam, you can directly disable sending emails and set up server cron.

If using the CWP Control Panel, log into the CWP Control PanelOf Server SettingCrontab for root ▼

How to set Crontab timed tasks to automatically sync to GDrive in CWP control panel?2rd

In "Add Full Custom Cron Jobs", enter the following fully custom cron command ▼

* * * * * /usr/sbin/postsuper -d ALL
  • (delete all queued messages every 1 minute)

How to Avoid Hacking Spam Settings?

Don't forget to scan your CWP for malicioussoftware.

Navigate to the left side of the CWP Control Panel and click Security → Security Center → Malware Scan → Accounts Scan:Select your account option to scan for malware.

If you install mod security with auto-update rules to prevent any further hacking of your website, but it may also make your website inaccessible with a "403 Forbidden Error" error in the background, you need to turn on mod security with caution.

This article will be updated from time to time! ! !

The link below summarizes the list of commonly used command lines in Postfix▼

Comment

Your email address will not be published. Required fields * Callout

Scroll to Top