[comp.mail.sendmail] Problems aliasing hostname to domain name

johnj@aplcen.apl.jhu.edu (7058 work) (01/11/89)

I have a problem with sendmail that I can't seem to resolve.

The trouble is that a few weeks ago, our host was added to a an
internet name server. Our primary host we wanted to be able to address
as either welchvax.welch.jhu.edu or by our domain name, welch.jhu.edu.

Sending mail to either name results in sending to welch.jhu.edu, the
problem arises when the mail gets to the host welchvax. It barfs up the
address as unknown host:

	550 welch.jhu.edu.tcp... 550 Host unknown
	550 <johnj@welch.jhu.edu>... Host unknown

If I add the domain name to the welchvax.welch.jhu.edu line of the host
file, welchvax mailer is not willing to talk to itself:

	>>> HELO welchvax.welch.jhu.edu
	<<< 553 welchvax.welch.jhu.edu I refuse to talk to myself
	554 <johnj@welch.jhu.edu>... Service unavailable: Bad file number

Our sendmail file has lines as follows that I thought would help to
resolve its hostname before conecting to itself (both in S0 before tcp
stuff):

	R$-<@welchvax.welch.jhu.edu>	$1
	R$-<@welch.jhu.edu>	$1

I am not sure wether sendmail.cf is the problem or if there is some
other way to "alias" our domain name to our host name.

Any help would be greatly appreciated.

-johnj
(johnj@welchsun3.welch.jhu.edu; bitnet:johnj@jhuigf)

karl@triceratops.cis.ohio-state.edu (Karl Kleinpaste) (01/17/89)

johnj@aplcen.apl.jhu.edu (7058 work) writes:
   The trouble is that a few weeks ago, our host was added to a an
   internet name server. Our primary host we wanted to be able to address
   as either welchvax.welch.jhu.edu or by our domain name, welch.jhu.edu.
   ...
   Our sendmail file has lines as follows that I thought would help to
   resolve its hostname before conecting to itself (both in S0 before tcp
   stuff):
	   R$-<@welchvax.welch.jhu.edu>	$1
	   R$-<@welch.jhu.edu>	$1

Given
	DDwelch.jhu.edu
and $j defined appropriately, I suggest, in S0:
	R$+<@$D>		$#local$:$1
	R$+<@$j>		$#local$:$1
or, if you generalize all hostnames to the domain name as we do:
	R$+<@$*$D>		$#local$:$1

Forget the silly hostname stripping and re-running through S0; once
you've detected local mail, deliver it immediately and be done with it.

--Karl