I'm driven by a relentless pursuit of innovation, turning challenges into opportunities to create impactful solutions for humanity.
+8801 PROTECTED
Dhaka, Bangladesh
Emails stuck in Postfix on CyberPanel are usually caused by misconfigured filters or HOLD rules. This guide shows a simple step-by-step way to fix it and get your emails sending again.
Emails stuck in the mail queue can be frustrating, especially when you rely on your server for sending transactional emails. If you’re using CyberPanel with Postfix and notice that all emails are stuck in the HOLD queue, this guide will help you troubleshoot and fix the issue step by step.
Before diving into commands, it’s important to understand why Postfix holds emails.
Postfix may place emails in the HOLD queue due to:
content_filter misconfiguration).Checking the mail queue will help identify the issue:
postqueue -p
Emails with a ! at the end of the queue ID are in HOLD.
CyberPanel often installs SpamAssassin by default. Run these commands to check their status:
systemctl status spamassassin
systemctl status amavis
- If amavis is missing and content_filter is set to spamassassin, Postfix can’t process emails properly.
- In that case, you would either install Amavis or remove the content_filter from /etc/postfix/main.cf.
Check content_filter:
postconf | grep content_filter
If it’s empty, you are fine.
Sometimes, emails are stuck because of Postfix header_checks or body_checks rules. To check:
postconf -n | grep header_checks
This will show the file Postfix uses to inspect email headers.
Open the header_checks file:
cat /etc/postfix/header_checks
If you see a line like:
/^Received:/ HOLD
This is the root cause! Every email has a Received: header, so this rule forces all emails into HOLD.
Edit the header_checks file:
nano /etc/postfix/header_checks
Comment out the line by adding # at the beginning:
#/^Received:/ HOLD
Save and exit (Ctrl+O → Enter → Ctrl+X).
Run the following commands to update Postfix:
postmap /etc/postfix/header_checks
systemctl restart postfix
Finally, release emails from the HOLD queue:
postsuper -H ALL
postqueue -f
All previously held emails should now be sent immediately.
Check the mail queue again to ensure it’s empty:
postqueue -p
You should see no emails in HOLD. Test sending a new email to confirm that everything is working.
/^Received:/ HOLD. They catch all emails.Keep logs handy:
tail -f /var/log/maillog
Emails stuck in Postfix on CyberPanel are often caused by misconfigured filters or overly broad header rules. By carefully checking your configuration and removing unnecessary HOLD rules, you can restore normal email delivery. This step-by-step approach ensures that your server stays stable and emails are delivered reliably.
Your email address will not be published. Required fields are marked *