Книга: 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.

Оглавление книги


Генерация: 1.072. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз