πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #83903

Re: Maybe a bug in X-Trace nnrpd generation (INN 2.5.2)

#83903
From: Aioe
Date: Mon, 28 Feb 2011 11:34
51 lines
3311 bytes
Julien Γ‰LIE wrote:

> Hi Paolo,
> 
> Why not ipv6-localhost or ::1?

they sound good.

> And aren't there cases where stdin is not from localhost but from a
> remote host?

if nnrpd uses 'stdin' when a message is sent by a remote host it's a serious 
bug that should be corrected as soon as possible.
I'm assuming that 'stdin' marks only those messages sent through some Unix 
domain sockets used by nnrpd and innd that AFAIK are only local.

If you know a way to establish a connection with a remote Unix domain 
socket, i'm happy to learn. If you immagine an ssh connection with the 
remote host, in this case imho localhost is right since message was sent by 
localhost itself.
 
> INN does not force "stdin".  The system gives the "stdin" value for the
> host.

yes, of course.
When one needs to write a script that makes some check about the sender's ip 
address, X-Trace is the easiest way to fetch needed data.
In your current implementation, X-Trace fourth field stores usually the 
client's ip address. It becomes the arrival time when message comes from 
stdin and client's ip is not stored.
This behaviour breaks the X-Trace format and this is the first problem.
Usually, DNS resolution of first X-Trace field gives the same value that is 
stored in the fourth field so it's easy to build a couple of values, client 
IP and Domain from X-Trace. When a message comes from stdin, client domain 
(first field) is set to localhost, fourth X-Trace field is set to arrival 
time, NNTP-Posting-Host to 'stdin'. 
At this point, in order to avoid troubles my script must (a) parse X-Trace, 
(b) if first item inside X-Trace is 'somewhat like localhost' it must read 
NNTP-Posting-Host - which is the only place where 'stdin' is reported - and 
(c) if NNTP-Posting-Host is set to 'stdin' scripts must handle this.
It's complex, probably too complex.

> And for the 2.5 branch, not adding an NNTP-Posting-Host: header field.

good :-)

> But what for the X-Trace: header field?

put somewhat as fourth field that looks like an ip address (that is what 
everybody expects to find here)
Technical Details
Message-ID: <ikg189$b84$1@speranza.aioe.org>
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.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail
References: <ikfnh8$g2c$1@speranza.aioe.org> <ikfpan$s8e$1@news.trigofacile.com> <ikfs40$svf$1@speranza.aioe.org> <8t1cj4FifjU1@mid.individual.net>

Show Full Headers
Complete Article Headers
Message-ID: <ikg189$b84$1@speranza.aioe.org>
Subject: Re: Maybe a bug in X-Trace nnrpd generation (INN 2.5.2)
Date: Mon, 28 Feb 2011 12:34:34 +0100
From: Aioe <estasi@aioe.org>
References: <ikfnh8$g2c$1@speranza.aioe.org> <ikfpan$s8e$1@news.trigofacile.com> <ikfs40$svf$1@speranza.aioe.org> <8t1cj4FifjU1@mid.individual.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.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail
Newsgroups: news.software.nntp
Followup-To: news.software.nntp
Organization: Aioe.org
Lines: 51
NNTP-Posting-Host: WZCa7tZIAKOXBDxo9WedIQ.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-15"
Content-Transfer-Encoding: 8Bit
X-Complaints-To: abuse@aioe.org
User-Agent: KNode/4.4.6
X-Notice: Filtered by postfilter v. 0.8.2
X-Original-Bytes: 3065