πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #83466

Re: Please consider this INN patch for mailpost

#83466
From: D. Stussy
Date: Fri, 01 Oct 2010 03:08
108 lines
5063 bytes
"Julien Γ‰LIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:i82tvh$n8g$1@news.trigofacile.com...
> >> I would have added:
> >>
> >>     chop ($Gateway = `/bin/hostname`) if ! $Gateway ;
> >>
> >> the same way it is done for $Mailname.
> >
> > I specifically left that out for one reason:  Virtual hosting.  The
> > /bin/hostname name may not be the same name as the news server, nor
even
> > under the same domain name.  We could add another command line
parameter to
> > exclude additional hostnames if necessary.
>
> Then how would it harm if /bin/hostname was in the patterns to look for?

Unnecessary processing (extra work).  If the name stored in the system's
global hostname variable isn't ever used in mail gated to news, we'd be
checking for a value that will never be present.  That's why I decided to
write my suggested patch with ONLY the names we KNOW are used for the news
server, and mail delivered to the news server hostname is that which is
gated.  If there should be other hostnames or domains that should be
excluded (beyond inn.conf and readers.conf), let the administrator
explicitly set them (and perhaps we should have a parameter for that).

I chose a minimalist approach to the feature -- alter as little as
possible/desired.

> > However,
> > while the script is running, the name from the TCP socket might be
> > "localhost" if it's using the loopback interface to connect between
mail
> > and news.
>
> It does not matter to have "localhost" left in Received: or *-To:
headers.
> No problem to not look for it, if I understand the aim of your patch.

Bad example.  However, my point was that there may be other [virtual]
hostnames in use that have nothing to do with the gateway.

> >> I would also have changed:
> >>
> >> -my $exclude = 'Organization|Distribution';
> >> +my $exclude =
> >>
> >
'Archive|Archived-At|Comments|Distribution|Keywords|Organization|Summary';
> >
> > I didn't do that because if the message was first gated from news to
mail
> > and is being gated back (why, I don't know) for some reason, the
message
> > may already have these headers present, and I saw no reason not to
preserve
> > them.
>
> I do not understand.  If we do not list these headers here, it means that
> they are renamed.  For instance, the Comments: header field becomes
X-Comments:
> and that's why I thought we had better list it here.
> We should preserve these headers.

Excluded headers are not passed AT ALL to the news article version of the
message.  They are effectively deleted.

> >> +The Received: and *-To: headers are also stripped out to prevent
> >> spamming
> >
> > Actually, the "Received" header is not stripped out, but it is altered
to
> > delete the "FOR _mailbox_" clause
>
> Yep, I will change the wording.
>
>
> >> +=item B<-z> I<header>[B<:>I<header>...]
> >> +
> >> +A colon-separated list of additional headers which should be removed.
> >> +
> >> +By default, removed headers are:
> >> +
> >> +    Bcc
> >> +    X-Trace
> >> +    X-Complaints-To
> >> +
> >>  =back
> >>
> >>  =head1 FILES
> >
> > Same comment as above regarding news->mail->news gating.
>
> I did not change anything here.
> The X-Trace: and X-Complaints-To: headers have always been removed
> by mailpost.
>
>
>
> Injection-Date: and Injection-Info: headers are currently renamed to X-*.
> Maybe the first one should remain unchanged and the second one removed
> (like X-Trace:).

Do what you feel is appropriate for those two.  I did not write my patch
with them in mind as I was hacking at a version (2.5.2) that doesn't have
them yet.

Technical Details
Message-ID: <i83jb2$bta$1@snarked.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.ams3.giganews.com!border1.nntp.ams2.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!news.glorb.com!news.snarked.org!pool-71-106-210-230.lsanca.dsl-w.verizon.net!not-for-mail
References: <i4s5et$6km$1@snarked.org> <i82hhu$74b$1@news.trigofacile.com> <i82sm5$9g3$1@snarked.org> <i82tvh$n8g$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <i83jb2$bta$1@snarked.org>
Subject: Re: Please consider this INN patch for mailpost
Date: Thu, 30 Sep 2010 20:08:12 -0700
From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org>
References: <i4s5et$6km$1@snarked.org> <i82hhu$74b$1@news.trigofacile.com> <i82sm5$9g3$1@snarked.org> <i82tvh$n8g$1@news.trigofacile.com>
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!border1.nntp.ams2.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!news.glorb.com!news.snarked.org!pool-71-106-210-230.lsanca.dsl-w.verizon.net!not-for-mail
Newsgroups: news.software.nntp
Lines: 108
Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org>
Injection-Date: Fri, 1 Oct 2010 03:08:19 +0000 (UTC)
Injection-Info: snarked.org;
 posting-host="pool-71-106-210-230.lsanca.dsl-w.verizon.net:71.106.210.230";
 logging-data="12202"; mail-complaints-to="newsmaster+complaints@snarked.org"
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478
X-Original-Bytes: 4870