home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume36
/
mserv
/
patch02
next >
Wrap
Text File
|
1993-03-11
|
11KB
|
377 lines
Newsgroups: comp.sources.misc
From: jv@mh.nl (Johan Vromans)
Subject: v36i009: mserv - Squirrel Mail Server Software, version 3.1, Patch02
Message-ID: <1993Mar12.035001.15009@sparky.imd.sterling.com>
X-Md4-Signature: 90d29c82bd535cf18ce39ddec17626be
Date: Fri, 12 Mar 1993 03:50:01 GMT
Approved: kent@sparky.imd.sterling.com
Submitted-by: jv@mh.nl (Johan Vromans)
Posting-number: Volume 36, Issue 9
Archive-name: mserv/patch02
Environment: Perl
Patch-To: mserv, Volume 34, Issue 92-97,119
This patch updates the Squirrel Mail Server Software version 3.1A to 3.1B.
Changes in version 3.1B:
------------------------
If an FTP connection cannot be established, subsequent requests for
this host are flushed.
READ THIS BEFORE PATCHING:
--------------------------
To apply this patch:
1. Take a fresh copy of the 3.1A kit, e.g.:
% uncompress < mserv-3.1A.tar.Z | tar xvf -
2. Change the directory name where the kit resides from mserv-3.1A to
mserv-3.1B. This is needed since a new file is created by the
patch, which would otherwise be placed in the wrong directory.
% mv mserv-3.1A mserv-3.1B
4. Run this file through 'patch':
% patch -p0 -N < thisfile
Index: patchlevel.h
Prereq: 3.1.20
*** mserv-3.1A/patchlevel.h Sat Jan 16 13:48:19 1993
--- mserv-3.1B/patchlevel.h Fri Feb 5 22:09:26 1993
***************
*** 1,4 ****
! # @(#)@ patchlevel.h 3.1.20 -*- perl -*-
# Squirrel Mail Server Software -- Copyright 1988, 1992 Johan Vromans
# This file is used to verify the correctness of a batch of patches.
! $ms_version = "V3.01A"; # Should match version in ms_common.pl
--- 1,4 ----
! # @(#)@ patchlevel.h 3.1.21 -*- perl -*-
# Squirrel Mail Server Software -- Copyright 1988, 1992 Johan Vromans
# This file is used to verify the correctness of a batch of patches.
! $ms_version = "V3.01B"; # Should match version in ms_common.pl
Index: ChangeLog-3.1B
*** /dev/null Fri Feb 5 22:40:27 1993
--- mserv-3.1B/ChangeLog-3.1B Fri Feb 5 22:39:32 1993
***************
*** 0 ****
--- 1,19 ----
+ Fri Feb 5 22:08:26 1993 Johan Vromans (jv@squirrel)
+
+ * README 3.14:
+ Documented changes.
+
+ * pr_dowork.pl 3.25:
+ Flush requests if a server connection could not be made.
+
+ * pr_ftp.pl 1.7:
+ Transmit connection result to caller.
+
+ * Makefile 1.4:
+ * patchlevel.h 1.21:
+ * ms_common.pl 1.40:
+ Bump to V3.01B.
+
+ * MANIFEST 1.17:
+ * ChangeLog-3.1B:
+ New file.
Index: MANIFEST
*** mserv-3.1A/MANIFEST Sat Jan 16 14:35:09 1993
--- mserv-3.1B/MANIFEST Fri Feb 5 22:39:20 1993
***************
*** 4,9 ****
--- 4,10 ----
CRONTAB.sample
ChangeLog-3.1
ChangeLog-3.1A
+ ChangeLog-3.1B
HELP
Makefile
chat2.pl
Index: Makefile
Prereq: 1.3
*** mserv-3.1A/Makefile Sat Jan 16 13:55:29 1993
--- mserv-3.1B/Makefile Fri Feb 5 22:09:10 1993
***************
*** 1,16 ****
# Makefile -- for mail server
! # SCCS Status : @(#)@ Makefile 1.3
# Author : Johan Vromans
# Created On : Fri May 1 15:44:47 1992
# Last Modified By: Johan Vromans
! # Last Modified On: Sat Jan 16 13:52:43 1993
! # Update Count : 120
# Status : OK
SHELL = /bin/sh
# Mail Server Version
! VERSION = 3.1A
# Perl 4.035 needs fixes!
PERL = /usr/local/bin/perl
--- 1,16 ----
# Makefile -- for mail server
! # SCCS Status : @(#)@ Makefile 1.4
# Author : Johan Vromans
# Created On : Fri May 1 15:44:47 1992
# Last Modified By: Johan Vromans
! # Last Modified On: Fri Feb 5 22:09:03 1993
! # Update Count : 121
# Status : OK
SHELL = /bin/sh
# Mail Server Version
! VERSION = 3.1B
# Perl 4.035 needs fixes!
PERL = /usr/local/bin/perl
Index: README
*** mserv-3.1A/README Sat Jan 16 14:51:20 1993
--- mserv-3.1B/README Fri Feb 5 22:38:23 1993
***************
*** 40,45 ****
--- 40,52 ----
Files retrieved via FTP are kept on local store for some time, so
subsequent requests can be honoured from the cache.
+ Changes in version 3.1B:
+ ------------------------
+ If an FTP connection cannot be established, subsequent requests for
+ this host are flushed.
+
+ For details, see ChangeLog-3.1B.
+
Changes in version 3.1A:
------------------------
Most important change is the implementation of the $errlimit
***************
*** 78,84 ****
begin
send mserv-3.1.tar.Z <<< only if you need a new kit
! send mserv-3.1-3.1A.diff.Z <<< to update the 3.1 kit
send XPatch-4.035.tar.Z <<< to fix perl4.0 pl35
end
--- 85,92 ----
begin
send mserv-3.1.tar.Z <<< only if you need a new kit
! send mserv-3.1-3.1A.diff.Z <<< to update the 3.1 kit to 3.1A
! send mserv-3.1A-3.1B.diff.Z <<< to update the 3.1A kit to 3.1B
send XPatch-4.035.tar.Z <<< to fix perl4.0 pl35
end
Index: ms_common.pl
Prereq: 1.39
*** mserv-3.1A/ms_common.pl Sat Jan 16 13:47:55 1993
--- mserv-3.1B/ms_common.pl Fri Feb 5 22:08:46 1993
***************
*** 1,16 ****
# ms_common.pl -- common info for mail server
! # SCCS Status : @(#)@ ms_common 1.39
# Author : Johan Vromans
# Created On : Fri Apr 17 11:02:58 1992
# Last Modified By: Johan Vromans
! # Last Modified On: Sat Jan 16 13:47:35 1993
! # Update Count : 111
# Status : OK
################ Preamble ################
#
# Package info. Do not change this.
! $my_package = "Squirrel Mail Server Software V3.01A";
#
if ( defined $config_file && $config_file ne '' ) {
require $config_file;
--- 1,16 ----
# ms_common.pl -- common info for mail server
! # SCCS Status : @(#)@ ms_common 1.40
# Author : Johan Vromans
# Created On : Fri Apr 17 11:02:58 1992
# Last Modified By: Johan Vromans
! # Last Modified On: Fri Feb 5 22:08:23 1993
! # Update Count : 112
# Status : OK
################ Preamble ################
#
# Package info. Do not change this.
! $my_package = "Squirrel Mail Server Software V3.01B";
#
if ( defined $config_file && $config_file ne '' ) {
require $config_file;
Index: pr_dowork.pl
Prereq: 3.24
*** mserv-3.1A/pr_dowork.pl Sat Jan 2 15:11:28 1993
--- mserv-3.1B/pr_dowork.pl Fri Feb 5 22:34:10 1993
***************
*** 1,10 ****
# pr_dowork.pl -- execute work loop
! # SCCS Status : @(#)@ pr_dowork.pl 3.24
# Author : Johan Vromans
# Created On : Thu Jun 4 22:14:50 1992
# Last Modified By: Johan Vromans
! # Last Modified On: Sat Jan 2 15:11:05 1993
! # Update Count : 221
# Status : OK
# Format of work queue entries.
--- 1,10 ----
# pr_dowork.pl -- execute work loop
! # SCCS Status : @(#)@ pr_dowork.pl 3.25
# Author : Johan Vromans
# Created On : Thu Jun 4 22:14:50 1992
# Last Modified By: Johan Vromans
! # Last Modified On: Fri Feb 5 22:30:56 1993
! # Update Count : 231
# Status : OK
# Format of work queue entries.
***************
*** 112,118 ****
@workq = ();
# Close any pending FTP connection.
! if ( $ftphost && !$interactive ) {
print STDOUT ("FTP Command execution:\n CLOSE $ftphost\n");
&ftp'close; #';
$ftphost = '';
--- 112,118 ----
@workq = ();
# Close any pending FTP connection.
! if ( $ftphost && !$interactive && $ftp_ok ) {
print STDOUT ("FTP Command execution:\n CLOSE $ftphost\n");
&ftp'close; #';
$ftphost = '';
***************
*** 421,436 ****
return 1 if $ftphost eq $work[0];
$ftppass = $recipient if $ftppass eq '';
$ftppass = $uunote if $ftppass eq '?';
! &ftp_connect (shift (@work), $ftpuser, $ftppass);
print STDOUT ("\n");
return 1;
}
if ( $type eq 'C' ) {
return 1 unless $ftphost;
print STDOUT ("FTP Command execution:\n",
" CLOSE $work[0]\n");
! &ftp'close; #';
$ftphost = '';
print STDOUT ("\n");
return 1;
}
--- 421,443 ----
return 1 if $ftphost eq $work[0];
$ftppass = $recipient if $ftppass eq '';
$ftppass = $uunote if $ftppass eq '?';
! $ftp_ok = &ftp_connect (shift (@work), $ftpuser, $ftppass);
print STDOUT ("\n");
return 1;
}
if ( $type eq 'C' ) {
+ if ( $ftphost ne '' && !$ftp_ok ) {
+ print STDOUT ("=> Flushed: CLOSE $ftphost\n",
+ " (No server connection)\n\n");
+ $ftphost = '';
+ return 1;
+ }
return 1 unless $ftphost;
print STDOUT ("FTP Command execution:\n",
" CLOSE $work[0]\n");
! &ftp'close; #';
$ftphost = '';
+ $ftp_ok = 0;
print STDOUT ("\n");
return 1;
}
***************
*** 446,451 ****
--- 453,463 ----
}
if ( $type eq 'D' ) {
+ unless ( $ftp_ok ) {
+ print STDOUT ("=> Flushed: DIR $ftphost:$work[0]\n",
+ " (No server connection)\n\n");
+ return 1;
+ }
local ($thefile) = &fttemp;
local ($dir) = shift (@work);
&ftp_dir ($dir, $thefile);
***************
*** 468,473 ****
--- 480,490 ----
return 1;
}
if ( $type eq 'G' ) {
+ unless ( $ftp_ok ) {
+ print STDOUT ("=> Flushed: GET $ftphost:$work[0]\n",
+ " (No server connection)\n\n");
+ return 1;
+ }
local ($thefile) = &ftp_get ($work[0]);
&ftqueue ($ftphost . ':' .$work[0],
$thefile, $encoding,
Index: pr_ftp.pl
Prereq: 1.6
*** mserv-3.1A/pr_ftp.pl Thu Dec 31 16:25:37 1992
--- mserv-3.1B/pr_ftp.pl Fri Feb 5 22:17:35 1993
***************
*** 1,10 ****
# pr_ftp.pl -- mail server support for FTP
! # SCCS Status : @(#)@ pr_ftp.pl 1.6
# Author : Johan Vromans
# Created On : Sat Dec 5 01:06:44 1992
# Last Modified By: Johan Vromans
! # Last Modified On: Thu Dec 31 16:23:04 1992
! # Update Count : 35
# Status : Unknown, Use with caution!
# This is the Squirrel Mail Server interface to the ftp.pl package.
--- 1,10 ----
# pr_ftp.pl -- mail server support for FTP
! # SCCS Status : @(#)@ pr_ftp.pl 1.7
# Author : Johan Vromans
# Created On : Sat Dec 5 01:06:44 1992
# Last Modified By: Johan Vromans
! # Last Modified On: Fri Feb 5 22:10:14 1993
! # Update Count : 36
# Status : Unknown, Use with caution!
# This is the Squirrel Mail Server interface to the ftp.pl package.
***************
*** 20,28 ****
" OPEN $host\n");
&ftp'close if $ftphost; #';
- &ftp'open ($host, 21, 0, 2); #';
- &ftp'login ($user, $pass); #';
$ftphost = $host;
}
sub ftp_get {
--- 20,27 ----
" OPEN $host\n");
&ftp'close if $ftphost; #';
$ftphost = $host;
+ &ftp'open ($host, 21, 0, 2) && &ftp'login ($user, $pass);
}
sub ftp_get {
--
Johan Vromans jv@mh.nl via internet backbones
Multihouse Automatisering bv uucp:..!{uunet,sun4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands phone/fax: +31 1820 62911/62500
------------------------ "Arms are made for hugging" -------------------------
exit 0 # Just in case...