Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!mintaka!bloom-beacon!eru!hagbard!sunic!ericom!eua.ericsson.se!erix.ericsson.se!per From: per@erix.ericsson.se (Per Hedeland) Newsgroups: news.software.b Subject: Re: The anomolous handling of bad dates in cnews. Message-ID: <1991May16.211311.3544@eua.ericsson.se> Date: 16 May 91 21:13:11 GMT References: <1991Apr25.181041.6023@mp.cs.niu.edu> <1991Apr25.223301.27280@world.std.com> Sender: news@eua.ericsson.se Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden Lines: 53 Nntp-Posting-Host: super.eua.ericsson.se In article <1991Apr25.223301.27280@world.std.com> geoff@world.std.com (Geoff Collyer) writes: >Neil Rickert: >> However, when a news article is received locally any sort of date gets the >>article into the local news stream. > >No, inews and friends parse any existing Date: header contents and >rewrite them in RFC 1036 (as modified by RFC 1123) notation. An >unparsable date will cause the article to be bounced. I don't think this is correct; here's the relevant part of the latest anne.jones: *) # canonicalise given date to RFC 822 timet="` getabsdate \"$artdate\" `" case "$timet" in -*) echo "$0: bad Date: header" >&2 rm -f $tmp $input exit 1 ;; *) set `ctime -u "$timet"` defdate="$1, $3 $2 $5 $4 GMT" ;; esac Getabsdate will not print anything on stdout for an "invalid" date, which causes $timet to be any empty string, and ctime to produce the well-known date "Thu Jan 1 00:00:00 1970" - which is indeed "too old" for most news setups. >>(Basically inews does not use the '-o' option when calling relaynews). > >A change that just missed the last patch and should be in the next one is >that inews will (finally) invoke newsspool or rnews instead of relaynews, >and thus relaynews will get invoked with -o on local postings. I really hope that inews in the future will not reject articles with bad dates, but fix up the date instead (just setting the posting date if the given one is unparsable seems quite reasonable to me) - IMHO, this *is* the place to try to "repair" headers, and it already does insert the missing spaces that are so impossible for relaynews to provide. Btw, regarding inews rejecting articles - as far as I can determine (I tried an article with no Newsgroups: line), inews -W will exit with status 0 even if the posting failed - this causes e.g. NNTP postings to always appear as "successful". --Per Hedeland per@erix.ericsson.se or per%erix.ericsson.se@uunet.uu.net or ...uunet!erix.ericsson.se!per