Chapter 15. The sendmail Command Line

The initial behavior of sendmail is determined largely by the command line used to invoke it. The command line can, for example, cause sendmail to use a different configuration file or to rebuild the aliases file rather than deliver mail. The command line can be typed at your keyboard, executed from a boot-time script, or even executed by an MUA when sending mail.

What’s New with V8.13

V8.13 sendmail introduced five new command-line switches and modified the way one existing command-line switch worked. Of these, the first is covered in this chapter and the last four are covered in Chapter 11 and Chapter 16.

The Modified -v Verbose Switch with the MSP

Since V8.12, sendmail has run as non-set-user-id root (10.1[3ed]). 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 show a verbose run with V8.12 sendmail:

% /usr/sbin/sendmail -v [email protected] < /dev/null
[email protected]... Connecting to localhost via relay...
220 your.site ESMTP Sendmail 8.12.9/8.12.9; Sun, 7 Sep 2003 15:48:23 -0600 (MDT)
>>> EHLO your.site
250-your.site Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<[email protected]>
250 2.1.0 <[email protected]>... Sender ok
>>> RCPT To:<[email protected]>
250 2.1.5 <[email protected]>... Recipient ok
>>> DATA
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 h87LmN09001068 Message accepted for delivery
[email protected]... Sent (h87LmN09001068 Message accepted for delivery)
Closing connection to localhost
>>> QUIT
221 2.0.0 your.site closing connection

Note that under V8.12 all you could see was the conversation between the MSP sendmail and the local listening daemon. But beginning with V8.13, the -v command-line switch causes additional information to be printed by the listening daemon. That additional information is shown below, where each additional line is prefixed with a 050 SMTP reply code.

050 <[email protected]>... Connecting to someother.site. via esmtp...
050 220 someother.site ESMTP Sendmail 8.13.0/8.13.0; 
     Sun, 7 Sep 2003 15:55:35 -0600 (MDT)
050 >>> EHLO your.site
050 250-someother.site Hello your.site [192.168.5.12], pleased to meet you
050 250-ENHANCEDSTATUSCODES
050 250-PIPELINING
050 250-8BITMIME
050 250-SIZE
050 250-DSN
050 250-ETRN
050 250-DELIVERBY
050 250 HELP
050 >>> MAIL From:<[email protected]> SIZE=294
050 250 2.1.0 <[email protected]>... Sender ok
050 >>> RCPT To:<[email protected]>
050 >>> DATA
050 250 2.1.5 <[email protected]>... Recipient ok
050 354 Enter mail, end with "." on a line by itself
050 >>> .
050 250 2.0.0 h87LtZ9j053249 Message accepted for delivery
050 <[email protected]>... Sent (h87LtZ9j053249 Message accepted for delivery)

The -v command-line switch will only put the local listening daemon into verbose mode if the configuration file for that daemon omits both the noverb (24.9.80.10[3ed]) and goaway (24.9.80.2[3ed]) PrivacyOptions option’s settings.

define('confPRIVACY_FLAGS','noverb')     
                
               omit this
define('confPRIVACY_FLAGS','goaway')     
                
               omit this

If either option is declared, the local listening daemon will not go into verbose mode, and no additional information will print.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.105.194