Article View: news.software.nn
Article #994Re: Auto get articles in crontab?
From: Keenan Royle
Date: Wed, 17 Oct 1990 20:43
Date: Wed, 17 Oct 1990 20:43
107 lines
3660 bytes
3660 bytes
In article <rhoward.656192906@romeo> rhoward@msd.gatech.edu (Robert L. Howard) writes:
`We have a need to get all the articles from a local group and then
`mail them out to all the users in our domain. We would like to do
`this as a cron job each night. (Motivation: Some of our users will
`not log on to use nn, but can use an e-mail program from their PC's.
`This would allow us to forward all the articles from this local group
`out to them through a mail alias.)
`
<solution suggestion deleted>
`
`Anyone got such a beast? I think I can put a wrapper around some
`existing nntp stuff, but was curious if I was treading new ground'
`or if I could ride on someone's coattails...
`
`Thanks
`Robert
`
`--
`| Robert L. Howard | Georgia Tech Research Institute |
`| rhoward@msd.gatech.edu | MATD Laboratory |
`| (404) 528-7165 | Atlanta, Georgia 30332 |
`| UUCP: ...!{allegra,amd,hplabs,ut-ngp}!gatech!msd!rhoward |
You can do this with your sys file.
You can send incoming articles to any process you like,
including mail, or something that batches the articles
and does a single mail.
some examples from out sys file:
mail:world,na,usa,cs.bf:S:/bin/mail 20095CRS@MSU.BITNET
Or in a more full blown way we have:
#
# Newsgroups via mail.
# If someone wants to get a newsgroup by mail,
# add the appropriate line here, and add the user to
# /usr/lib/news/mail-lists/group.name
# sahayman 1990 04 19
#
news-via-mail:all,!all.all,restricted.test:S:\
/usr/lib/news/news-via-mail restricted.test
#
contents of /usr/lib/news/news-via-mail:
#!/usr/bin/perl
# news-via-mail news.group
# redistribute news via mail, typically used to send restricted.* groups
# to people who don't have access to this machine.
# We get group lists from /usr/lib/news/mail-lists/news.group.name
#
# see /usr/lib/news/sys, which calls this program
$Usage = "$0 news.group.name";
if ( $#ARGV != 0 ) {
die "Usage: $Usage";
}
$Group = $ARGV[0];
$Members = "/usr/lib/news/mail-lists/$Group";
open(MEMBERS, $Members) || die "Can't open $MEMBERS: $!";
@Members = <MEMBERS>;
close(MEMBERS);
chop(@Members);
# Delete comments.
@Members = grep( !/^#/, @Members );
$cmdline = "|/usr/lib/sendmail -f $Group@iuvax.cs.indiana.edu @Members";
open(SENDMAIL, $cmdline) || die "Can't run sendmail: $!";
$Header = 1;
while ( <STDIN> ) {
if ( $Header && /^$/ ) {
# end of header, throw in some extra headers
print SENDMAIL "Reply-to: $Group@iuvax.cs.indiana.edu\n";
print SENDMAIL "Errors-to: postmaster@iuvax.cs.indiana.edu\n";
$Header = 0;
}
if ( $Header && /^From:/ ) {
s/^From/Originally-From/;
}
print SENDMAIL $_;
}
close(SENDMAIL);
exit(0);
--
Keenan Royle
royle@cs.indiana.edu postmaster@cs.indiana.edu
royle@iubacs.bitnet
Technical Details
Message-ID:
<65299@iuvax.cs.indiana.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!cica!iuvax!royleReferences:
<rhoward.656192906@romeo>Show Full Headers
Complete Article Headers
Message-ID: <65299@iuvax.cs.indiana.edu> Subject: Re: Auto get articles in crontab? Date: Wed, 17 Oct 1990 20:43:50 +0000 From: royle@iuvax.cs.indiana.edu (Keenan Royle) References: <rhoward.656192906@romeo> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!cica!iuvax!royle Newsgroups: news.software.nn Organization: Computer Science Department, Indiana University Lines: 107 Posted: Wed Oct 17 21:43:50 1990