sendmailSearch this book
Previous: 16.3 Run m4Chapter 16
The File and m4
Next: 16.5 Qualify All Addresses?

16.4 Test the Result

When you look at the resulting 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 file beginning with the line


Read through this 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 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 -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, user user@here
mailer nullclient, host, user
mailer nullclient, host, user user@foo
mailer nullclient, host, user here!
mailer nullclient, host, user

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

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

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

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

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

Previous: 16.3 Run m4sendmailNext: 16.5 Qualify All Addresses?
16.3 Run m4Book Index16.5 Qualify All Addresses?