Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Manage the mail queue in DirectAdmin

If emails seem stuck, the mail queue may explain why. This guide shows how to look at it and clear it.

DirectAdmin2 min read4 steps2 screenshots

What is a mail queue?

The mail queue is a waiting line for outgoing emails. When you send a message, the server does not always send it at once. It may need to retry if the other side is busy. The message waits in the queue. It is like letters sitting in an outbox before the post van arrives.

A few messages in the queue is normal. Hundreds can mean a problem, such as a hacked mailbox sending spam.

The queue is a server-level feature. You need Admin access, which means a VPS or dedicated server. On shared hosting, ask Hostvento support.

View the queue

  1. Log in to DirectAdmin as Admin.
  2. Go to Admin Level.
  3. Click Mail Queue Administration. Use the search box if you cannot see it.
    Screenshot: Click Mail Queue Administration . Use the search box if you cannot see it.
  4. You see a list of waiting messages. Each row shows the sender, the receiver, the size and the age.

Take action

For each message, pick one of these:

  • View the details or headers to learn why it is stuck.
  • Retry or Deliver to try sending again now.
  • Delete to remove a message.

To clear many at once, tick the boxes and apply the action. Some versions let you delete the whole queue.

Warning: Deleted emails are gone for good. Check that you are not removing real mail. Look at the sender and subject first.

Command line option (root access needed)

DirectAdmin uses Exim to send mail. Exim is the mail-sending program. Connect with SSH as root and use these commands.

exim -bpc

This prints how many messages are in the queue.

exim -bp

This lists the messages with their IDs.

exim -qff

This tries to send all queued messages, including frozen ones.

exim -Mrm MESSAGE_ID

This removes one message. Replace MESSAGE_ID with an ID from the list.

Why does a queue grow?

  • A hacked account or a weak password.
  • A website form sending spam.
  • The receiving server blocking your IP address.
  • Wrong DNS settings, such as missing SPF or DKIM.

Quick recap

  • The mail queue holds outgoing emails waiting to be sent.
  • Admins use Mail Queue Administration to view, retry or delete.
    Screenshot: Admins use Mail Queue Administration to view, retry or delete.
  • Root users can use Exim commands.
  • A very large queue often means spam or a hacked account.