All rights reserved.
22.1 Class Configuration Commands | 859
After each line of text is read from the file and filtered with the scanf(3) pattern, it is
further subdivided by sendmail into individual words. That subdividing uses
whitespace (as defined by the C-language isspace(3) routine) to separate words. Each
separate word is then appended as an individual element to the class array.
Consider the contents of the following file named /etc/mail/localhosts:
server1 server2 # my two nets
uuhost # my uucp alias
#mailhost # mail server alias (retired 06,23,91)
This file contains three hostname aliases to be added to a class??”say, H. The following
configuration command does just that:
FH /etc/mail/localhosts %[^#]
The pattern %[^#] causes scanf(3) to read all characters in each line up to, but not
including, the first # character. The first line includes two whitespace-delimited
words that are appended to the class H. The second line contains one word, and the
third contains none.
22.1.3 Class via Database-Map Lookups
Beginning withV8.12, you can declare class values by specifying and using database
maps. Database maps are described in Chapter 23 on page 878. In its simplest form,
such a declaration looks like this:
FXkey@ type:detail
F{Name}key@ type:detail
Eachsuchdeclaration begins withth e F configuration command, which is immediately
followed (with no intervening space) by the name of the class that will be filled
with values.
Pages:
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516