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


sendmail

sendmailSearch this book
Previous: 11.4 Rule Set Hubset Chapter 11
Rule Sets 1 and S=
Next: 11.6 Handling user@thishost
 

11.5 Testing So Far

If you haven't already done so, add the new macro and the new rule set to the client.cf file:

# Defined macros
D{REMOTE}mailhost              # The name of the mail hub


D{HUB}mail.us.edu              # Hub as known to the outside world    


<- new

Remember to replace mail.us.edu with a real hostname - the name of the hub machine at your site.

The new rule set looks like this:

SHubset # Rewrite the sender for the hub


R$-                          $@ $1@${HUB}   user -> user@hub    


<- new

Now test the new rule by running sendmail in rule-testing mode:

% 

./sendmail -Cclient.cf -bt


ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
>

At the prompt, specify rule set 3 first because all addresses are preprocessed by that rule. Then specify Hubset , because the hub delivery agent definition specifies that rule in its S= equate.

> 

3,Hubset you

Following the list of rule sets, give the sender's name. Remember that the lone login name will be rewritten to appear as though it is from the hub. The output produced by sendmail looks like this:

rewrite: ruleset  3   input: you
rewrite: ruleset  3 returns: you
rewrite: ruleset 199   input: you
rewrite: ruleset 199 returns: you @ mail . us . edu

Note that V8 sendmail internally changed the name Hubset into the number 199.


Previous: 11.4 Rule Set Hubset sendmail Next: 11.6 Handling user@thishost
11.4 Rule Set Hubset Book Index 11.6 Handling user@thishost