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

sendmail

sendmailSearch this book
Previous: 16.3 Run m4 Chapter 16
The null.mc File and m4
Next: 16.5 Qualify All Addresses?
 

16.4 Test the Result

When you look at the resulting client.cf file, you will first notice some copyright notices and legalities from the University of California. These are in the form of comments and so are ignored by sendmail .

Next comes a series of comments that show the various pieces that went into the construction of this file. After these you get to the meat of the client.cf file beginning with the line

V7/Berkeley

Read through this client.cf file beginning here, and notice that it is far more complex than the one we developed earlier. For instance, it declares over 80 options (although most are commented out), whereas our first client.cf file declared only nine. It uses eight rule sets, where we used only three.

To test this new file you can use the command

% 

../../src/obj.*/sendmail -Cclient.cf -bt < list | grep ^mailer

The weird path for sendmail is needed because you are now in the cf/cf directory and the sendmail binary is back in the src directory. The list is the list of tests from the previous chapter. The output should look something like this:

mailer nullclient, host mail.us.edu, user user@here
mailer nullclient, host mail.us.edu, user user@here.us.edu
mailer nullclient, host mail.us.edu, user user@foo
mailer nullclient, host mail.us.edu, user here!user@mail.us.edu
mailer nullclient, host mail.us.edu, user user@mail.us.edu

Note that this new client.cf file added the name of the hub to the lone username in the last line, whereas our original client.cf did not. To see why this happened, first look for rule set 3 in this new client.cf file. It contains the line

R$+ @ $=w               $@ $1 @ $M                      ...@thishost

Next look in the original client.cf file. It contains a similar rule:

R$- @ $=w              $@ $1@${HUB}            user@local -> user@hub

But the original client.cf file put this rule in rule set Hubset . The new client.cf adds the hub's name to a lone username in rule set 3 that affects all addresses, while old client.cf file adds it in the S= rule set, which affects only sender addresses.











??????????????@Mail.ru