[dave at hayslip.LOCAL: sendmail.cf]

Willie Lim wlim at gdstech
Fri May 25 22:39:44 AEST 1990


[Dave Englund is the person who fixed our sendmail.cf file to make
outgoing and incoming mail work.---wlim]

Date: Fri, 25 May 90 07:52:21 EDT
>From: dave at hayslip.LOCAL (Dave Englund)
To: wlim at gdstech.grumman.com
Subject: sendmail.cf


The problem: Our PI was not receiving mail. 

The search for enlightenment:
	1)  Our hostname is "hayslip".

	2)  We could send mail from hayslip to other machines.

        3)  We could only receive mail sent from hayslip to hayslip
using addresses consisting only of user names. For example:
		 	To: wlim 
			From: dave

	4)  Using "sendmail -bt", we found that the address
"dave at crcvs" (where crcvs is another host on our network) was expanding as follows.
rewrite: ruleset  3   input: "dave" "@" "crcvs"
rewrite: ruleset  3 returns: "dave" "<" "@" "crcvs" ">"
rewrite: ruleset  0   input: "dave" "<" "@" "crcvs" ">"
rewrite: ruleset  0 returns: "^V" "ether" "^W" "crcvs" "^X" "dave" "<" "@" "crcvs" "." "LOCAL" ">"

	5) Expanding the address "dave at hayslip":
rewrite: ruleset  3   input: "dave" "@" "hayslip"
rewrite: ruleset  3 returns: "dave" "<" "@" "hayslip" ">"
rewrite: ruleset  0   input: "dave" "<" "@" "hayslip" ">"
rewrite: ruleset  0 returns: "^V" "ether" "^W" "hayslip" "^X" "dave" "<" "@" "hayslip" "." "LOCAL" ">"
			
	6) The error message we got from hayslip when trying to use
the above address was: "I refuse to send mail to myself."
>From 4 + 5 above, it seemed that hayslip thought it had to send mail
to itself over ethernet. It didn't recognize itself!

	7) Using "sendmail -bt -d21.99", we found that the expansion
of "dave at hayslip" began as:
		dave @ hayslip
		dave < @ hayslip >
		dave < @ hayslip . LOCAL >

	8) At this point, the rewrite rules try to strip off the local
host name. None of the appropriate rules would match this though, so
the expansion continued along the same lines as for a remote host.


The FIX:
	Add a rewrite rule to convert things like "dave<@hayslip.LOCAL>"
to "dave".

	In ruleset 0:

# ??? unusual rule
# Assume that all unqualified, canonical names are local.  This is
#	not necessary unless /etc/hosts contains entries whose first
#	name does not contain periods.
R$*<@$=S>$*		$1<@$2.$D>$3

# now delete the local info
R$*<@$=w>$*		$@$>29$1$3			retry thishost
R$*<@$j>$*		$@$>29$1$2			even if it has dots
# daves hack
#R$*<@$=w.$D>$*		$@$>29$1$3			retry this host.LOCAL
# end of hack
R$*<@$D>$*		$@$>29$1$2			retry LOCAL
R$*<@.$D>$*		$@$>29$1$2			retry .LOCAL
R$*<@$=w.UUCP>$*	$@$>29$1$3			retry thishost.UUCP
R$*<@$j.UUCP>$*		$@$>29$1$2
R$*<$*.>$*		$1<$2>$3			drop trailing dot
R<@>$*			$@$>29$1			route strip & retry
R$*<@>			$@$>29$1			strip null & retry


This worked just fine!



More information about the Comp.sys.sgi mailing list