SMM:08-24
Sendmail Installation and Operation Guide
configuration file has to be re-read on every message that comes in. If you do this, you still need to
have a sendmail running to flush the queue:
/usr/sbin/sendmail -q30m
3.3. Forcing the Queue
In some cases you may find that the queue has gotten clogged for some reason. You can force
a queue run using the -q flag (with no value). It is entertaining to use the -v flag (verbose) when
this is done to watch what happens:
/usr/sbin/sendmail -q -v
You can also limit the jobs to those with a particular queue identifier, recipient, sender, quar-
antine reason, or queue group using one of the queue modifiers. For example, "-qRberkeley"
restricts the queue run to jobs that have the string "berkeley" somewhere in one of the recipient
addresses. Similarly, "-qSstring" limits the run to particular senders, "-qIstring" limits it to partic-
ular queue identifiers, and "-qQstring" limits it to particular quarantined reasons and only operated
on quarantined queue items, and "-qGstring" limits it to a particular queue group. The named
queue group will be run even if it is set to have 0 runners. You may also place an ! before the I or
R
or S or Q to indicate that jobs are limited to not including a particular queue identifier, recipient
or sender. For example, "-q!Rseattle" limits the queue run to jobs that do not have the string "seat-
tle" somewhere in one of the recipient addresses. Should you need to terminate the queue jobs cur-
rently active then a SIGTERM to the parent of the process (or processes) will cleanly stop the jobs.
3.4. Debugging
There are a fairly large number of debug flags built into sendmail. Each debug flag has a cat-
egory and a level. Higher levels increase the level of debugging activity; in most cases, this means
to print out more information. The convention is that levels greater than nine are "absurd," i.e., they
print out so much information that you wouldn't normally want to see them except for debugging
that particular piece of code.
You should never run a production sendmail server in debug mode. Many of the debug flags
will result in debug output being sent over the SMTP channel unless the option -D is used. This
will confuse many mail programs. However, for testing purposes, it can be useful when sending
mail manually via telnet to the port you are using while debugging.
A debug category is either an integer, like 42, or a name, like ANSI. You can specify a range
of numeric debug categories using the syntax 17-42. You can specify a set of named debug cate-
gories using a glob pattern like "sm_trace_*". At present, only "*" and "?" are supported in these
glob patterns.
Debug flags are set using the -d option; the syntax is:
debug-flag:
-d
debug-list
debug-list:
debug-option [ , debug-option ]*
debug-option:
debug-categories [ . debug-level ]
debug-categories: integer | integer - integer | category-pattern
category-pattern: [a-zA-Z_*?][a-zA-Z0-9_*?]*
debug-level: integer
where spaces are for reading ease only. For example,