Thread View: news.software.nn
4 messages
4 total messages
Started by Robert L. Howard
Wed, 17 Oct 1990 19:48
Auto get articles in crontab?
Author: Robert L. Howard
Date: Wed, 17 Oct 1990 19:48
Date: Wed, 17 Oct 1990 19:48
31 lines
2237 bytes
2237 bytes
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.)
We thought to make an elaborate nn macro in the init file and cause
nn to go to the group of interest, save all the articles, exit nn, then
mail the saved articles after running them through some sed script.
The problem seems to be that nn puts the tty in 'raw' (?) mode and
this causes cron to choke.
What I really need is a simply standalone program that will take as
an argument the group name and a command (such as get list of available
articles or get article number) and open the NNTP connnection and return
the text of the article. Simple, clean, fast....
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 |
Re: Auto get articles in crontab?
Author: 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
Re: Auto get articles in crontab?
Author: Gary Heston
Date: Thu, 18 Oct 1990 16:51
Date: Thu, 18 Oct 1990 16:51
18 lines
1619 bytes
1619 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.
> [ reason and elaborate nn plan deleted ]
Just put a bogus system entry in your sys file, and either feed the
articles directly into mail, or let it build a batch list and write
a $.05 shell script to extract the articles from it and build a digest
for mailing. With a mail list and one line in sys, you avoid any
need to write nn macros; if you digest, you save some bandwidth by
moving a few fairly large files instead of lots of little ones.
--
Gary Heston { uunet!sci34hub!gary } System Mismanager
SCI Technology, Inc. OEM Products Department (i.e., computers)
"The esteemed gentlebeing says I called him a liar. It's true, and I
regret that." Retief, in "Retiefs' Ransom" by Keith Laumer.
Re: Auto get articles in crontab?
Author: Robert L. Howard
Date: Fri, 19 Oct 1990 11:39
Date: Fri, 19 Oct 1990 11:39
34 lines
2360 bytes
2360 bytes
In <777@sci34hub.UUCP> gary@sci34hub.UUCP (Gary Heston) writes:
>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.
>> [ reason and elaborate nn plan deleted ]
>Just put a bogus system entry in your sys file, and either feed the
>articles directly into mail, or let it build a batch list and write
>a $.05 shell script to extract the articles .....
[more stuff deleted]
Though I thought I was clear in my article, I'll repeat, I don't get the
news directly at my sight (small domain of four machines that I control).
I must access another machine on campus via NNTP. Thus, I have no sys
file. It is starting to look like that since this is the most common
suggestion, that I ought to contact the SA for the NNTP server and see
if he can add me to that sys file. The drawabck is that he is going to
get pretty tired of me adding/deleting groups/names etc. That is why
I was looking for either an nn solution or one that involved a wrapper
around some NNTP calls.
Has anyone out there ever attempted this?
Thanks for all the responses so far,
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 |
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