From: harker@harker.com (Robert Harker)
Subject: Re: Perl Package to test Sendmail.cf?
Organization: Harker Systems, 1180 Hester Ave, San Jose, CA 95126
Date: Fri, 14 Aug 1992 00:24:50 GMT

The perl script you are looking for is called "checksendmail" written by
Gene Kim & Rob Kolstad & Jeff Polk and is available via anonymous FTP
from boulder.colorado.edu in /pub/sendmail/checksendmail.shar (path name
might be wrong).

check sendmail takes a list of addresses and first runs it through ruleset
zero to determine which mailer is chosen for each address and what host and
address gets passed to the specific mailer.  Then it passes all of the address
through ththe sender and recipient rule sets for each mailer.  It then
prints the results in a nice format.


In article <1992Aug12.155740.17492@decuac.dec.com> avolio@dco.DEC.COM (Frederick M. Avolio) writes:
>
>Why is this better or different than testing sendmail using sendmail?
>

checksendmail is a wonderfull program for checking a series of addresses.

sendmail -bt is very useful for debugging a specific rule or a specific
address that is broken because it shows you all of the steps the address
rewrite goes through.

checksendmail is better to test a range of your known addresses and
address types (formats).  It tells you if all of the rules are doing
the right thing as a whole.  Sample output is attached

One way I use it is to check that a new rewriting rule does not break
other addresses in unexpected way.  I have the output before the new rule
and the output after the new rule and I diff them to see what changes

Hope this helps
Thanks in advance
RLH

Robert Harker
Harker Systems				Sun Sysadmin Consulting
harker@harker.com			1180 Hester Ave
apple!motcsd!harker!harker		San Jose, CA 95126
{netcom,uunet}!harker!harker		408-295-9432


Here is an example checksendmail address file:
	# Dumb UUCP neighbor addresses should be forwarded to our UUCP neighbor
	# as bang style addresses
	dumbo!user
	user@dumbo.uucp
	# domain style addresses should be forwarded to our smart UUCP neighbor
	# as domain style addresses
	netcom!user
	user@netcom.uucp
	user@netcom
	netcom!uucphost!user
	# All other addresses should be forwarded to smart UUCP neighbor
	# unchanged
	uucphost!user
	user@anything.dom

Here is the checksendmail output:
	Mail address resolution
	(ruleset zero, which mailer and what address gets passed)
	dumbo!user                  --(dumbuu)-->  user[dumbo]
	user@dumbo.uucp             --(dumbuu)-->  user[dumbo]
	netcom!user                 --(smartu)-->  user[netcom]
	user@netcom.uucp            --(smartu)-->  user[netcom]
	user@netcom                 --(smartu)-->  user[netcom]
	netcom!uucphost!user        --(smartu)-->  uucphost!user[netcom]
	uucphost!user               --(smartu)-->  user@uucphost.uucp[uunet]
	user@anything.dom           --(smartu)-->  user<@anything.dom>[uunet]

	`To' address transformations for mailer smartuucp:
	dumbo!user                  ---->  user@dumbo.uucp
	user@dumbo.uucp             ---->  user@dumbo.uucp
	netcom!user                 ---->  user@netcom.uucp
	user@netcom.uucp            ---->  user@netcom.uucp
	user@netcom                 ---->  user@netcom
	netcom!uucphost!user        ---->  uucphost!user@netcom.uucp
	uucphost!user               ---->  user@uucphost.uucp
	user@anything.dom           ---->  user@anything.dom

	`To' address transformations for mailer dumbuucp:
	dumbo!user                  ---->  dumbo!user
	user@dumbo.uucp             ---->  dumbo!user
	netcom!user                 ---->  netcom!user
	user@netcom.uucp            ---->  netcom!user
	user@netcom                 ---->  netcom!user
	netcom!uucphost!user        ---->  netcom!uucphost!user
	uucphost!user               ---->  uucphost!user
	user@anything.dom           ---->  anything.dom!user

	`From' address transformations for mailer smartuucp:
	dumbo!user                  ---->  user@dumbo.uucp
	user@dumbo.uucp             ---->  user@dumbo.uucp
	netcom!user                 ---->  user@netcom.uucp
	user@netcom.uucp            ---->  user@netcom.uucp
	user@netcom                 ---->  user@netcom
	netcom!uucphost!user        ---->  uucphost!user@netcom.uucp
	uucphost!user               ---->  user@uucphost.uucp
	user@anything.dom           ---->  user@anything.dom

	`From' address transformations for mailer dumbuucp:
	dumbo!user                  ---->  widget!dumbo!user
	user@dumbo.uucp             ---->  widget!dumbo!user
	netcom!user                 ---->  widget!netcom!user
	user@netcom.uucp            ---->  widget!netcom!user
	user@netcom                 ---->  widget!netcom!user
	netcom!uucphost!user        ---->  widget!netcom!uucphost!user
	uucphost!user               ---->  widget!uucphost!user
	user@anything.dom           ---->  widget!anything.dom!user