kherron@ms.uky.edu (Kenneth Herron) (05/27/91)
>...it has been suggested to me in email that it would be easier to fix >C news. The authors and proponents of C news don't consider this a problem, >they did it on purpose, and as far as I can tell, most of them really don't >care, since their articles aren't being dropped. The bottom line is that >they refuse to do anything about this... No matter what you may think of C-news, its authors, and the people who run it, the fundamental problem here is that your software is non-compliant. You have never had the right to expect other sites to process non-conforming articles; the fact that many used to do so does not mean they must continue forever. Each of us is first and foremost responsible for making news run smoothly at our site. These changes help me to do that. There have been real, serious problems caused by earlier, more lenient versions of C-news; leaving all that behind is more important than coddling poorly written software. -- Kenneth Herron kherron@ms.uky.edu University of Kentucky +1 606 257 2975 Department of Mathematics "So this won't be a total loss, can you make it so guys get to throw their mothers-in-law in?" "Sure, why not?"
mcdonald@sacomm.schulz.unisa.edu.au (Ian McDonald) (05/28/91)
In article <1991May24.082757@mccall.com>, tp@mccall.com (Terry Poot) writes: Path: sacomm.schulz.unisa.edu.au!yoyo.aarnet.edu.au!munnari.oz.au!uhccux!s.u-t tokyo!ccut!sun-barr!olivea!uunet!zaphod.mps.ohio-state.edu!maverick.ksu. .ksu.edu!deimos.cis.ksu.edu!mccall!tp From: tp@mccall.com (Terry Poot) Newsgroups: news.software.b,comp.os.vms,news.software.anu-news,vmsnet.admin Subject: Important TESTED patch for dxrn/mxrn Message-ID: <1991May24.082757@mccall.com> Date: 24 May 91 13:27:57 GMT Reply-To: tp@mccall.com (Terry Poot) Organization: The McCall Pattern Co., Manhattan, KS, USA Lines: 289 Xref: sacomm.schulz.unisa.edu.au news.software.b:2122 comp.os.vms:9069 news.software.anu-news:1292 vmsnet.admin:139 Sorry about the last one, this patch produces RFC822 compatible dates as best I can tell, and hopefully this will statisfy C news. In case you don't know by now, a recent change to C news causes it to discard all postings and followups from dxrn or mxrn if they are built with GENERATE_EXTRA_FIELDS defined. The format of the Date: header is not acceptable to the recent version of C news. This probably mostly affects those ysing dxrn or mxrn to connect to an ANU News nntp server, as it requires the message to contain Date: headers, whereas most unix based nntp servers do not. If you run dxrn or mxrn with GENERATE_EXTRA_FILEDS defined, I strongly suggest you apply this pastch, as your articles are not being propagated to the whole net, and will be dropped by even more sites as more of them upgrade theif version of C news. Please do not assume that you are unaffected if nobody has told you there is a problem. The messages printed by C news when it encounters one of these messages does not give enough information for the C news administrator to contact you about the problem without doing a fair bit of work to locate the offending article. Also, there is a great deal of "somebody else probably told him by now" going on. C news does not attempt to contact the offending site, but simply prints a message in a log file and discards the article (meaning, of course, that many sites never receive it at all, and thus can not warn you about it). This patch is for dxrn/mxrn version 6.14-4, and assumes that you have applied the "ANU-NEWS" patch included with that version, and which is needed to get the correct time in the first place, and has nothing particularly to do with ANU News. Rick will be including it as a standard part of the code in the future. That patch must be applied if your gmtime() returns NULL, as it does with VAX C, and you define GENERATE_EXTRA_FIELDS. You will also need to define TIMEZONE_ENV in config.h to be the name of an environment variable (logical name or DCL symbol) that will contain a valid timezone. As given, it sets it up properly for sites using DECUS uucp. If you have applied that patch (which applies correctly with an offset (I think it was 38 lines) on 6.14-4), then apply this one to get the Date: header formatted to C news' liking. If you have some other version of dxrn/mxrn, and you build it with GENERATE_EXTRA_FIELDS defined, I'd suggest you look at the patch and make similar changes. It shouldn't be hard. BTW, it has been suggested to me in email that it would be easier to fix C news. The authors and proponents of C news don't consider this a problem, they did it on purpose, and as far as I can tell, most of them really don't care, since their articles aren't being dropped. The bottom line is that they refuse to do anything about this, and since many sites run C news, the only practical option is to conform to their software. I would like to thank Kenneth Herron and Mark Davies specifically for calling this problem to my attention (the only 2 that did, world wide, so like I said, don't assume you don't have a problem just because nobody has told you you do). I'll be submitting this patch to the vmsnet.sources moderator for posting so that it will get into the archives and be available to anyone who might later retrieve dxrn from those archives. I'll also send them to Rick Murphy (the author) so that he can distribute them to any other places dxrn might be made available, and include them in future releases. If you know someone running dxrn that might not read any of these newsgroups, please forward this to them. In fact, if you know someone not running C news, you might let him know about the problem with it, so that he can try to find out if his articles are being discarded. I highly doubt that dxrn/mxrn is the only software generating things C news doesn't like. *** compose.c_orig --- compose.c ************** *** 2407,2413 return(genid); } ! #endif void followup() --- 2407,2416 ----- return(genid); } ! /* ! * generate a valid RFC822 date-time ! */ ! static char gendate[40]; static char *gen_date() { ************** *** 2409,2414 } #endif void followup() { --- 2412,2438 ----- */ static char gendate[40]; + static char *gen_date() + { + time_t clockTime; + char *atime, *tz; + struct tm *cur_time; + + (void) time(&clockTime); + cur_time = gmtime(&clockTime); + if(cur_time){ + atime = asctime(cur_time); + tz = "GMT"; + } else { + atime = asctime(localtime(&clockTime)); + tz = getenv(TIMEZONE_ENV); + } + sprintf(gendate, "%3s, %2s %3s %2s %8s %s", atime, atime+8, atime+22, + atime+11, tz); + return(gendate); + } + #endif + void followup() { ************** *** 2418,2429 char *signature, *ptr; int OldPostingMode = PostingMode; - #ifdef GENERATE_EXTRA_FIELDS - time_t clockTime; - char timeString[40]; - struct tm *cur_time; - #endif - if (ComposeActive) { mesgPane(XRN_SERIOUS, "Only one composition pane at a time"); return; --- 2442,2447 ----- char *signature, *ptr; int OldPostingMode = PostingMode; if (ComposeActive) { mesgPane(XRN_SERIOUS, "Only one composition pane at a time"); return; ************** *** 2469,2490 #ifdef GENERATE_EXTRA_FIELDS /* stuff to generate Message-ID and Date... */ ! (void) time(&clockTime); ! cur_time = gmtime(&clockTime); ! if(cur_time){ ! (void) strcpy(timeString, asctime(cur_time)); ! ptr = index(timeString, '\n'); ! *ptr = '\0'; ! (void) strcat(timeString, " GMT"); ! } else { ! cur_time = localtime(&clockTime); ! (void) strcpy(timeString, asctime(cur_time)); ! ptr = index(timeString, '\n'); ! *ptr = '\0'; ! (void) strcat(timeString, " "); ! (void) strcat(timeString, getenv(TIMEZONE_ENV)); ! } ! (void) sprintf(buffer, "Date: %s\n", timeString); (void) strcat(TempString, buffer); (void) sprintf(buffer, "Message-ID: %s\n", gen_id()); (void) strcat(TempString, buffer); --- 2487,2493 ----- #ifdef GENERATE_EXTRA_FIELDS /* stuff to generate Message-ID and Date... */ ! (void) sprintf(buffer, "Date: %s\n", gen_date()); (void) strcat(TempString, buffer); (void) sprintf(buffer, "Message-ID: %s\n", gen_id()); (void) strcat(TempString, buffer); ************** *** 2542,2553 char *signature; int OldPostingMode = PostingMode; - #ifdef GENERATE_EXTRA_FIELDS - time_t clockTime; - char *ptr, timeString[40]; - struct tm *cur_time; - #endif - if (ComposeActive) { mesgPane(XRN_SERIOUS, "Only one composition pane at a time"); return; --- 2545,2550 ----- char *signature; int OldPostingMode = PostingMode; if (ComposeActive) { mesgPane(XRN_SERIOUS, "Only one composition pane at a time"); return; ************** *** 2589,2610 #ifdef GENERATE_EXTRA_FIELDS /* stuff to generate Message-ID and Date... */ ! (void) time(&clockTime); ! cur_time = gmtime(&clockTime); ! if(cur_time){ ! (void) strcpy(timeString, asctime(cur_time)); ! ptr = index(timeString, '\n'); ! *ptr = '\0'; ! (void) strcat(timeString, " GMT"); ! } else { ! cur_time = localtime(&clockTime); ! (void) strcpy(timeString, asctime(cur_time)); ! ptr = index(timeString, '\n'); ! *ptr = '\0'; ! (void) strcat(timeString, " "); ! (void) strcat(timeString, getenv(TIMEZONE_ENV)); ! } ! (void) sprintf(buffer, "Date: %s\n", timeString); (void) strcat(TempString, buffer); (void) sprintf(buffer, "Message-ID: %s\n", gen_id()); (void) strcat(TempString, buffer); --- 2586,2592 ----- #ifdef GENERATE_EXTRA_FIELDS /* stuff to generate Message-ID and Date... */ ! (void) sprintf(buffer, "Date: %s\n", gen_date()); (void) strcat(TempString, buffer); (void) sprintf(buffer, "Message-ID: %s\n", gen_id()); (void) strcat(TempString, buffer); ************** *** 2657,2667 art_num current = newsgroup->current; char buffer[10000]; char *bufptr; - #ifdef GENERATE_EXTRA_FIELDS - time_t clockTime; - char *ptr, timeString[40]; - struct tm *cur_time; - #endif if (ComposeActive) { mesgPane(XRN_SERIOUS, "Only one composition pane at a time"); --- 2639,2644 ----- art_num current = newsgroup->current; char buffer[10000]; char *bufptr; if (ComposeActive) { mesgPane(XRN_SERIOUS, "Only one composition pane at a time"); ************** *** 2722,2743 (void) strcat(TempString, buffer); #ifdef GENERATE_EXTRA_FIELDS /* stuff to generate Message-ID and Date... */ ! (void) time(&clockTime); ! cur_time = gmtime(&clockTime); ! if(cur_time){ ! (void) strcpy(timeString, asctime(cur_time)); ! ptr = index(timeString, '\n'); ! *ptr = '\0'; ! (void) strcat(timeString, " GMT"); ! } else { ! cur_time = localtime(&clockTime); ! (void) strcpy(timeString, asctime(cur_time)); ! ptr = index(timeString, '\n'); ! *ptr = '\0'; ! (void) strcat(timeString, " "); ! (void) strcat(timeString, getenv(TIMEZONE_ENV)); ! } ! (void) sprintf(buffer, "Date: %s\n", timeString); (void) strcat(TempString, buffer); (void) sprintf(buffer, "Message-ID: %s\n", gen_id()); (void) strcat(TempString, buffer); --- 2699,2705 ----- (void) strcat(TempString, buffer); #ifdef GENERATE_EXTRA_FIELDS /* stuff to generate Message-ID and Date... */ ! (void) sprintf(buffer, "Date: %s\n", gen_date()); (void) strcat(TempString, buffer); (void) sprintf(buffer, "Message-ID: %s\n", gen_id()); (void) strcat(TempString, buffer); -- Terry Poot <tp@mccall.com> The McCall Pattern Company (uucp: ...!rutgers!ksuvax1!deimos!mccall!tp) 615 McCall Road (800)255-2762, in KS (913)776-4041 Manhattan, KS 66502, USA -- Ian McDonald Project Leader (MSU): Academic systems & communications University of South Australia