gamiddle@maytag.waterloo.edu (Guy Middleton) (07/21/90)
We have a problem with $LOCALDOMAIN, which is used by the DNS resolver routines -- lookups will be relative to it, instead of the host's real domain. We have two equivalent mail domains (waterloo.edu and uwaterloo.ca), but $w is only set to one of these by sendmail. If a user has LOCALDOMAIN set to the other one, local mail is bounced, because the match against $=w fails. So, I could do one of three things: 1. hack sendmail.cf to explicitly check against both domains 2. somehow set $=w to both hostnames 3. disable LOCALDOMAIN So, what do people think? 3 is easiest, but 2 is probably the most elegant. I don't like 1, because there is no foolproof way to generate both names to test against. Does anybody actually use LOCALDOMAIN and expect it to work for mail? I'm pretty sure nobody here does.
davel@george.arc.nasa.gov (Dave Liebreich) (07/21/90)
In article <1990Jul20.203238.12791@maytag.waterloo.edu> gamiddle@maytag.waterloo.edu (Guy Middleton) writes:
We have two equivalent mail domains (waterloo.edu and uwaterloo.ca), but $w is
only set to one of these by sendmail. If a user has LOCALDOMAIN set to the
other one, local mail is bounced, because the match against $=w fails.
$=w matches against the *class* w, which is set via Cwxxx yyy zzz in
the .cf file. You are confusing this with the macro w, which is
supposed to be the local hostname, set via Dwhostname in .cf.
Do the following in your sendmail.cf file:
Cwhost.waterloo.edu host.uwaterloo.ca
and things should be ok.
p.s. Please note that you can't do a
Cw$w.waterloo.edu $w.uwaterloo.ca
because sendmail 5.64 does not evaluate macros in class definition
lines.
-dave
--
=========================================================================
Dave Liebreich davel@george.arc.nasa.gov
Member Technical Staff (415) 604-4794
Sterling Software @ NASA Ames Research Center
Mail Stop 233-15
Moffet Field, CA 94035
"The opinions expressed above are not necessarily those of my employer"
doo dah doo dah
gamiddle@maytag.waterloo.edu (Guy Middleton) (07/22/90)
In article <DAVEL.90Jul20165410@george.arc.nasa.gov> davel@george.arc.nasa.gov (Dave Liebreich) writes: > $=w matches against the *class* w, which is set via Cwxxx yyy zzz in > the .cf file. You are confusing this with the macro w, which is > supposed to be the local hostname, set via Dwhostname in .cf. > > Do the following in your sendmail.cf file: > > Cwhost.waterloo.edu host.uwaterloo.ca > > and things should be ok. Yes, I do know all this, and it's not what I want. The whole point of $w and $=w is that I don't have to explictly assign the host name in the .cf file; it should be done automatically. We use the same sendmail.cf on several dozen machines. I need to have some way of assigning both domain names without having the host name in the file.
Anselmo-Ed@cs.yale.edu (Ed Anselmo) (07/23/90)
>>>>> On 22 Jul 90 16:53:15 GMT, gamiddle@maytag.waterloo.edu (Guy Middleton) said:
Guy> Yes, I do know all this, and it's not what I want. The whole
Guy> point of $w and $=w is that I don't have to explictly assign the
Guy> host name in the .cf file; it should be done automatically. We
Guy> use the same sendmail.cf on several dozen machines. I need to
Guy> have some way of assigning both domain names without having the
Guy> host name in the file.
Try something like:
# All nicknames for this host
Fw/usr/local/lib/net_database/this_host %s
--
Ed Anselmo anselmo-ed@cs.yale.edu {harvard,decvax}!yale!anselmo-ed
spike@world.std.com (Joe Ilacqua) (07/25/90)
In article <1990Jul22.165315.25316@maytag.waterloo.edu> gamiddle@maytag.waterloo.edu (Guy Middleton) writes: >Yes, I do know all this, and it's not what I want. The whole point of $w and <$=w is that I don't have to explictly assign the host name in the .cf file; >it should be done automatically. We use the same sendmail.cf on several <dozen machines. I need to have some way of assigning both domain names >without having the host name in the file. If one is a CNAME of the other, you could do something like: R$+@$+ $:$1@$[$2$] Given a CNAME of your host this should return the same value as contained in $w (at least if the code is to be believed). ->Spike (Spike@World.STD.com) -- "The World" - Public Access Unix - +1 617-739-9753 24hrs {3,12,24}00bps
gamiddle@maytag.waterloo.edu (Guy Middleton) (07/25/90)
In article <ANSELMO-ED.90Jul23101052@bigbird.cs.yale.edu> Anselmo-Ed@cs.yale.edu (Ed Anselmo) writes: > Try something like: > > # All nicknames for this host > Fw/usr/local/lib/net_database/this_host %s This works, but I still have local state. Generating /usr/local/lib/net_database/this_host is really no different from putting the names in the file -- we still have a unique configuration on each machine, and need some software to generate it. For maximum portability, the .cf file (and any files it references) should not have to be changed when copied to a new machine. If classes could be defined by making shell calls, I would do this: Cw!echo `hostname`.waterloo.edu `hostname`.uwaterloo.ca Or maybe I could define a new macro that contains all the local domains, and the code in sendmail's startup would use it to assign $=w.