Solutions can vary depending on what kind of access you have to your
newserver. If you are the administrator, you can probably have MHonArc
process the directories the news server stores articles in directly.
Many servers store articles in a directoy structure that mirrors
newsgroup name hierarchies. For example, comp.lang.perl.misc would be
mapped to comp/lang/perl/misc with each article in a separate file.
I use a little perl script to send news messages as email, which in
turn could also probably be processed by MHonArc (haven't tried
it). Also use procmail to do filtering of my messages on the news
server (let me expand on this)...
First case: I get a newsfeed (only gardening newsgroups) to my servers at
mallorn.com, but I want to pull out all URLs that come from them. I
also have some internal newsgroups that I *don't* want to filter on. I
use this definition in my newsfeeds file (inn):
# pull out all messages that have URLs in them.
:/usr/local/bin/procmail -m /usr/spool/news/procmailrc.news
My procmailrc file looks like this:
# should actually try using the MATCH variable instead of
# sending the whole message, but that's for a later date...
# repost to the mailing list garden-urls
# repost this to a mallorn newsgroup
Of course, if you don't want to do any fancy filtering (I also do
scoring, etc. in my procmailrc file), then you can just call a news2mail
script directly from the newsfeeds file:
And your news2mail script looks pretty simple:
open( STDOUT, "| /usr/lib/sendmail -t" ) || die "Mail fail : $!\n" ;
$/ = "\n\n" ;
$_ = <STDIN> ;
( $realGroup ) = ( $_ =~ /newsgroups: (.*)/i ) ;
s/Message-ID: <innclip([^>]+)>/Message-ID: <$1>/gi;
s/^To: /X-To: /gi;
s/^CC: /X-CC: /gi;
s/^BCC: /X-BCC: /gi;
print "To: @ARGV\n" ;
print "[ News via Email, clipped from :$realGroup ]\n\n";
print <STDIN> ;
I make no guarantees -- I set this up about 3 years ago when I didn't
know what I was doing :). But it's been running ever since... sendmail
adds the "From " line, so it should be parseable by MHonArc...