🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #38810

sendmail to newsgroup - how ?

#38810
From: Glenn White
Date: Thu, 22 Jul 1999 00:00
48 lines
2311 bytes
This email relates to sending an email to a newsgroup through an nntp
server, from a Perl/CGI script.

I have a perl script running from a cgi-bin which sends emails via the usual
lines:

$mailprog = '/usr/lib/sendmail';
$rec = 'someone@somewhere.come';
open (MAIL, "|$mailprog $rec") || die "Can't open $mailprog!\n";
print MAIL "Reply-to: mailto:abc.com\n;
print MAIL "Subject: A message\n";
print MAIL "From: fred @abc,com\n";
print MAIL "$FORM{'comments'}";      # comments comes from a web form
close (MAIL);

This works fine for emails. However, I want to use this for posting to a
newsgroup.
This script for emails obviously runs through an smtp mailer. However, I
presume
that for newsgroups, the posting must go through an nntp server (such as
news.somewhere.com).   I'd be very grateful if someone could please explain
how I configure the headers so the the message to correctly submit the
message to a newsgroup using this technique. I have tried adding

print MAIL "Newsgroups: alt.test";

but this doesn't do anything. I also don't have send2mail, postie or imap
available.

Should I be setting something in for the $rec contents like
news.somewhere.com
or alt.test@news.somewhere..com ??? or should I be sending it in a
different way ?

I understand how to do this using anonymous remailers, but since we are
not trying to spam, I see no point in trying to hide our company
information,
nntp mail servers, ISP etc ... and would rather find an upfront way to do
this
directly from a perl script.

Many thanks

Glenn White



Technical Details
Message-ID: <7n6h7u$7qa$1@news.su.se>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <7n6h7u$7qa$1@news.su.se>
Subject: sendmail to newsgroup - how ?
Date: Thu, 22 Jul 1999 00:00:00 +0000
From: "Glenn White" <glenn@white.demon.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 503933092
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
X-Complaints-To: abuse@su.se
X-Trace: news.su.se 932628542 8010 130.237.166.9 (22 Jul 1999 07:29:02 GMT)
Organization: Stockholm University
X-MSMail-Priority: Normal
NNTP-Posting-Date: 22 Jul 1999 07:29:02 GMT
Newsgroups: news.software.nntp