🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #82993

Opinion: Mailpost script - edit received header?

#82993
From: D. Stussy
Date: Wed, 14 Apr 2010 07:33
27 lines
2174 bytes
Generally, we don't edit "Received:" headers in mail.  However, as mail
that goes through the "mailpost" script become articles, I'm considering
that certain received headers should be altered - to protect the gateway.

The alteration:  If the received header contains a "for" clause followed by
a mailbox identity that belongs to the posting server, the "for" clause
should be deleted.

Reason:  To protect the identity of the mailbox that is acting as a
mail-to-news gateway from spammers that scan Usenet by deleting it from
headers it might be specified in (i.e. when it is the only recipient).

Proposal:  Around line 290 of the script, just before the comment "# Random
unknown header....", insert a conditional to edit the received header to
remove the "for" clause.  Something like (syntax inexact/approximate):

    if (/^Received:\s*/sio) {
        s/\s*for\s+\<.+@(.+\.)$INN:Config:fromhost\>//;
    }

Or should this be one of the other variables: domain or pathhost (or a
succession of them until one is defined)?

Comments?


Technical Details
Message-ID: <hq3r45$ghk$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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!news.glorb.com!news.snarked.org!.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <hq3r45$ghk$1@snarked.org>
Subject: Opinion: Mailpost script - edit received header?
Date: Wed, 14 Apr 2010 00:33:20 -0700
From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!news.glorb.com!news.snarked.org!.POSTED!not-for-mail
Newsgroups: news.software.nntp
Lines: 27
Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org>
NNTP-Posting-Host: pool-71-118-48-27.lsanca.dsl-w.verizon.net
X-Trace: snarked.org 1271230405 16948 71.118.48.27 (14 Apr 2010 07:33:25 GMT)
X-Complaints-To: newsmaster+complaints@snarked.org
NNTP-Posting-Date: Wed, 14 Apr 2010 07:33:25 +0000 (UTC)
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478