From 38f0d9e5a36966b0033d5fa92f2122e934046529 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Sat, 28 Mar 1998 16:51:15 +0000 Subject: [PATCH] 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. --- data/cgi/getmsg.cgi | 10 +++++++++- en/cgi/getmsg.cgi | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/data/cgi/getmsg.cgi b/data/cgi/getmsg.cgi index 788658be04..2ab23fd337 100755 --- a/data/cgi/getmsg.cgi +++ b/data/cgi/getmsg.cgi @@ -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; diff --git a/en/cgi/getmsg.cgi b/en/cgi/getmsg.cgi index 788658be04..2ab23fd337 100755 --- a/en/cgi/getmsg.cgi +++ b/en/cgi/getmsg.cgi @@ -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;