5.2 Debugging

So far, we haven't yet discussed debugging problems and required references. The finest single reference for sendmail is what is commonly referred to as the “bat” book which was written by Bryan Costales and Eric Allman. The “bat” book is called this because the publisher (O'Reilly) chose to put a picture of a bat, hanging upside down, on the cover. The book is an essential and highly recommended item if you're serious about administering sendmail. We're mentioning this book first because the commands used for debugging sendmail are included in voluminous detail in chapters 36 and 37 of the book. We will cover a few of the most commonly used ones here.

   sendmail -d0.1 - used to determine the version of sendmail you are running
   sendmail -d0.4 - used to determine what sendmail believes your hostname and aliases are
   sendmail -d0.15 - used to display the list of delivery agents available to sendmail (e.g. local = procmail)
   sendmail -d27.9 - used to show uid/gid changes when using :include: files
   sendmail -d38.2 - used to show map file opens and failures (e.g. access, virtusertable, mailertable etc.)
   sendmail -d48.2 - used to trace calls to the check_rule sets
   sendmail -d60.1 - used to trace map lookups inside rewrite() (e.g. genericstable)