start page | rating of books | rating of authors | reviews | copyrights

sendmail

sendmailSearch this book
Previous: D.3 K Command's -d switch Appendix D
Sun Enhancements
Next: D.5 The > Option
 

D.4 L and G Configuration Commands

Sun's version of V8.7 sendmail uses the /etc/nsswitch.conf file to determine how it should resolve the hostname (the hosts: line), how it should look up aliases (the aliases: line), how it should look up user information (the passwd: and group: lines), and where it should look for its nonconfiguration file variable declarations (the sendmailvars: line):

hosts:          nisplus dns [NOTFOUND=return] files aliases:        files nisplus passwd:         files nisplus group:          files nisplus sendmailvars:   files nisplus               
<- note

When the sendmailvars: line indicates files , sendmail looks up variable declarations in the /etc/mail/sendmailvars file. When the sendmailvars: line indicates nisplus , sendmail looks up variable declarations using the NIS+ service that defaults to sendmailvars.org_dir . In the file form, the key is on the left and the value is on the right. In the NIS+ form, the key is looked up and the value is returned:

maildomain    uofa.edu othernames    uofa.edu here here.uofa.edu mailhub mailhub.uofa.edu      
-^
         
-^
    
key
      
value

Sun's version of V8.7 sendmail can handle two brand new (and exclusive to Sun) configuration commands. They are the L command (which you use to define a macro) and the G command (which you use to add values to a class). In both cases the value is read from external files or NIS+ maps.

Lmmaildomain Gwothernames

The first configuration line, the L , causes the key maildomain to be looked up either in the file /etc/mail/sendmailvars or in an NIS+ map. If the key is found, the value returned (in our case uofa.edu ) is assigned to the $m macro.

The second configuration line, the G , causes the key othernames to be looked up either in the file /etc/mail/sendmailvars or in an NIS+ map. If the key is found, the value returned (in our case the list of alternate hostnames) is appended to the $=w class.

In both forms of lookup, the key must match exactly. There is no form of wildcard lookup, nor is the search case-insensitive. If the key is not found, the configuration command is ignored. If the file or NIS+ service does not exist or if there is an error reading the file, the configuration command is silently ignored.

Be aware that the sendmailvars file should never be placed on an NFS mounted files system. If the server is down, your macro and class variables may silently fail to initialize.


Previous: D.3 K Command's -d switch sendmail Next: D.5 The > Option
D.3 K Command's -d switch Book Index D.5 The > Option