Check mailq


Checks the mail queue. Tested with Postfix and Exim.


  • Exim: By default, exim -bq (alias mailq) can be used only by an admin user. However, the queue_list_requires_admin option can be set false to allow any user to see the queue. Alternatively, add the icinga user to the exim group.

Fact Sheet

Check Plugin Download

Check Interval Recommendation

Every 5 minutes

Can be called without parameters


Available for

Python 2, Python 3


command-line tool mailq


usage: mailq [-h] [-V] [--always-ok] [-c CRIT] [--test TEST] [-w WARN]

Checks the mail queue.

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --always-ok           Always returns OK.
  -c CRIT, --critical CRIT
                        Set the critical threshold for mails in the queue.
                        Default: 250
  --test TEST           For unit tests. Needs "path-to-stdout-file,path-to-
  -w WARN, --warning WARN
                        Set the warning threshold for mails in the queue.
                        Default: 2

Usage Examples

./mailq --warning 2 --critical 250


4 mails to deliver.


  • WARN on error messages from mailq.

  • WARN or CRIT if number of messages is greater than or equal to the thresholds.

Perfdata / Metrics

  • mailq: Mails in mail queue

Credits, License