🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #83296

Usenet message format

#83296
From: Steve Crook
Date: Fri, 09 Jul 2010 20:30
37 lines
2444 bytes
Hi all,

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.

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
Putting a CRLF between header and body seems to also cause confusion
with some servers seeing the first line of the body as a header, thus
rejecting them with:
437 No colon-space in "-----BEGIN PGP MESSAGE-----" header

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.)


In the payload, if an entire message doesn't contain a CR then newer
versions of INN seem to reject them with errors like:
437 No body
or
437 Empty article

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.

I suspect I'm doing something fundamentally stupid to have got myself
into such a state of confusion.  I'd appreciate it if somebody could
point it out and put me out of my misery.  :)
Technical Details
Message-ID: <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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news3.google.com!feeder.news-service.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!.POSTED.ip6-localhost!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <slrni3f1nb.49m.steve@news.mixmin.net>
Subject: Usenet message format
Date: Fri, 09 Jul 2010 20:30:35 +0000
From: Steve Crook <steve@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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news3.google.com!feeder.news-service.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!.POSTED.ip6-localhost!not-for-mail
Newsgroups: news.software.nntp
Organization: Mixmin
Injection-Date: Fri, 9 Jul 2010 20:30:35 +0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="ip6-localhost:::1";
 logging-data="22199"; mail-complaints-to="abuse@mixmin.net"
User-Agent: slrn/pre1.0.0-18 (Linux)
Lines: 36