Книга: Linux Network Administrator Guide, Second Edition
Managing the Mail Spool
Managing the Mail Spool
Mail is queued in the /var/spool/mqueue directory before being transmitted. This directory is called the mail spool. The sendmail program provides a means of displaying a formatted list of all spooled mail messages and their status.
The /usr/bin/mailq command is a symbolic link to the sendmail executable and behaves indentically to:
#
sendmail -bp
The output displays the message ID, its size, the time it was placed in the queue, who sent it, and a message indicating its current status. The following example shows a mail message stuck in the queue with a problem:
$ mailq
Mail Queue (1 request)
--Q-ID-- --Size-- -----Q-Time----- ------------Sender/Recipient------------
RAA00275 124 Wed Dec 9 17:47 root
(host map: lookup (tao.linux.org.au): deferred)
[email protected]
This message is still in the mail queue because the destination host IP address could not be resolved.
We can force sendmail to process the queue now by issuing the /usr/bin/runq command.
The runq command produces no output. sendmail will begin processing the mail queue in the background.
- 4.4.4 The Dispatcher
- About the author
- Chapter 7. The state machine
- Appendix E. Other resources and links
- Example NAT machine in theory
- The final stage of our NAT machine
- Compiling the user-land applications
- The conntrack entries
- Untracked connections and the raw table
- Basics of the iptables command
- Other debugging tools
- Setting up user specified chains in the filter table