Verbose Mode (-v)
The -v
command-line switch
tells sendmail to run in
verbose mode. In that mode,
sendmail prints a
blow-by-blow[19] description of all the steps it takes in
delivering a mail message. To watch
sendmail run in verbose mode,
send mail to yourself as you did in Run sendmail by Hand on page 6, but this
time add a -v
switch:
%/usr/lib/sendmail -v
you<sendstuff
The output produced shows that sendmail delivers your mail locally:
you...
Connecting to local
.
..you...
Sent
When sendmail forwards mail to another
machine over a TCP/IP network, it communicates with that
other machine using the SMTP protocol. To see what SMTP
looks like, run sendmail again, but
this time, instead of using you
as the recipient, give sendmail your
address on another machine:
%/usr/lib/sendmail -v
you@remote.domain<sendstuff
The output produced by this command line will look similar to the following:
you@remote.domain... Connecting to remote.domain via smtp... 220 remote.Domain ESMTP Sendmail 8.14.1/8.14.1 ready at Fri, 14 Dec 2007 06:36:12 −080 0 >>> EHLO here.us.edu 250-remote.domain Hello here.us.edu [123.45.67.89], pleased to meet you 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-DELIVERBY 250 HELP >>> MAIL From:<you@here.us.edu> SIZE=4537 250 2.1.0 <you@here.us.edu> ... Sender ok >>> RCPT To:<you@remote.domain> 250 2.1.5 <you@remote.domain> ... Recipient ok >>> DATA 354 Enter mail, end with "." on a line by itself >>> . 250 2.0.0 d9L29Nj20475 Message accepted for delivery ...
Get sendmail, 4th Edition 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.