CHECKSENDMAIL(8)
π CHECKSENDMAIL π β that's section 8 of the System Manager's Manual, bestie
okay so before we even start: this is checksendmail, and it lives in the system manager's manual (section 8, the big-kid admin section, periodt).
β¨ NAME β¨
checksendmail β verify sendmail address transformations π
πΈ SYNOPSIS πΈ
checksendmail [-a] [-d] [-b] [-C file.cf] [-b sendmail_binary]
[-l log_file] [-r resolve] [-T test.address]
π¦ DESCRIPTION π¦
So checksendmail is a perl script, and what it does is it helps you test out all the various configuration files that sendmail(8) uses. It literally just takes typical addresses (the ones you put in your input files) and passes them through sendmail, then prints out the results of the resolution and transformation routines. It's giving β¨quality assuranceβ¨.
Your input files are just a list of addresses, one per line. Like, for example:
user
user@site
user@site.com
And yes bestie, the input file can also have comments β those start with a # β plus blank lines. Go off. π
π OPTIONS π
-aβ show aliasing of local addresses in the mail address resolution phase of testing π-dβ precede each address translation line with a ruleset sequence summary π§Ύ-C file.cfβ use the sendmail configuration filefile.cfinstead of the default/etc/sendmail.cffile π§-b sendmail_binaryβ use the specifiedsendmail_binaryas the path to invokesendmail(instead of/usr/sbin/sendmail) π οΈ-l log_fileβ log sendmail address test mode debugging output tolog_fileπ-r resolveβ useresolveas the input file for the addresses to be used for mail resolving. Defaults toaddress.resolveπ-T test.addressβ usetest.addressas the single address to test. Cannot be used in conjunction with file setting flags. π«
π EXAMPLES π
okay so this command right here is gonna pass the addresses in address.resolve through sendmail using the config info from myconfig.cf. slay:
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
The first section of that output is showing you how the addresses in the input files get resolved by sendmail(8). So look at this line, bestie:
user@site.com --(ether )--> user@site.com[rmtc]
The input address user@site.com resolves to use the ether mailer. And that mailer is directed to send the mail to the user user@site.com at site rmtc β that's what's chillin' in the square brackets. π¬
The two later sections of output show how the addresses specified as the To and From address get transformed in the text of the headers. In the example above, the To addresses are untouched. The From addresses though? every single one of them loses their machine information on the way through the mailer:
user@site ----> user
And honestly? That may be desirable when you're using a configuration file on a workstation that's meant to be hidden as a mailhost from the rest of the network. sneaky. π
The following is a set of addresses used at one site for the purposes of testing address resolution. The comments after the addresses detail why each particular address is present:
user Standard trivial address
user@rmtc qualified at one level
user@rmtc.central
qualified at two levels
user@rmtc.central.sun.com
qualified all the way
rmtc!user local but specified as uucp
user@summit a workstation (normally delivered locally,
though)
user@summit.central
same but more qualified
user@summit.central.sun.com
same but fully qualified
summit!user same but specified as uucp
user@prisma Backward compatibility tests
user@prisma.com
prisma!user
user@central Superior domain testing
user@machine.central
more qualified, but unknown
user@summit.central
more qualified and known
user@eng name in faraway domain
user@machine.eng unknown machine in faraway domain
user@summit.eng local machine, far away domain
user@hoback far away machine
user@machine apparently local but unknown machine
user@sun.com Standard trivial address
user@machine.dom.sun.com
fully qualified but unknown machine
user@foo.com standard, known, really far away domain
user@foo.dom standard, unknown, really far away domain
site!user Single level uucp
site1!site2!user Double level uucp
user@foo.dom@bar.dom
Trickier address
site!user@foo.dom
Mixed uucp/domain
site!user@uunet.uu.net
Mixed double uucp/domain
π NOTES π
Note thatchecksendmailis a perl script. If your site does not haveperl(1), it can be obtained via anonymous ftp fromftp.uu.net. π‘
sendmail requires that the user have access to the directory specified by the OQ parameter in the configuration file (normally /usr/spool/mqueue). And checksendmail verifies that the user has access to this directory before allowing the test to continue. No access, no test, that's the vibe check. π₯
π AUTHORS π
- Gene Kim
- Rob Kolstad
- Jeff Polk
Modified by Robert Harker
π SEE ALSO π
and that's the whole page, bestie!! π this one shipped with Debian, dated November 14, 2000 β so yeah, vintage, but still iconic. now go test those addresses, you absolute legend π«Άβ¨
π¦ where this page comes from
- debian bookworm: sendmail-base 8.17.1.9-2+deb12u2 Β· other-Sendmail
- debian trixie: sendmail-base 8.18.1-6 Β· other-Sendmail
- ubuntu jammy: sendmail-base 8.15.2-22ubuntu3 Β· other-Sendmail
- ubuntu noble: sendmail-base 8.18.1-2 Β· other-Sendmail
- ubuntu questing: sendmail-base 8.18.1-6
- ubuntu resolute: sendmail-base 8.18.2-1 Β· other-Sendmail
- ubuntu stonking: sendmail-base 8.18.2-2build1 Β· other-Sendmail
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms