Guides

Step-by-step tutorials and practical fixes for servers, systems, email, and daily technical work.
Linux Guides

How to Check Sendmail Queue

Check whether Sendmail mail is piling up and retry queued messages manually.

Before you start

You need shell access to the Linux server.
These commands are intended for servers using Sendmail.
If mail is delayed, the cause may be local queue buildup or remote delivery problems.

Step-by-step instructions

1. Check current mail queue

Run mailq to see whether mail is currently queued on the server.

Command
mailq
What to look for

If many messages are listed, mail may be stuck or delayed in the queue.

2. Check the queue directory directly

If needed, inspect the actual queue directory contents.

Command
ls -al /var/spool/mqueue
Why this helps

This lets you confirm directly whether queue files are accumulating inside the Sendmail spool directory.

3. Retry queued mail manually

If messages are waiting in the queue, force Sendmail to retry delivery manually.

Command
sendmail -q -v
What it does

It tells Sendmail to process the queue immediately and shows detailed output while delivery is retried.

Common issues

Queue keeps growing

This may mean the remote mail server is rejecting or delaying delivery, or local DNS or routing is failing.

mailq shows entries but retry does not clear them

Check mail logs to confirm whether authentication, DNS, relay, or remote rejection errors are occurring.

mqueue directory looks empty

If there are no queued files, the delivery issue may not be caused by queue buildup at all.

About this guide

This guide shows how to check whether mail is piling up in the Sendmail queue and how to force queued messages to be retried manually.

How to follow this guide

  1. Use mailq to check whether mail queue is building up.
  2. Check the mqueue directory directly if needed.
  3. Run sendmail queue processing manually to retry delivery.

Why use this method?

If mail is not leaving the server properly, checking the queue is one of the fastest ways to confirm whether delivery is delayed or stuck.

Frequently Asked Questions

What does mailq show?

It shows the current Sendmail mail queue and whether messages are waiting to be delivered.

What is /var/spool/mqueue?

It is the directory where queued Sendmail messages are stored temporarily.

What does sendmail -q -v do?

It forces Sendmail to process the queue immediately and shows verbose output.

Does a large queue always mean Sendmail is broken?

No. It can also mean the remote mail server is unavailable or delayed.