Sudo mailq

The mailq command!

mailq is a command-line utility that displays the mail queue, which is a list of emails that are waiting to be delivered to their final destinations. The queue is managed by the Mail Transfer Agent (MTA), such as Postfix or Sendmail.

When you run sudo mailq, you'll see a list of emails that are currently in the queue, along with some information about each message, such as:

Here's an example output:

-Queue ID-  --Size-- ---Rcpt---  Status
  123456  1024  [email protected]  deferred
  789012  512   [email protected]  pending
  345678  2048  [email protected]  delivered

In this example, there are three messages in the queue:

You can use various options with mailq to filter the output or take action on specific messages. For example:

Keep in mind that the mailq command is usually used by system administrators to manage the mail queue and troubleshoot email delivery issues. If you're not familiar with the command or its output, it's best to consult the documentation for your MTA or seek assistance from a system administrator.