Upcoming Events

Cloud Connect
Santa Clara
Feb 13-16, 2012

Cloud Connect brings together the entire cloud eco-system to better understand the transformation we're experiencing and promises to be the defining event of the cloud computing industry. Learn about the latest cloud technologies and platforms from thought leaders in Cloud Connect’s comprehensive conference.

Register Now!

More Events »

Subscribe to Newsletter

  • Keep up with all of the latest news and analysis on the fast-moving IT industry with Network Computing newsletters.
Sign Up


Explosion in a Punctuation Factory: Listings

Listing 1. A minimal Sendmail configuration file is required to test rules.

A. Here's x.cf, a minimal, do-nothing configuration file:

Mlocal, A=X, P=X
Mprog,  A=X, P=X
Do.:%@!^=/[]

B. Run version 8 Sendmail in rule-testing mode:

% /usr/lib/sendmail -oQ/tmp -Cx.cf -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 0 bob@here
rewrite: ruleset  0   input: "bob" "@" "here"
rewrite: ruleset  0 returns: "bob" "@" "here"
> [Control-D]
% []

Listing 2. This example creates a ``demo'' rule set that illustrates a few introductory concepts about rules.

A. Your first ``demo'' rule:

Mlocal, A=X, P=X
Mprog,  A=X, P=X
Do.:%@!^=/[]
S0
Rleft.side     new.stuff      this is a comment

B. Run version 8 Sendmail in rule-testing mode and enter an address.

% /usr/lib/sendmail -oQ/tmp -Cx.cf -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 0 bob@here
rewrite: ruleset  0   input: "bob" "@" "here"
rewrite: ruleset  0 returns: "bob" "@" "here"
> []

C. Workspace does match the left-hand side:

> 0 left.side
rewrite: ruleset  0   input: left . side
rewrite: ruleset  0 returns: new . stuff
> []

Listing 3. Three new ``demo'' rules.

S0
Rx     y
Ry     z
Rz     a

Listing 4. Four new ``demo'' rules.

Mlocal, A=X, P=X
Mprog,  A=X, P=X
Do.:%@!^=/[]
S0
R@         $@one
R@$+       $@two
R$+@$+     $@three
R$+        $@four
Print This Page


e-mail Send as e-mail

Research and Reports

Hypervisor Derby
August 2011

Network Computing: August 2011

TechWeb Careers