felps@convex.com (Robert Felps) (10/10/90)
I'm sure this has only been requested 5,328,912 times but I'm new to sendmail.cf configurations and would appreciate some general information. 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 2. What should Cw (hostname) be set to? 3. What should Dj be set to? 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. Thanks, Robert Felps felps@convex.com Convex Computer Corp OS System Specialist 3000 Waterview Parkway Tech. Assistant Ctr Richardson, Tx. 75083 1(800) 952-0379
vixie@wrl.dec.com (Paul Vixie) (10/13/90)
In article <felps.655560162@convex.convex.com>, 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 <vixie@wrl.dec.com> Palo Alto, California ...!decwrl!vixie
rickert@mp.cs.niu.edu (Neil Rickert) (10/13/90)
In article <1990Oct13.083802.12321@wrl.dec.com> vixie@wrl.dec.com (Paul Vixie) writes: ># 2. What should Cw (hostname) be set to? > > Cw$d $j localhost > Just a quick warning - Don't take the above suggested 'Cw' definition too literally. The $d and $j won't do anything. In many (most??, all??) version of sendmail, the $macros are not expanded during the processing of C lines. -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science <rickert@cs.niu.edu> Northern Illinois Univ. DeKalb, IL 60115. +1-815-753-6940
jeffe@sandino.austin.ibm.com (Peter Jeffe 512.823.4091) (10/15/90)
In article <1990Oct13.123427.8147@mp.cs.niu.edu> rickert@mp.cs.niu.edu (Neil Rickert) writes: >> Cw$d $j localhost >> > Just a quick warning - Don't take the above suggested 'Cw' definition >too literally. The $d and $j won't do anything. In many (most??, all??) >version of sendmail, the $macros are not expanded during the processing of >C lines. Just for the record: they are in AIX sendmail, at least in V2 and 3. ------------------------------------------------------------------------------- Peter Jeffe ...uunet!cs.utexas.edu!ibmchs!auschs!sandino.austin.ibm.com!jeffe first they want a disclaimer, then they make you pee in a jar, then they come for you in the night