|Front | Info | Lists | Newsfeeds | Study Guide | What is BSD?|
This is the BSDA Study Guide Book written via a wiki collaboration. This is a work in progress. You may contribute to or discuss this specific page at http://bsdwiki.reedmedia.net/wiki/View_the_Sendmail_or_Postfix_mail_queue.html.
View the Sendmail or Postfix mail queue
Be able to view the mail queue to determine if any mail is stuck in the queue, and if necessary, ask the MTA to reprocess or flush the queue.
As noted in section Determine which MTA is being used on the system, the BSD systems use Sendmail or Postfix by default for handling mail.
The mail queue can be displayed using the mailq(1) utility. The queue listing identifies messages that are still queued (not successfully sent or delivered yet). The output includes MTA's internal message identifier, the size of the message, the date and time the message was accepted into the queue, the sender's envelope address, and the recipient address(es), as well as a reason of failure for messages that have permanently failed.
When using Postfix, if the mailq(1) utility is not setup, use
Following are two examples of mailq(1) output. First when used with Sendmail:
And an example when used with Postfix: