.\" BSDI $Id: checksendmail.8,v 1.1.1.1 1994/01/13 21:15:31 polk Exp $ .Dd November 14, 2000 .Dt CHECKSENDMAIL 8 .Os .Sh NAME .Nm checksendmail .Nd verify sendmail address transformations. .Sh SYNOPSIS .Nm checksendmail .Op Fl a .Op Fl d .Op Fl b .Op Fl C Ar file.cf .Op Fl b Ar sendmail_binary .Op Fl l Ar log_file .Op Fl r Ar resolve .Op Fl T Ar test.address .Sh DESCRIPTION .Pp The .Nm checksendmail program is a .Xr perl script that aids the testing of .\".Xr sendmail 8 's sendmail(8)'s various configuration files. .Nm checksendmail passes typical addresses (supplied in input files) through .Xr sendmail and prints the results of the resolution and transformation routines. .Pp The input files contain a list of addresses, one per line. For example: .Bd -literal -offset indent user user@site user@site.com .Ed .Pp The input file can contain comments started with a .Em # and blank lines. .Sh OPTIONS .Pp .Bl -tag -width Fl -compact -offset left .It Fl a Show aliasing of local addresses in mail address resolution phase of testing .It Fl d Precede each address translation line with ruleset sequence summary .It Fl C Ar file.cf Use the .Xr sendmail configuration file .Ar file.cf instead of the default .Pa /etc/sendmail.cf file. .It Fl b Ar sendmail_binary Use the specified .Ar sendmail_binary as the path to invoke sendmail (instead of .Pa /usr/sbin/sendmail ) . .It Fl l Ar log_file Log .Xr sendmail address test mode debugging output to .Ar log_file .It Fl r Ar resolve Use .Ar resolve as the input file for the addresses to be used for mail resolving. Defaults to .Ar address.resolve . .It Fl T Ar test.address Use .Ar test.address as the single address to test. Cannot be used in conjunction with file setting flags. .El .Sh EXAMPLES .Pp The following command will pass the addresses in .Ar address.resolve through .Xr sendmail using the configuration information in .Ar myconfig.cf . .Bd -literal -offset left example% cat address.resolve user user@site user@site.com example% checksendmail \-C myconfig.cf system: myhost.gadget.com current dir: /tmp/Checksendmail resolve file: address.resolve sendmail binary: /usr/sbin/sendmail sendmail version: 8.9.3 config file: /etc/sendmail.cf config file version: V8/Berkeley Mail address resolution user --(ether )--> user[rmtc] user@site --(ether )--> user@site[rmtc] user@site.com --(ether )--> user@site.com[rmtc] `To' address transformations for mailer ether: user ----> user user@site ----> user@site user@site.com ----> user@site.com `From' address transformations for mailer ether: user ----> user user@site ----> user user@site.com ----> user .Ed .Pp The first section of the output shows how the addresses in the input files are resolved by .Xr sendmail 8 . Consider the following output line: .Pp .Dl "user@site.com --(ether )--> user@site.com[rmtc]" .Pp The input address .Em user@site.com resolves to use the .Em ether mailer. That mailer is directed to send the mail to to the user .Em user@site.com at site .Em rmtc (as indicated in the square brackets). .Pp The two later sections of output show how the addresses specified as the .Em To and .Em From address are transformed in the text of the headers. In the example above, the .Em To addresses are untouched. The .Em From addresses, however, all lose their machine information on the way through the mailer: .Pp .Dl "user@site ----> user" .Pp This may be desirable when using a configuration file on a workstation which is to be hidden as a mailhost from the rest of the network. .Pp The following is a set of addresses used at one site for the purposes of testing address resolution. Comments after the addresses detail why particular addresses are present: .Bl -tag -width "user@machine.com" -compact -offset indent .It user Standard trivial address .It user@rmtc qualified at one level .It user@rmtc.central qualified at two levels .It user@rmtc.central.sun.com qualified all the way .It rmtc!user local but specified as uucp .It user@summit a workstation (normally delivered locally, though) .It user@summit.central same but more qualified .It user@summit.central.sun.com same but fully qualified .It summit!user same but specified as uucp .It user@prisma Backward compatibility tests .It user@prisma.com .It prisma!user .It user@central Superior domain testing .It user@machine.central more qualified, but unknown .It user@summit.central more qualified and known .It user@eng name in faraway domain .It user@machine.eng unknown machine in faraway domain .It user@summit.eng local machine, far away domain .It user@hoback far away machine .It user@machine apparently local but unknown machine .It user@sun.com Standard trivial address .It user@machine.dom.sun.com fully qualified but unknown machine .It user@foo.com standard, known, really far away domain .It user@foo.dom standard, unknown, really far away domain .It site!user Single level uucp .It site1!site2!user Double level uucp .It user@foo.dom@bar.dom Trickier address .It site!user@foo.dom Mixed uucp/domain .It site!user@uunet.uu.net Mixed double uucp/domain .El .Sh NOTES Note that .Nm checksendmail is a .Xr perl script. If your site does not have .Xr perl 1 , it can be obtained via anonymous .Xr ftp from .Em ftp.uu.net . .Pp .Xr sendmail requires that the user have access to directory specified by the .Em OQ parameter in the configuration file (normally .Pa /usr/spool/mqueue ) . .Nm checksendmail verifies that the user has access to this directory before allowing the test to continue. .Sh AUTHORS .Bd -literal Gene Kim Rob Kolstad Jeff Polk .Ed .Pp Modified by Robert Harker .Sh "SEE ALSO" .Xr sendmail 8