home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

24.6 Option Argument Types

The second column of Table 24-4 shows the type of the argument for each option. The allowable types are the following:

Boolean

A Boolean-type argument can have only one of two possible values: true or false. If the Boolean argument is present, its first letter is compared to the four letters T, t, Y, and y. If that first letter matches any of those four, the option is set to true; otherwise, it is set to false. If a Boolean argument is absent, the option defaults to true. For example:

O HoldExpensive          Boolean absent, option is set to true.
O HoldExpensive=True     Boolean=`T'rue, option is set to true.
O HoldExpensive=False    Boolean=`F'alse, option is set tofalse.
Character

A character type is a single ASCII character. Options that take a single character as an argument can also take a whole word or sentence, but in that instance, only the first character is recognized:

O DeliveryMode=b         b for background mode
O DeliveryMode=background    same

The argument is case-sensitive—that is, the character b is considered to be different from the character B:

O DeliveryMode=b         b for background mode
O DeliveryMode=B         meaningless
Numeric

A numeric type is an ASCII representation of an integer value. It can be positive, zero, or negative. The base is determined after any leading sign is handled. A leading 0 causes the octal base to be used. A leading 0x or 0X causes the hexadecimal base to be used. Decimal is best to use for options such as the hop count (option MaxHopCount):

O MaxHopCount=15         decimal for hop count
String

A string type is a line of ASCII text. A string is all text from the single-character option name up to the end of the line. If the following line is a continuation line (one that begins with a tab or a space), it is joined (appended) to the string. Prior to V8, the maximum length of a string was defined by MAXLINE in conf.h. Beginning with V8 sendmail, strings can be of virtually unlimited length. If the string is quoted, the quotation marks are not stripped by sendmail:

O AliasFile=/etc/mail/aliases           location of the aliases file
O AliasFile="/etc/mail/aliases"         bad, quotes are retained

The string is considered to begin at the first nonspace character following the = character of a multicharacter option declaration:

O AliasFile =  /etc/mail/aliases
                
               from here
Octal

An octal type is like the numeric type discussed earlier but is always interpreted as an octal (base 8) number even if the leading zero is absent. This type is specially designed for file permissions:

O TempFileMode=0600      octal for file permissions
O TempFileMode=600       octal even without the leading zero
Time

A time type is the expression of a period of time. Time is expressed as a number modified by a trailing letter. The recognized letters (shown in Table 24-5) determine what the number means. For example, 24h means 24 hours, and 15m means 15 minutes.

Table 24-5. Option time argument units

Letter

Units

s

Seconds

m

Minutes

h

Hours

d

Days

w

Weeks

Times can be mixed; for example, 1h30m means 1 hour and 30 minutes. If the letter modifier is missing, pre-V8 versions of sendmail default the time to days:

Or2h                    SMTP timeout is 2 hours
OT2                     life in queue is 2 days

V8 sendmail uses different default units depending on the specific option. For consistent results, always include the units for all versions of sendmail.

Prior to V8.7, unrecognized unit characters (such as j when you really meant h) would silently default to days. Beginning with V8.7, unrecognized unit characters cause sendmail to print the following error and default the units to those specified by the particular option:

Invalid time unit `character'
    Previous Section Next Section