🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.sendmail
Article #3166

localhost!user

#3166
From: Greg Woods
Date: Wed, 08 Feb 1989 21:12
29 lines
1826 bytes
I used to have a list of all our local hosts within the sendmail.cf file. I
have recently redone the cf file to eliminate this, as it was becoming a real
hassle to keep this list up to date, with the proliferation of single-user
hosts (like Sun workstations) around here. So, I changed the cf file to
simply assume that all unqualified host references are local. Along the lines 
of

R$+@$-	$1@$2.$D

Everything works, with one exception: there doesn't seem to be any way
to look at an address of the form host!user and determine whether or not
the host is local. Formerly I could just check the host against the list
of local hosts, but I can't do that any more. Ideally I'd like to use the
name server to do this, but the exact way to make it work eludes me. I am
trying things like

$-!$-	$[$1.$]!$2

and then checking to see if the trailing period disappears indicating a match.
On a Sun 4/280 running Sun OS SYS4-3.2 with a hacked sendmail 5.58, this
works as expected, but on another Sun 4/280 running Sun OS 4.0.1 and sendmail
5.59 (I can't get 5.59 to compile on the SYS 4-3.2 machine) the name server
queries fail. Turning on debugging shows that res_search fails, errno=0,
and h_errno=4 (NO_DATA of requested type; the query is for a CNAME).
THe question is: is there any way to determine, from inside the cf file,
given a single token, whether or not it corresponds to a local host name?
(Using 5.59 on the Sun 4/280, Sun OS 4.0.1)

--Greg
Technical Details
Message-ID: <1377@ncar.ucar.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!woods

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!woods
From: woods@ncar.ucar.edu (Greg Woods)
Newsgroups: comp.mail.sendmail
Subject: localhost!user
Message-ID: <1377@ncar.ucar.edu>
Date: 8 Feb 89 21:12:28 GMT
Reply-To: woods@ncar.UCAR.EDU (Greg Woods)
Organization: Scientific Computing Division/NCAR, Boulder CO
Lines: 29