check_mailq

Checks the mail queue.

Implementation

WindowsLinuxFreeBSDmacOS
✅✅✅

Argument Defaults

ArgumentDefault Value
filternone
warningactive > 5 || active_size > 10MB || deferred > 0 || deferred_size > 10MB
criticalactive > 10 || active_size > 20MB || deferred > 10 || deferred_size > 20MB
empty-state3 (UNKNOWN)
empty-syntax%(status) - could not get any mailq data
top-syntax%(status) - %(list)
ok-syntax
detail-syntax%(mta): active %(active) / deferred %(deferred)

Check Specific Arguments

ArgumentDescription
mtaChoose the MTA to check. Use postfix to select it explicitly or auto for automatic detection

Attributes

Filter Keywords

Use these attributes in filters and thresholds, along with the default attributes:

AttributeDescription
mtaName of the MTA
folderChecked spool folder
activeNumber of active mails
active_sizeSize of active mails in bytes
deferredNumber of deferred mails
deferred_sizeSize of deferred mails in bytes

Examples

Default Check

check_mailq
OK - postfix: active 0 / deferred 0 |...

Example using check_snclient and Naemon

Naemon Config

define command{
    command_name         check_snclient
    command_line         $USER1$/check_snclient -k -p 'your-password' -u 'https://$HOSTADDRESS$:8443' $ARG1$ $ARG2$
}

define service {
    host_name            testhost
    service_description  check_mailq
    use                  generic-service
    check_command        check_snclient!check_mailq!warn='active > 5 || deferred > 0' crit='active > 10 || deferred > 10'
}