-v

Run in verbose mode All versions

The -v command-line switch tells sendmail to run in verbose mode. In that mode, sendmail prints a blow-by-blow description of all the steps it takes in delivering a mail message.

After the sendmail.cf file is parsed and after the command-line arguments have been processed, sendmail checks to see whether it is in verbose mode. If it is, it sets the HoldExpensive option (HoldExpensive on page 1036) to false and sets the DeliveryMode option to interactive (DeliveryMode=interactive on page 1006).

The -v switch is most useful for watching SMTP mail being sent and for producing expanded output when viewing the queue.

The modified -v verbose switch with the MSP

Since V8.12, sendmail has run as non-set-user-id root. One problem with this scheme is that only the connection between the MSP sendmail and the local listening daemon is viewable when using the -v command-line switch. This restriction made it difficult to diagnose certain sending problems in the traditional manner.

Beginning with V8.13, the -v command-line switch causes the MSP sendmail to send the SMTP VERB (verbose) command to the local listening daemon. This causes the local listening daemon to print (as part of its SMTP replies) each step of what it is doing to send the message out over the Internet.

In the following examples, we first show a verbose run with V8.12 sendmail:

% /usr/sbin/sendmail -v you@someother.site < /dev/null you@someother.site... Connecting to localhost via relay... 220 your.site ...

Get sendmail, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.