🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
5 messages
5 total messages Started by Sharon Katvan Tue, 06 Jul 1993 11:18
Off-line Mail Readers
#4826
Author: Sharon Katvan
Date: Tue, 06 Jul 1993 11:18
15 lines
1166 bytes
I have a simple, yet important, question - is there such a thing as a UseNet
off-line mail reader? I mean this: a program which will make me daily
packets of certain folders, packets I can D/L to my MS-DOS based PC, and
there open them and read them, using the Editor part of the same program.
Maybe a QWK mailer, or better yet - something like BlueWave in the FidoNet
Echo-mail world.
If someone knows of such a program, and how to obtain a copy of it, please
email me.


Thanks,

Sharon
s2225676@techst02.technion.ac.il
Re: Off-line Mail Readers
#4859
Author: Remo Williams
Date: Fri, 09 Jul 1993 00:39
14 lines
1262 bytes
>I have a simple, yet important, question - is there such a thing as a UseNet
>off-line mail reader? I mean this: a program which will make me daily
>packets of certain folders, packets I can D/L to my MS-DOS based PC, and
>there open them and read them, using the Editor part of the same program.
>Maybe a QWK mailer, or better yet - something like BlueWave in the FidoNet
>Echo-mail world.
>If someone knows of such a program, and how to obtain a copy of it, please
>email me.

I second this emotion, mail me, too.

-- 
		Mail remo@andromeda.rutgers.edu
		Remo Williams is a man, not a movie.
Re: Off-line Mail Readers
#4873
Author: Ayman I. Kayssi
Date: Fri, 09 Jul 1993 20:29
327 lines
10109 bytes
#!/usr/bin/perl
##
## digestify v0.41
##
## Ayman Kayssi --  ayman@eecs.umich.edu
##
## Use at your own risk!
##
## Let me know if you find any bugs or add new features...
##
## The documentation is really horrible, so...
#
$0 =~ s|.*/||;
require 'getopts.pl';
&Getopts('a:b:d:e:f:s:m:h');
if($opt_h){
    print "Usage: $0 [-a max_num_of_articles] [-b max_art_size] [-d working_directory] [-e send_mail] [-f newsrc_file] [-m email_address] [-s nntp_server]
       $0 -h to get help
$0 reads a newsrc file (\$newrc variable or the argument to -f) 
in the working directory (\$wdir variable or the argument to -d)
and connects to an NNTP server (\$nntpserv variable or the argument to -s).
It gets from the server any articles numbered higher than the
number listed in the newsrc file. The format of this file is:
newsgroup last_read_article [email address]
>>example:
comp.lsi.cad 2200
comp.lsi 2310 joe@cs.univ.edu
comp.arch 35150
The articles are retrieved and placed in a file called newsgroup.dgst,
e.g. 'comp.lsi.dgst', 'comp.lsi.cad.dgst' in the working directory. A
maximum of \$max_art (or the argument to -a) is retrieved, and
any article whose size is larger than \$max_size (or the argument to -b)
is discarded. The article numbers in the newsrc file are then updated.
If an argument is given to the -m switch, $0 will send the
digests to the address specified, which overrides any email address specified
in the newsrc file. $0 uses either \$sendmail (set by default to 
/usr/lib/sendmail) or whatever the argument of the -e switch is. 
The mailed digests are removed from the working directory.
";
    exit;
}
#############################################################################
### Customize
#
# where to send the digests...
#
$origmailto = $opt_m;
#
# name of the newsrc file
#
$newsrc = $opt_f || 'newsrc';
#
# directory where the newsrc and the digests are kept
#
$wdir = $opt_d || '/z/ayman/Digests';
#
# NNTP server name
#
$nntpserv = $opt_s || 'zip.eecs.umich.edu';
#
# How do we send mail?
#
$sendmail = $opt_e || '/usr/lib/sendmail';
#
# maximum number of articles to retrieve in case there are more than this
# number of articles on the server - the articles will be the *last* $max_art
#
$max_art = $opt_a || 50;
#
# maximum article size above which the article will be discarded
#
$max_size = $opt_b || 20000;
#
#############################################################################
##
## go to the directory where all the stuff is installed
##
chdir $wdir || die "Can't change dir to $wdir: $!\n";
$newsrc =~ s|.*/||;
$newnewsrc = $newsrc.'.new';
open(NEWSRC,$newsrc) || die "Can't find $newsrc in $wdir: $!\n";
open(NEWNEWSRC,"> $newnewsrc") || die "Can't open $newnewsrc: $!\n";
##
## check that $sendmail exists and is executable
##
if($origmailto){
    die "Can't execute $sendmail\n" unless -x $sendmail;
}
##
## connect to the server and absorb the first line
##
&open_port($nntpserv,119) || die "unable to connect to $nntpserv..$!\n";
<SOCK>;
##
## main loop
##
while(<NEWSRC>){
    ++$nl;
    chop;
    ($newsgroup,$article,$altmailto) = split;
##
## make sure that the article number is an integer
##
    unless ($article =~ /^\d+$/){
        warn "Error on line $nl in $newsrc: $article should be an integer\n";
        warn "Removing line $nl from $newsrc\n";
	next;
    } 
##
## if there is an alternative mailing address for this newsgroup, override it
## with $origmailto
##
    $mailto = $origmailto || $altmailto;
##
## increment the article counter - this is the first article we don't have
##
    ++$article;
##
## get the last article that the server has
##
    $serverlast = &nntplast($newsgroup);
##
## make sure that the newsgroup is valid
##
    if ($serverlast == -1){
        warn "Bogus newsgroup $newsgroup on line $nl in $newsrc\n";
        warn "Removing line $nl from $newsrc\n";
        next;
    }
##
## digest name is newsgroup.dgst
##
    $digest = $newsgroup.'.dgst';
    rename($digest,$digest.'.old') if -e $digest;
    open(DIGEST,"> $digest") || die "Can't open $digest in $wdir: $!\n";
##
## If there are more than $max_art articles, get only the last $max_art
##
    if(($serverlast - $article + 1 ) > $max_art){
	$article = $serverlast - $max_art + 1;
	print DIGEST "Note: Only $max_art articles (the maximum allowed) ";
	print DIGEST "were included in this digest.\n";
	print DIGEST "-----\n";
    }
##
## get all the articles from the server
##
    &nntpget($newsgroup,$article,$serverlast);
    for($afile=$article;$afile<=$serverlast;$afile++){
##
## if the size of the article is greater than $max_size, delete the file
## without including in the digest
##
	if ((-s $afile) > $max_size){
	    unlink $afile;
	    print DIGEST "Article $afile was not included ";
	    print DIGEST "due to its large size.\n";
            print DIGEST "--------- End of Article ";
            print DIGEST "$afile in $newsgroup ---------\014\n";
	    next;
        }
##
## acceptable size: include the file in the digest after splitting into header
## and body
##
	if(open(ARTICLE,$afile)){
	    $/ = "";
##
## get the header of the article
##
	    $header = <ARTICLE>;
##
## some header processing can go here - I do none
##
	    print DIGEST $header;
##
## get the body of the article
##
	    undef($/);
	    $body = <ARTICLE>;
##
## print the body and separate messages by CNTRL-L and newline
##
	    print DIGEST "\n$body";
	    print DIGEST "--------- End of Article ";
	    print DIGEST "$afile in $newsgroup ---------\014\n";
	    close(ARTICLE);
##
## remove the article file
##
	    unlink $afile;
        }
    }
##
## update the new newsrc file
##
    $update = "$newsgroup $serverlast";
    $update .= " $altmailto" if $altmailto;
    print NEWNEWSRC "$update\n";
    close(DIGEST);
##
## send the digest
##
    if(($mailto) && (-s $digest)){
	open(DIGEST,$digest) || die "Hmm..can't open $digest for mailing:$!\n";
	open(SM,"| $sendmail $mailto") || die "Can't pipe into $sendmail:$!\n";
	print SM "To: $mailto\n";
	print SM "Subject: Digest of $newsgroup\n\n";
	print SM <DIGEST>;
	print SM ".\n";
	close(SM);
	close(DIGEST);
##
## remove the new and old digests since the digest is being mailed
##
	unlink($digest);
	unlink("$digest.old") if -e "$digest.old";
    }
    $/ = "\n";
}
close(NEWSRC);
close(NEWNEWSRC);
rename($newnewsrc,$newsrc);
print SOCK "quit\r\n";
<SOCK>;
close(SOCK);
##
## function nntplast
## arguments: $newsgroup -- name of a news group
## returns  : $last_available_article -- the number of the last available 
##                                       article on the server
##            -1 if the newsgroup is not valid
##
sub nntplast{
    local ($group) = @_;
    print SOCK "group $group\r\n";
    $_=<SOCK>;
    /^411 / && return (-1);
    /^211 / || warn "strange return value($_)\n";
    ($num,$start,$end)=/^211 (\d+) (\d+) (\d+)/;
    return $end;
}
##
## function nntpget
## arguments: $newsgroup -- name of a news group
##            $start -- number of the first article in a range to fetch
##            $end -- number of the last article in a range to fetch
## retuns: -- creates files with filenames corresponding to article numbers
##
sub nntpget{
    local ($group,$start,$end) = @_;
    for($num=$start;$num<=$end;$num++){
	print SOCK "HEAD $num\r\n";
        $_=<SOCK>;
        unless (/^221 /){ 
	    warn "head cmd problems ($num):$_";
	}
        else{
	    open(OUT,"> $num") || die "unable to open $num:$!\n";
	    for (;;){
		$_=<SOCK>;
		last if /^\.\r\n$/;
		chop;
		chop;
		print OUT "$_\n";
	    }
	}
        print OUT "\n";
        print SOCK "BODY $num\r\n";
        $_=<SOCK>;
        unless (/^222 /){ 
	    warn "body cmd problems ($num):$_";
	}
        else{
	    for (;;){
		$_=<SOCK>;
		last if /^\.\r\n$/;
		chop;
		chop;
		print OUT "$_\n";
	    }
	    print OUT "\n";
	}
        close(OUT);
    }
}
##
## function open_port -- Who wrote it?
## arguments: $server -- a tcp/ip server
##            $port -- a port number
## returns  : 1 or undef
##
sub open_port{
    local($server, $port) = @_;

    $sockaddr = 'S n a4 x8';
    chop($thishost = `hostname`); $thisaddr = (gethostbyname($thishost))[4];
    $thisproc = pack($sockaddr, 2, 0, $thisaddr);
    
    local($serveraddr,$serverproc);
    if ($server =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/){ 
	$serveraddr = pack('C4', $1, $2, $3, $4); 
    }
    else{
	local(@x) = gethostbyname($server);
	return undef unless @x;
	$serveraddr = $x[4];
    }
    $serverproc = pack($sockaddr, 2, $port, $serveraddr);
    unless (socket(SOCK, 2, 1, 6)){
	# XXX hardwired $AF_SOCKET, $SOCK_STREAM, 'tcp'
	# but who the heck would change these anyway? (:-)
	($!) = ($!, close(SOCK)); # close S while saving $!
	return undef;
    }
    unless (bind(SOCK, $thisproc)){
	($!) = ($!, close(SOCK)); # close S while saving $!
	return undef;
    }
    unless (connect(SOCK, $serverproc)){
	($!) = ($!, close(SOCK)); # close S while saving $!
	return undef;
    }
    select((select(SOCK), $| = 1)[0]);
    1;
}
Re: Off-line Mail Readers
#4880
Author: Russell Schulz
Date: Sun, 11 Jul 1993 03:28
21 lines
1690 bytes
[followups to the new c.o.m.ma]

