Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!bacchus.pa.dec.com!vixie From: vixie@wrl.dec.com (Paul Vixie) Newsgroups: comp.mail.sendmail Subject: Re: sendmail.cf hostname named ?s Keywords: sendmail setup config hostname named Message-ID: <1990Oct13.083802.12321@wrl.dec.com> Date: 13 Oct 90 08:38:02 GMT References: Sender: news@wrl.dec.com (News) Distribution: comp Organization: DEC Western Research Lab Lines: 70 In article , felps@convex.com (Robert Felps) writes: # Environment: # Internet and UUCP(dial-up) # Domain = abci.com # Hostname = asys # Primary named server # # Questions: # 1. What should the hostname command return? # a. asys # b. asys.abci.com I have found that if a system is using a name server, it is generally best to use fqdm's (fully qualified domain names, e.g., asys.abci.com) in the "hostname" command. Many people feel otherwise, and many of those are militant about it, as am I. # 3. What should Dj be set to? I always use Dj$w assuming that $w is set by sendmail to the value that gethostname(3n) returned. Ultrix Sendmail, in particular, strips the hostname after the first "." when setting $w, a widely loathed practice (ULTRIX USERS -- IF ALL N,000 OF YOU SUBMIT AN SPR ON THIS, I CAN GET IT FIXED...) Hwvr, if you are using a reasonable sendmail, $w is safe and $j should be set to it. # 2. What should Cw (hostname) be set to? Cw$d $j localhost Generally you want Cw to include both the qualified and the unqualified names, which is the only argument for letting $w be unqualified and it's not a very good one. A proper config file is one that can safely be used on any machine in a (sub-)domain, without per-host modifications. Thus, you define the (sub-)domain in some variable, say D, and when checking in S0 for "this host" you say... R$+<@$->$* $1<@$2.$D>$3 add our domain R$+<@$=w>$* $1 strip local names However, this will only work in IDA since multi-token class matches are bogus in virtually all other sendmails. So you'll probablay have to say: Cwlocalhost [...] R$+<@$->$* $1<@$2.$D>$3 add our domain R$+<@$=w>$* $1 strip local names R$+<@$d>$* $1 strip local names R$+<@$j>$* $1 strip local names ...unless you use Dj$w, in which case the last line is redundant. # Any other tips would be helpful. I have sendmail.cf setup and seems # to be working but would like to know the correct way some of these # things should be done. If you've got one that works, you're doing it right. No smiley, that's the nature of this ugly beast. From here on in, every change you make is a matter of your own personal taste and judgement. Cheers, -- Paul Vixie DEC Western Research Lab Palo Alto, California ...!decwrl!vixie