Sendmail Installation and Operation Guide
SMM:08-25
-d12
Set category 12 to level 1
-d12.3
Set category 12 to level 3
-d3-17
Set categories 3 through 17 to level 1
-d3-17.4
Set categories 3 through 17 to level 4
-dANSI
Set category ANSI to level 1
-dsm_trace_*.3
Set all named categories matching sm_trace_* to level 3
For a complete list of the available debug flags you will have to look at the code and the TRACE-
FLAGS file in the sendmail distribution (they are too dynamic to keep this document up to date).
For a list of named debug categories in the sendmail binary, use
ident /usr/sbin/sendmail | grep Debug
3.5. Changing the Values of Options
Options can be overridden using the -o or -O command line flags. For example,
/usr/sbin/sendmail -oT2m
sets the T (timeout) option to two minutes for this run only; the equivalent line using the long option
name is
/usr/sbin/sendmail -OTimeout.queuereturn=2m
Some options have security implications. Sendmail allows you to set these, but relinquishes
its set-user-ID or set-group-ID permissions thereafter
12
.
3.6. Trying a Different Configuration File
An alternative configuration file can be specified using the -C flag; for example,
/usr/sbin/sendmail -Ctest.cf -oQ/tmp/mqueue
uses the configuration file test.cf instead of the default /etc/mail/sendmail.cf. If the -C flag has no
value it defaults to sendmail.cf in the current directory.
Sendmail gives up set-user-ID root permissions (if it has been installed set-user-ID root) when
you use this flag, so it is common to use a publicly writable directory (such as /tmp) as the queue
directory (QueueDirectory or Q option) while testing.
3.7. Logging Traffic
Many SMTP implementations do not fully implement the protocol. For example, some per-
sonal computer based SMTPs do not understand continuation lines in reply codes. These can be
very hard to trace. If you suspect such a problem, you can set traffic logging using the -X flag. For
example,
/usr/sbin/sendmail -X /tmp/traffic -bd
will log all traffic in the file /tmp/traffic.
This logs a lot of data very quickly and should NEVER be used during normal operations.
After starting up such a daemon, force the errant implementation to send a message to your host.
All message traffic in and out of sendmail, including the incoming SMTP traffic, will be logged in
this file.
12
That is, it sets its effective uid to the real uid; thus, if you are executing as root, as from root's crontab file or during system
startup the root permissions will still be honored.