LinuxCommandLibrary

qm-list

List virtual machines and containers

TLDR

List all virtual machines

$ qm [[l|list]]
copy

List all virtual machines with a full status about the ones which are currently running
$ qm [[l|list]] --full 1
copy

SYNOPSIS

qm-list
(Note: This command typically does not accept command-line options or arguments.)

DESCRIPTION

qm-list is a utility program provided as part of the Qmail Mail Transfer Agent (MTA) suite. It is designed to display a comprehensive list of messages currently residing within the Qmail mail queue. The command provides an overview of pending outgoing or incoming mail, typically showing details such as the message ID, the sender's address, the recipient's address(es), the message size, and the age of the message in the queue. This tool is invaluable for system administrators to monitor the health and activity of their Qmail mail server, identify potential mail delivery issues, or check for backlogs in the mail queue. It reads directly from the Qmail queue directory structure to compile its report, offering a snapshot of current mail flow.

CAVEATS

  • Requires a functional Qmail installation to be present on the system.
  • The command's output format can be complex and may vary slightly depending on the Qmail version or specific patches applied.
  • Administrator privileges (root or specific Qmail user) are often required to execute this command successfully, as it needs read access to the Qmail queue directories.
  • High queue volumes can result in very lengthy output, potentially difficult to parse manually without piping to other commands.

OUTPUT FORMAT

The output of qm-list typically displays messages in a structured format, often including columns for:

  • Message ID: A unique identifier for the message within the queue.
  • Sender Address: The email address of the message's originator.
  • Recipient Addresses: The email addresses of the intended recipients (may be truncated or listed across multiple lines).
  • Size: The size of the message in bytes.
  • Age: The duration the message has been in the queue (e.g., 'X days, Y hours').
  • Status/Reason: Information indicating if the message is temporarily undeliverable or delayed, often with an associated error message.

TYPICAL USAGE

Administrators frequently pipe the output of qm-list to other standard Unix commands like grep, awk, or less for filtering, further processing, or easier viewing, especially when dealing with large queues. For instance, qm-list | grep 'user@example.com' could be used to find messages destined for a specific user, or qm-list | less for paginated viewing.

HISTORY

Qmail itself was originally developed by Daniel J. Bernstein (DJB) in 1995, with a strong emphasis on security, reliability, and simplicity. qm-list emerged as one of the essential utility programs within the Qmail suite, providing administrators with a crucial tool for queue management and monitoring. Unlike many other MTA utilities that might evolve with numerous command-line options, qm-list has largely maintained its simple, direct functionality, reflecting Qmail's overall design philosophy of doing one thing well. Its usage became widespread in environments utilizing Qmail as their primary mail server.

SEE ALSO

qmail-qstat(8), qm-qread(8), qmail-send(8), qmail-inject(8)

Copied to clipboard