Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!chris From: chris@columbia.UUCP (Chris Maio) Newsgroups: comp.mail.uucp Subject: Re: Too many hops... Why? (really 4.3 BSD sendmail problem) Message-ID: <4287@columbia.UUCP> Date: Sat, 31-Jan-87 01:00:44 EST Article-I.D.: columbia.4287 Posted: Sat Jan 31 01:00:44 1987 Date-Received: Sat, 7-Feb-87 03:57:17 EST References: <103800001@datacube> <103800002@datacube> <1138@husc6.UUCP> Reply-To: chris@columbia.edu (Chris Maio) Organization: Columbia University CS Department Lines: 63 Summary: bug fix for sendmail In article <1138@husc6.UUCP> dudek@harvard.UUCP (Glen Dudek) writes: >What follows is a complaint about 4.3BSD sendmail and domain servers - >those of you lucky enough not to have either can ignore this... > >What actually caused the problem was a 4.3BSD version of sendmail which >supports the domain servers, and sets the '$w' (hostname) macro to >'ocean.harvard.edu', instead of just 'ocean'. Glen, I got bitten the same way, but decided that it would be better to put the local-host name in $=w instead of $w; here's a patch for the 4.3 BSD sendmail that will include both "ocean" and "ocean.harvard.edu" in $=w. Chris RCS file: main.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** /tmp/,RCSt1026201 Sat Jan 31 00:41:08 1987 --- /tmp/,RCSt2026201 Sat Jan 31 00:41:10 1987 *************** *** 109,115 **** bool queuemode = FALSE; /* process queue requests */ bool nothaw; static bool reenter = FALSE; ! char jbuf[30]; /* holds MyHostName */ extern bool safefile(); extern time_t convtime(); extern putheader(), putbody(); --- 109,115 ---- bool queuemode = FALSE; /* process queue requests */ bool nothaw; static bool reenter = FALSE; ! char jbuf[128]; /* holds MyHostName */ extern bool safefile(); extern time_t convtime(); extern putheader(), putbody(); *************** *** 263,268 **** --- 263,283 ---- printf("\ta.k.a.: %s\n", *av); #endif DEBUG setclass('w', *av++); + } + + + /* if the nameserver is being used, make sure that + $=w contains our hostname without the domain name */ + if ((p = index(jbuf, '.')) != NULL) { + *p = '\0'; /* strip off the domain name */ + st = stab(jbuf, ST_CLASS, ST_FIND); + if (st == NULL || !bitnset('w', st->s_class)) { + setclass('w', jbuf); + #ifdef DEBUG + if (tTd(0, 4)) + printf("\ta.k.a.: %s (no domain)\n", jbuf); + #endif DEBUG + } } /* version */