Draft specification for future X-Trace header
qralston+ml.inn-workers at andrew.cmu.edu
Fri Jul 7 20:13:37 UTC 2000
On Fri, 7 Jul 2000, Brian Kantor wrote:
> > > It has been my understanding that it is within the rights of the
> > > server receiving the POST to rewrite not only the Message-ID,
> > > but also the "Path:", "X-Trace:" and "Date:" fields in the
> > > header.
> > It is not, and for good reasons neither INN nor C News/nntpd do it
> > by default.
> I differ.
> The original intention of POST was for first-time injection of
> articles into the news system. As such, eliding or editing headers
> that might contain questionable data is part of the capabilities of
> the POST command.
The main reason I employ the perl filter_post hook is to rewrite the
headers of the submitter's article. Specifically, I replace whatever
they specified for the Path: header with just "not-for-mail". (I have
entries in my newsfeeds file that depend on hop count, and I don't
want clients' bogus Path header entries to mess up my calculations.)
In fact, here's an enhancement to INN I'd like to see. As it stands
now, the filter_post hook gets called *after* the headers are
sanitized. I would actually like to see the filter_post hook split
into two separate hooks, filter_post_pre and filter_post_post. The
filter_post_pre would be called before the headers were sanitized, and
the filter_post_post would be called after the headers are sanitized
(as is the case now).
The main reason I want to see this is because I want to be able to
squash any supplied Date: header of submitted articles and have nnrpd
generate the Date: header itself. I run NTP on my news servers, so I
trust any Date: headers they generate to be fairly accurate. In
contrast, most of our newsreader clients are Windows boxes, and their
clocks are all over the place, often off by days, weeks, or even
months. (I'm also our site's Postmaster, and multiple times, I've had
to explain to someone that no, the mail message he received didn't in
fact take 3 days to go through our mail systems; it took 5 seconds,
but the sender's machine's clock was off by 3 days.)
If I squash the Date: header in the existing filter_post hook, the
submitted article will be rejected, because it will contain no Date:
header. What I'd have to do instead is generate a new Date header
from within the filter_post hook. That would be a kluge; if a Date:
header is to be generated, it should always be generated by nnrpd, not
by the filter hooks. Thus my desire to see a filter_post_pre
function; where I could squash the Date: header with impunity, knowing
that nnrpd would generate one that would be correct.
James Ralston, Newsmaster General
Software Engineering Institute
Carnegie Mellon University, Pittsburgh, PA, USA
More information about the inn-workers