Thread View: news.software.nntp
4 messages
4 total messages
Started by Brian McEntire
Thu, 01 Oct 1998 00:00
Incoming List mail to News Gateway??
Author: Brian McEntire
Date: Thu, 01 Oct 1998 00:00
Date: Thu, 01 Oct 1998 00:00
22 lines
1413 bytes
1413 bytes
I am on a couple of high volume mailing lists which do not have USENET news groups. I really prefer to read news passively rather than having my mail box fill up. I also like the threading and expiring of messages offered by news... Can INN be configured to accomodate this? Maybe there is some other package? I'd like to have the program take all the incoming messages to some user (user setup specifically only as an inbox) subscribed to a list and post them only to my local news server in some local group I setup. It should not keep many messages around in mail form. Could the reverse gateway then be set up so that if I 'replied' to a message, the news server via this or some other program would send the mail SMTP to the mailing list?? Thanks!
Re: Incoming List mail to News Gateway??
Author: howard
Date: Thu, 01 Oct 1998 00:00
Date: Thu, 01 Oct 1998 00:00
27 lines
1588 bytes
1588 bytes
In Article<36137EE1.62E7AFDB@fsg1.nws.noaa.gov>, <brianm@fsg1.nws.noaa.gov> writes: > I am on a couple of high volume mailing lists which do not have > USENET news groups. I really prefer to read news passively rather than > having my mail box fill up. I also like the threading and expiring of > messages offered by news... > > Can INN be configured to accomodate this? Maybe there is some other > package? > > I'd like to have the program take all the incoming messages to some user > (user setup specifically only as an inbox) subscribed to a list and post > them only to my local news server in some local group I setup. > > It should not keep many messages around in mail form. > > Could the reverse gateway then be set up so that if I 'replied' to a > message, the news server via this or some other program would send the > mail SMTP to the mailing list?? Check the INN FAQ I believe there's a program called mail2news and also a perl script.
Re: Incoming List mail to News Gateway??
Author: Mike Bostock
Date: Fri, 02 Oct 1998 00:00
Date: Fri, 02 Oct 1998 00:00
127 lines
4538 bytes
4538 bytes
howard@wdsec.com wrote in message ...
>
>In Article<36137EE1.62E7AFDB@fsg1.nws.noaa.gov>, <brianm@fsg1.nws.noaa.gov>
>writes:
>> I am on a couple of high volume mailing lists which do not have
>> USENET news groups. I really prefer to read news passively rather than
>> having my mail box fill up. I also like the threading and expiring of
>> messages offered by news...
<snip>
>Check the INN FAQ
>I believe there's a program called mail2news
>and also a perl script.
mail2news (/usr/doc/HOWTO/mini/mail2news) works well here but needed slight
modification to strip the Newgroup: line and Path: line when going from
news2mail2news. Also needs References: line included so that threading
works.
I know nothing about programming (Perl or anything else) but modified the
file as below (my additions are annotated MTB). If someone else can improve
on it I would be grateful.
-------------------------------------------------------------------------
#!/usr/bin/perl
($program = $0) =~ s%.*/%%;
#( $version ) = $] =~ /(\d+\.\d+).*\nPatch level/;
#die "$program: requires at least version 3 of perl\n"
# if $version < 3;
#$inews = "/usr/bin/inews";
#$iopts = "-h -o \"mail2news gateway\"";
$inews = "/usr/bin/rnews";
$iopts = "";
$postinghost = "news.domain.com";
if ($#ARGV < 0) {
# $newsgroup = "test";
# we'll expect the newsgroup line in the body
} elsif ($#ARGV == 0) {
$newsgroup = $ARGV[0];
} else {
die "usage: $program [newsgroup]\n";
}
# in case inews dumps core or something crazy
$SIG{'PIPE'} = "plumber";
sub plumber { die "$program: \"$inews\" died prematurely!\n"; }
open (INEWS, "| $inews $iopts") ||
die "$program: can't run $inews\n";
# header munging loop
while (<STDIN>) {
last if /^$/;
# Remove existing newsgroup and path lines otherwise INN objects
# if it sees two (ie news2mail2news) - MTB
s/^Newsgroups//;
s/^Path//;
# transform real from: line back to icky style
s/^From:\s+(.*) <(.*)>/From: $2 ($1)/;
s/Message-Id/Message-ID/;
# transform from_ line to path header; also works locally
s/^From\s+(\S+)@(\S+).*/Path: $2!$1/
|| s/^From\s+(\S+)[^@]*$/Path: $1\n/;
print INEWS
if
/^(Date|From|Subject|Path|Newsgroups|Organization|Message-ID|References):/i;
#if /^(Date|From|Subject|Path|Newsgroups|Message-ID):/i;
$saw_subject |= ( $+ eq 'Subject' );
$saw_msgid |= ( $+ eq 'Message-ID' );
$saw_newsgroup |= ( $+ eq 'Newsgroups' );
# might need this later to do something useful with the References: line,
# so I'll put it in now - MTB
$saw_ref |= ( $+ eq 'References' );
}
warn "$program: didn't expect newsgroup in both headers and ARGV\n"
if $newsgroup && $saw_newsgroup;
die "$program: didn't get newsgroup from either headers or ARGV\n"
unless $newsgroup || $saw_newsgroup;
$approved = $newsgroup;
$approved =~ s/\./'-'/eg;
($sec,$min,$hour,$mday,$mon,$year)=localtime(time);
$madeupid = "\<$year$mon$mday.$hour$min$sec.$$\@domain.com\>";
printf INEWS "Newsgroups: %s\n", $newsgroup if $newsgroup;
printf INEWS "Approved: %s\@domain.com\n", $approved;
print INEWS "Subject: Untitled\n" unless $saw_subject;
printf INEWS "Message-ID: %s\n", $madeupid unless $saw_msgid;
printf INEWS "NNTP-Posting-Host: %s\n", $postinghost;
print INEWS "Organisation: (mail2news gateway)\n";
# Add References to aid threading - MTB
print INEWS "References: \n";
print INEWS "\n";
print INEWS while <STDIN>; # gobble rest of message
close INEWS;
exit $?;
----------------------------------------------------------------------------
---------------
Re: Incoming List mail to News Gateway??
Author: Rahul Dhesi
Date: Fri, 02 Oct 1998 00:00
Date: Fri, 02 Oct 1998 00:00
21 lines
1301 bytes
1301 bytes
In <36137EE1.62E7AFDB@fsg1.nws.noaa.gov> Brian McEntire <brianm@fsg1.nws.noaa.gov> writes: >I am on a couple of high volume mailing lists which do not have USENET >news groups. I really prefer to read news passively rather than having >my mail box fill up. I also like the threading and expiring of messages >offered by news... >Can INN be configured to accomodate this? Maybe there is some other >package? The one I use is: ftp://ftp.rahul.net/pub/dhesi/mail2rnews Runs with inn 1.x, not yet tested with inn 2.x, but will probably work, since it feeds into inn's 'rnews' program. -- Rahul Dhesi <dhesi@spams.r.us.com>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads