Add an option to download the complete mailing list archive

(usually one week) where the current mail is stored. The URL
point to the ftp server ftp.freebsd.org.

You can download an archive and read it offline with your
favourite mail client. This may reduce your local terrorkom bill.
I don't know if this option is useful for the general FreeBSD user.
This commit is contained in:
Wolfram Schneider 1998-03-28 16:51:15 +00:00
parent 4ed06f93e2
commit 38f0d9e5a3
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=2614
2 changed files with 18 additions and 2 deletions

View file

@ -6,7 +6,7 @@
# by John Fieber
# February 26, 1998
#
# $Id: getmsg.cgi,v 1.11 1998-03-28 15:29:25 wosch Exp $
# $Id: getmsg.cgi,v 1.12 1998-03-28 16:51:15 wosch Exp $
#
require "./cgi-lib.pl";
@ -17,6 +17,7 @@ use POSIX qw(strftime);
# Files MUST be fully qualified and MUST start with this path.
#
$messagepath = "/usr/local/www/db/text/";
$ftparchive = 'ftp://ftp.freebsd.org/pub/FreeBSD/mailing-lists/archive';
&ReadParse(*formdata);
&Fetch($formdata{'fetch'});
@ -38,6 +39,13 @@ sub Fetch
$file =~ s/\.\.//g;
$file =~ s|/+|/|;
# read the full archive from the FreeBSD ftp server
if ($type eq 'archive' && $file =~ s%^$messagepath%%o) {
print "Location: $ftparchive/$file.gz\n";
print "Content-type: text/plain\n\n";
return;
}
if ($file =~ /^$messagepath/ && open(DATA, $file))
{
@finfo = stat DATA;