From the Command Line
The -q
command-line
switch, invoked without a time interval argument, is
used to run sendmail in
queue-processing mode. In this mode,
sendmail processes queues
once and then exits. This mode can be run
interactively from the command line or in the
background via cron(8).
Other command-line switches can be combined with
-q
to refine
the way queues are processed. The -v
(verbose) switch
causes sendmail to print
information about each message it is processing, and
to process multiple queues sequentially. The
-d
(debugging)
switch can be used to produce additional information
about the queue. We’ll discuss the -v
switch as it applies
to the queue later in this chapter. Those -d
debugging switches
appropriate to the queue can be found in Table 15-3 on page
536.
V8 sendmail allows variations on
-q
: -qI
allows you to
specify a specific message identifier for
processing; -qR
allows you to specify specific recipient addresses
for processing; and -qS
allows you to specify specific
sender addresses for processing.[189]
Process the queue once: -q
The -q
command-line switch, without an interval argument,
tells sendmail to process the
queue once, and then exit. As such, this switch is
a handy administrative tool. When the queue fills
unexpectedly between queue runs of the daemon, for
example, the -q
command-line switch can be used to force an
immediate queue run:
# /usr/sbin/sendmail -q
When multiple queues are run this way, they are all processed in parallel (Processing multiple ...
Get sendmail, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.