Thread View: news.software.nntp
4 messages
4 total messages
Started by Adam Selene
Wed, 30 Aug 2000 00:00
A good way to accept future dated articles
Author: Adam Selene
Date: Wed, 30 Aug 2000 00:00
Date: Wed, 30 Aug 2000 00:00
64 lines
2819 bytes
2819 bytes
I'm looking for a good way to accept future dated articles from my feeds
with Date: headers that contain a date several years into the future.
Is there any way to accomplish this, short of changing the following
two snippets from art.c and post.c?
------------------------------ art.c -------------------------------------
/* Is article too old? */
p = HDR(_date);
if ((Data->Posted = parsedate(p, &Now)) == -1) {
(void)sprintf(buff, "Bad \"Date\" header -- \"%s\"", MaxLength(p, p));
return buff;
}
if (innconf->artcutoff && Data->Posted < Now.time - innconf->artcutoff) {
(void)sprintf(buff, "Too old -- \"%s\"", MaxLength(p, p));
return buff;
}
if (Data->Posted > Now.time + DATE_FUZZ) {
(void)sprintf(buff, "Article posted in the future -- \"%s\"",
MaxLength(p, p));
return buff;
}
Data->Arrived = Now.time;
p = HDR(_expires);
Data->Expires = 0;
if (*p != '\0' && (Data->Expires = parsedate(p, &Now)) == -1) {
#if 0
(void)sprintf(buff, "Bad \"Expires\" header -- \"%s\"",
MaxLength(p, p));
return buff;
#endif
}
----------------------------- post.c -------------------------------------
/* Set Date. */
if (GetTimeInfo(&Now) < 0) {
(void)sprintf(Error, "Can't get the time, %s", strerror(errno));
return Error;
}
if ((gmt = gmtime(&Now.time)) == NULL)
return "Can't get the time";
(void)sprintf(datebuff, "%d %3.3s %d %02d:%02d:%02d GMT",
gmt->tm_mday, &MONTHS[3 * gmt->tm_mon], 1900 + gmt->tm_year,
gmt->tm_hour, gmt->tm_min, gmt->tm_sec);
if (HDR(_date) == NULL)
HDR(_date) = datebuff;
else {
if ((t = parsedate(HDR(_date), &Now)) == -1)
return "Can't parse \"Date\" header";
if (t > Now.time + DATE_FUZZ)
return "Article posted in the future";
}
--------------------------------------------------------------------------
Are these the only two snippets that need to change in order for me to
accept future dated articles?
TIA.
-Adam Selene
Re: A good way to accept future dated articles
Author: Andrew Gierth
Date: Thu, 31 Aug 2000 03:42
Date: Thu, 31 Aug 2000 03:42
15 lines
1523 bytes
1523 bytes
>>>>> "Adam" == Adam Selene <adamselene@earthlink.net> writes: Adam> I'm looking for a good way to accept future dated articles from Adam> my feeds with Date: headers that contain a date several years Adam> into the future. there is no good way. The Date: header is part of the loop prevention mechanism (along with the message-id). Messing about with it is more or less guaranteed to cause spews. -- Andrew.
Re: A good way to accept future dated articles
Author: Jeremy
Date: Thu, 31 Aug 2000 21:32
Date: Thu, 31 Aug 2000 21:32
32 lines
1755 bytes
1755 bytes
Adam Selene <adamselene@earthlink.net> wrote: > For unknown reasons, Earthlink feeds the future dated articles to me. I > suppose they must use something other than INN, otherwise they would > encounter the problems you speak of. How many of the things do you get? Any idea what they are? I saw 646 of them yesterday; 669 so far today. You probably shouldn't worry about dropping them, as many other sites will too. But if you're seeing significantly more than the above numbers, there may be something strange going on. Top ten sites generating future-dated articles, as seen by one of my transit servers, thus far today, according to the hostname portion of the message-id, with a count of how many from each: 288 hehehe.com 94 iridium.webone.com.au 46 vic.nntp.telstra.net 29 cppssbbsa05 26 tom.com 26 cppssbbsa04 17 nntpserver.swip.net 16 news6-win.server.ntlworld.com 10 yggdrasil.utfors.se 10 news-east.usenetserver.com -- Jeremy ( jeremy@exit109.com | bofh@netscum.dk )
Re: A good way to accept future dated articles
Author: Jeremy
Date: Fri, 01 Sep 2000 03:32
Date: Fri, 01 Sep 2000 03:32
15 lines
1157 bytes
1157 bytes
Adam Selene <adamselene@earthlink.net> wrote:
> How did you generate this report?
There are cleaner ways to do this, surely, but it was a one-off, so I
typed it as I thought it:
% egrep 'Article posted in the future' /news/log/news | awk '{print $6}' | \
perl -pe 's/^<.*?@//; s/>$//;' | sort | uniq -c | sort -nr
(This assumes an INN server.)
--
Jeremy ( jeremy@exit109.com | bofh@netscum.dk )
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads