Beginner Package: exim4 / postfix

mailq

Show the mail queue (Sendmail-compatible front end).

Syntax

mailq

Description

mailq is a Sendmail-compatible command that most MTAs — including Exim and Postfix — provide as a shortcut for listing the current queue, so it works the same way regardless of which mail server is actually installed.

Examples

mailq
Show all queued messages, MTA-agnostic
mailq | grep -c "^[A-F0-9]"
Rough count of queued message IDs
On Exim systems this is usually a symlink equivalent to "exim -bp".

Applies to

Ubuntu Debian Linux Mint RHEL CentOS / Rocky / AlmaLinux Fedora Arch Linux openSUSE Alpine Linux

Put it into practice

Learn this in context