Plesk

Manage the Plesk mail queue and fix outgoing email problems

View and clear the Postfix mail queue in Plesk, find the account sending spam, set outgoing mail limits, and fix common delivery errors such as blacklisting and SPF fails.

AdvancedPlesk2 min read

When email stops leaving a Plesk server – or a hacked mailbox floods the internet with spam – the mail queue fills up. Plesk uses Postfix and gives administrators a Mail Queue view plus outgoing mail controls. This guide shows how to clear the queue, find the source of spam and prevent it.

Before you start

  • Plesk administrator access and root SSH access.
  • Plesk's default mail server Postfix (with Dovecot for IMAP/POP3).

View the queue in Plesk

  1. Go to Tools & Settings → Mail Server Settings.
  2. Open the Mail Queue tab.
  3. The list shows queued messages with sender, recipient, size and the reason for delay.
  4. Tick messages and click Remove, or Clear Queue to remove everything (only when you are sure it is all spam).

Useful Postfix commands

TaskCommand
Show the queuepostqueue -p
Count messagespostqueue -p | tail -1
Flush (retry now)postqueue -f
Read a messagepostcat -vq QUEUE-ID
Delete one messagepostsuper -d QUEUE-ID
Delete all deferredpostsuper -d ALL deferred

Find the source of spam

  1. Read a few spam messages with postcat -vq and look at the headers.
  2. If you see X-PPP-Message-ID and an X-PPP-Vhost header, the mail came from a website script on that domain. Check its files for malware.
  3. If the log shows sasl_username=user@domain, a mailbox password was stolen: grep sasl_username /var/log/maillog | awk '{print $NF}' | sort | uniq -c | sort -n.
  4. Change the password or disable the mailbox, then remove the spam from the queue.

Limit outgoing mail

Plesk can cap how much each mailbox, domain and subscription sends per hour. Go to Tools & Settings → Mail Server Settings, enable Limit outgoing email messages and set defaults, for example 100 per mailbox and 500 per subscription per hour. Override limits per service plan or subscription where needed. Plesk notifies you when an account hits its limit – a strong sign of compromise.

Common delivery errors

  • 554 / 550 blocked using Spamhaus or other RBL: your IP is listed. Remove the cause, then request delisting.
  • SPF fail or DMARC reject: fix the domain's records; see SPF, DKIM and DMARC in Plesk.
  • Connection timed out to port 25: the network blocks outgoing SMTP. Ask your provider or use a smart host (relay) under Mail Server Settings → Outgoing mail mode.
  • Host name does not match PTR: set reverse DNS for the IP; on a VPS see set rDNS.

Read the mail log

Plesk logs mail in /var/log/maillog (RHEL-based) or /var/log/mail.log (Debian/Ubuntu). Follow a message by its queue ID: grep QUEUE-ID /var/log/maillog. Administrators can also open Tools & Settings → Log Browser and select the mail log.

Troubleshooting

  • Queue fills again after clearing: the source is still active.
  • Legitimate mail deferred for hours: receiver greylisting or rate limits; Postfix retries automatically.
  • Mail Queue tab empty but users complain: mail may be rejected before queuing; check the log.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.