s2225676@techst02.technion.ac.il (Sharon Katvan) writes:

> I have a simple, yet important, question - is there such a thing as a UseNet
> off-line mail reader?

yes - there are many.  it depends what software you have running on
the machine where your news is.

check the comp.bbs.waffle FAQ for some - slnp uses the same hdpf
specification (which can include QWK as a subset) as the hpv and
solar combo do.

> Maybe a QWK mailer, or better yet - something like BlueWave in the FidoNet
> Echo-mail world.

best yet, something that won't screw up the Usenet headers!
-- 
Russell Schulz  russell@alpha3.ersys.edmonton.ab.ca  ersys!rschulz  Shad 86c
Re: Off-line Mail Readers
#4884
Author: Marc G. Fournier
Date: Mon, 12 Jul 1993 00:53
17 lines
1485 bytes
In article <Jul.8.20.39.15.1993.6265@andromeda.rutgers.edu> remo@andromeda.rutgers.edu (Remo Williams) writes:
>
>>I have a simple, yet important, question - is there such a thing as a UseNet
>>off-line mail reader? I mean this: a program which will make me daily
>>packets of certain folders, packets I can D/L to my MS-DOS based PC, and
>>there open them and read them, using the Editor part of the same program.
>>Maybe a QWK mailer, or better yet - something like BlueWave in the FidoNet
>>Echo-mail world.
>>If someone knows of such a program, and how to obtain a copy of it, please
>>email me.
>
>I second this emotion, mail me, too.
>
	uqwk 1.5 seems to do a pretty good job of it...not sure where to
find it, mind you...just check archie

marc
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