Chapter 16. Debug sendmail with -d
The -d
command-line switch allows you
to observe
sendmail’s inner workings in
detail. But note that
sendmail’s various debugging
switches differ from vendor to vendor and from version to version.
This chapter is specific to V8.13 sendmail.
These switches are perhaps best used with a copy of the
sendmail source by your side.
Also note that many of the internal details shown here will change as sendmail continues to evolve and improve.
What’s New with V8.13
Although there are no additional, useful debugging switch settings in V8.13, there is one new debugging command-line switch described next.
The New -D Debug File Switch
The -D
command-line switch is used
to redirect
sendmail’s debugging output
(16.1[3ed]) into a file for later
examination. It is used as in the following example, where
file
is the name of an existing or new
file:
-D file
The -D
command-line switch (if used) must precede
the -d
switch on the same command-line, otherwise
the following error will print, and all debugging output will be
printed to the standard output (possibly causing you to miss seeing
the error):
-D file must be before -d
The file
specified with
-D
must live in a directory that is writable by
the user running sendmail
. If the file does not
exist, it will be created. If the file already exists, it will be
silently appended to.
Extra care must be exercised when using the -D
command-line switch as root because the target file will be appended to, even if it is a symbolic link ...
Get sendmail 8.13 Companion 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.