🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #83297

Re: Usenet message format

#83297
From: Russ Allbery
Date: Fri, 09 Jul 2010 20:43
41 lines
2835 bytes
Steve Crook <steve@mixmin.net> writes:

> I'm struggling to get to grips with how I should correctly terminate
> lines when posting articles.  I'm using Python's nntplib to inject
> messages to various INN servers and don't seem to be finding a
> combination that suits them all.

> Looking at RFC5536 and it appears that all header lines should be
> terminated with CRLF (\x0D\x0a).  I believe the same applies to the
> payload.

It does.

> If I terminate headers with CRLF then newer versions of INN seem happy
> enough about it but older versions reject messages with errors like:
> 437 Bad "Message-ID" header

I suspect that some underlying library inside nntplib is being excessively
helpful and changing your CRLF to CRCRLF.

> I also note that even headers added by the server, such as
> Injection-Info are only terminated with a LF.  (I'm using hexedit to
> view these articles directly from a tradspool.)

That's not a good way to look at the articles, since depending on the
wireformat setting in your inn.conf, INN will have converted the files on
disk back to native line end conventions.  You need to look at a dump of
the message as sent over the wire.

> If I terminate lines with CRLF then my reader (slrn) shows "^M" on the
> end of every line but Windows based readers like Thunderbird display
> them correctly.

Yeah, it definitely sounds like something is being excessively helpful and
adding an extra CR.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <8739vs4c8k.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!news.glorb.com!news2.glorb.com!usenet.stanford.edu!usenet-its.stanford.edu!not-for-mail
References: <slrni3f1nb.49m.steve@news.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <8739vs4c8k.fsf@windlord.stanford.edu>
Subject: Re: Usenet message format
Date: Fri, 09 Jul 2010 13:43:55 -0700
From: Russ Allbery <rra@stanford.edu>
References: <slrni3f1nb.49m.steve@news.mixmin.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!news.glorb.com!news2.glorb.com!usenet.stanford.edu!usenet-its.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 41
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: usenet-its.stanford.edu 1278708235 551 171.67.225.134 (9 Jul 2010
X-Complaints-To: news@usenet-its.stanford.edu
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
Cancel-Lock: sha1:MjVbBq08LUKlYE0wOO2xyUjW62o=
X-Original-Bytes: 2667