update to 2.41; from kevlo@
This commit is contained in:
parent
48aa65b693
commit
dcaca340e1
@ -1,8 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.20 2004/07/12 05:54:51 kevlo Exp $
|
||||
# $OpenBSD: Makefile,v 1.21 2004/11/21 17:01:45 naddy Exp $
|
||||
|
||||
COMMENT= "highly configurable webmail client"
|
||||
|
||||
DISTNAME= openwebmail-2.32
|
||||
DISTNAME= openwebmail-2.41
|
||||
CATEGORIES= mail www
|
||||
|
||||
HOMEPAGE= http://www.openwebmail.org/
|
||||
@ -14,12 +14,11 @@ PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM=Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
MASTER_SITES= ${HOMEPAGE}/openwebmail/download/ \
|
||||
http://turtle.ee.ncku.edu.tw/openwebmail/download/ \
|
||||
http://turtle.ee.ncku.edu.tw/openwebmail/download/old/
|
||||
EXTRACT_SUFX= .tgz
|
||||
MASTER_SITES= ${HOMEPAGE}/openwebmail/download/release/ \
|
||||
http://turtle.ee.ncku.edu.tw/openwebmail/download/release/
|
||||
|
||||
RUN_DEPENDS= ::textproc/ispell \
|
||||
::mail/tnef \
|
||||
:p5-Text-Iconv->=1.2:converters/p5-Text-Iconv \
|
||||
:p5-CGI-SpeedyCGI->=2.21:www/p5-CGI-SpeedyCGI \
|
||||
:p5-Compress-Zlib->=1.22:archivers/p5-Compress-Zlib \
|
||||
@ -59,7 +58,11 @@ do-configure:
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${CONFDIR}/openwebmail
|
||||
${TAR} -C ${WRKSRC} -cpf- cgi-bin conf htdocs | \
|
||||
${TAR} -C ${WRKSRC} -cf- cgi-bin conf htdocs | \
|
||||
${TAR} -C ${PREFIX} -xpf-
|
||||
|
||||
post-install:
|
||||
@echo "/var/www/cgi-bin/openwebmail/" \
|
||||
> ${CONFDIR}/openwebmail/openwebmail_path.conf
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (openwebmail-2.32.tgz) = 76eb967e492c81a0db56a053d221e5d4
|
||||
RMD160 (openwebmail-2.32.tgz) = de8cc7a0c507bf2af7d4cacc687033e3f782da09
|
||||
SHA1 (openwebmail-2.32.tgz) = b376e4764d838cc4199b19e91f281b11837a8879
|
||||
MD5 (openwebmail-2.41.tar.gz) = f3df360acfeb693d648b38c55656f03f
|
||||
RMD160 (openwebmail-2.41.tar.gz) = 0caca36b55d49e296c066f98545db896deda4b35
|
||||
SHA1 (openwebmail-2.41.tar.gz) = 064e8ab692435d6ab6109470808ad9ca02121aeb
|
||||
|
@ -1,7 +1,6 @@
|
||||
$OpenBSD: patch-cgi-bin_openwebmail_etc_openwebmail_conf_default,v 1.2 2003/07/16 10:32:14 kevlo Exp $
|
||||
--- cgi-bin/openwebmail/etc/openwebmail.conf.default.orig Mon Jun 16 16:10:06 2003
|
||||
+++ cgi-bin/openwebmail/etc/openwebmail.conf.default Wed Jul 16 18:00:15 2003
|
||||
@@ -47,11 +47,11 @@ savedsuid_support yes
|
||||
--- cgi-bin/openwebmail/etc/defaults/openwebmail.conf.orig Mon Nov 15 13:41:37 2004
|
||||
+++ cgi-bin/openwebmail/etc/defaults/openwebmail.conf Mon Nov 15 13:42:42 2004
|
||||
@@ -47,11 +47,11 @@
|
||||
##############################################################################
|
||||
# openwebmail system configuration
|
||||
##############################################################################
|
||||
|
@ -1,11 +1,11 @@
|
||||
$OpenBSD: patch-cgi-bin_openwebmail_openwebmail-main_pl,v 1.5 2004/07/12 05:54:53 kevlo Exp $
|
||||
--- cgi-bin/openwebmail/openwebmail-main.pl.orig Tue May 25 17:53:48 2004
|
||||
+++ cgi-bin/openwebmail/openwebmail-main.pl Mon Jul 12 10:54:24 2004
|
||||
$OpenBSD: patch-cgi-bin_openwebmail_openwebmail-main_pl,v 1.6 2004/11/21 17:01:45 naddy Exp $
|
||||
--- cgi-bin/openwebmail/openwebmail-main.pl.orig Fri Nov 12 10:37:28 2004
|
||||
+++ cgi-bin/openwebmail/openwebmail-main.pl Fri Nov 12 10:39:57 2004
|
||||
@@ -1,14 +1,14 @@
|
||||
-#!/usr/bin/suidperl -T
|
||||
+#!/usr/bin/perl
|
||||
#
|
||||
# openwebmail-main.pl - message list browing program
|
||||
# openwebmail-main.pl - message list browsing program
|
||||
#
|
||||
|
||||
use vars qw($SCRIPT_DIR);
|
||||
@ -18,4 +18,4 @@ $OpenBSD: patch-cgi-bin_openwebmail_openwebmail-main_pl,v 1.5 2004/07/12 05:54:5
|
||||
+if ($SCRIPT_DIR eq '') { print "Content-type: text/html\n\nSCRIPT_DIR not set in %%SYSCONFDIR%%/openwebmail/openwebmail_path.conf !\n"; exit 0; }
|
||||
push (@INC, $SCRIPT_DIR);
|
||||
|
||||
foreach (qw(PATH ENV BASH_ENV CDPATH IFS TERM)) { $ENV{$_}='' } # secure ENV
|
||||
foreach (qw(ENV BASH_ENV CDPATH IFS TERM)) {delete $ENV{$_}}; $ENV{PATH}='/bin:/usr/bin'; # secure ENV
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-cgi-bin_openwebmail_openwebmail-tool_pl,v 1.7 2004/07/12 05:54:53 kevlo Exp $
|
||||
--- cgi-bin/openwebmail/openwebmail-tool.pl.orig Tue May 25 17:53:48 2004
|
||||
+++ cgi-bin/openwebmail/openwebmail-tool.pl Mon Jul 12 10:38:54 2004
|
||||
$OpenBSD: patch-cgi-bin_openwebmail_openwebmail-tool_pl,v 1.8 2004/11/21 17:01:46 naddy Exp $
|
||||
--- cgi-bin/openwebmail/openwebmail-tool.pl.orig Fri Nov 12 10:37:33 2004
|
||||
+++ cgi-bin/openwebmail/openwebmail-tool.pl Fri Nov 12 10:56:16 2004
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/suidperl -T
|
||||
+#!/usr/bin/perl
|
||||
@ -22,30 +22,38 @@ $OpenBSD: patch-cgi-bin_openwebmail_openwebmail-tool_pl,v 1.7 2004/07/12 05:54:5
|
||||
+ qq|the first line of file %%SYSCONFDIR%%/openwebmail/openwebmail_path.conf\n\n|.
|
||||
qq|For example, if the script is\n\n|.
|
||||
- qq|/usr/local/www/cgi-bin/openwebmail/openwebmail-tool.pl,\n\n|.
|
||||
- qq|then the content of /etc/openwebmail_path.conf should be:\n\n|.
|
||||
- qq|/usr/local/www/cgi-bin/openwebmail/\n\n|;
|
||||
+ qq|/var/www/cgi-bin/openwebmail/openwebmail-tool.pl,\n\n|.
|
||||
+ qq|then the content of %%SYSCONFDIR%%/openwebmail/openwebmail_path.conf should be:\n\n|.
|
||||
qq|then the content of /etc/openwebmail_path.conf should be:\n\n|.
|
||||
- qq|/usr/local/www/cgi-bin/openwebmail/\n\n|;
|
||||
+ qq|/var/www/cgi-bin/openwebmail/\n\n|;
|
||||
exit 0;
|
||||
}
|
||||
push (@INC, $SCRIPT_DIR);
|
||||
@@ -306,10 +306,10 @@
|
||||
@@ -228,7 +228,7 @@
|
||||
|
||||
my $err=do_test(1);
|
||||
if ($err<0) {
|
||||
- print qq|And execute '$SCRIPT_DIR/openwebmail-tool.pl --init' again!\n\n|.
|
||||
+ print qq|And execute '%%SYSCONFDIR%%/openwebmail/openwebmail-tool.pl --init' again!\n\n|.
|
||||
qq|ps: If you are running openwebmail in persistent mode,\n|.
|
||||
qq| don't forget to 'touch openwebmail*.pl', so speedycgi\n|.
|
||||
qq| will reload all scripts, modules and conf files in --init.\n\n|;
|
||||
@@ -309,10 +309,10 @@
|
||||
my $err=0;
|
||||
print "\n";
|
||||
|
||||
- load_owconf(\%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf.default");
|
||||
- load_owconf(\%config_raw, "$SCRIPT_DIR/etc/defaults/openwebmail.conf");
|
||||
- if ( -f "$SCRIPT_DIR/etc/openwebmail.conf") {
|
||||
- read_owconf(\%config, \%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf");
|
||||
- print "D readconf $SCRIPT_DIR/etc/openwebmail.conf\n" if ($opt{'debug'});
|
||||
+ load_owconf(\%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf.default");
|
||||
+ load_owconf(\%config_raw, "%%SYSCONFDIR%%/openwebmail/defaults/openwebmail.conf");
|
||||
+ if ( -f "%%SYSCONFDIR%%/openwebmail/openwebmail.conf") {
|
||||
+ read_owconf(\%config, \%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf");
|
||||
+ print "D readconf %%SYSCONFDIR%%/openwebmail/openwebmail.conf\n" if ($opt{'debug'});
|
||||
}
|
||||
|
||||
$logindomain=$default_logindomain||ow::tool::hostname();
|
||||
@@ -409,7 +409,7 @@
|
||||
@@ -412,7 +412,7 @@
|
||||
}
|
||||
|
||||
if ($in_init && $err) {
|
||||
@ -54,7 +62,7 @@ $OpenBSD: patch-cgi-bin_openwebmail_openwebmail-tool_pl,v 1.7 2004/07/12 05:54:5
|
||||
qq|dbm_ext \t$str{conf_dbm_ext}\n|.
|
||||
qq|dbmopen_ext \t$str{conf_dbmopen_ext}\n|.
|
||||
qq|dbmopen_haslock \t$str{conf_dbmopen_haslock}\n|.
|
||||
@@ -419,7 +419,7 @@
|
||||
@@ -422,7 +422,7 @@
|
||||
qq|dbmopen_haslock \t$str{dbmopen_haslock}\n\n\n|;
|
||||
}
|
||||
if (!$in_init) {
|
||||
@ -63,7 +71,7 @@ $OpenBSD: patch-cgi-bin_openwebmail_openwebmail-tool_pl,v 1.7 2004/07/12 05:54:5
|
||||
qq|dbm_ext \t$str{dbm_ext}\n|.
|
||||
qq|dbmopen_ext \t$str{dbmopen_ext}\n|.
|
||||
qq|dbmopen_haslock \t$str{dbmopen_haslock}\n\n\n|;
|
||||
@@ -436,7 +436,7 @@
|
||||
@@ -439,7 +439,7 @@
|
||||
$>=0;
|
||||
if ($>!=0) {
|
||||
print qq|Your system didn't have saved suid support,\n|.
|
||||
@ -72,45 +80,45 @@ $OpenBSD: patch-cgi-bin_openwebmail_openwebmail-tool_pl,v 1.7 2004/07/12 05:54:5
|
||||
qq|\thas_savedsuid_support no\n\n\n|;
|
||||
return -1;
|
||||
}
|
||||
@@ -520,10 +520,10 @@
|
||||
@@ -523,10 +523,10 @@
|
||||
my $loaded_domain=0;
|
||||
my %userhash=();
|
||||
|
||||
- load_owconf(\%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf.default");
|
||||
- load_owconf(\%config_raw, "$SCRIPT_DIR/etc/defaults/openwebmail.conf");
|
||||
- if ( -f "$SCRIPT_DIR/etc/openwebmail.conf") {
|
||||
- read_owconf(\%config, \%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf");
|
||||
- print "D readconf $SCRIPT_DIR/etc/openwebmail.conf\n" if ($opt{'debug'});
|
||||
+ load_owconf(\%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf.default");
|
||||
+ load_owconf(\%config_raw, "%%SYSCONFDIR%%/openwebmail/defaults/openwebmail.conf");
|
||||
+ if ( -f "%%SYSCONFDIR%%/openwebmail/openwebmail.conf") {
|
||||
+ read_owconf(\%config, \%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf");
|
||||
+ print "D readconf %%SYSCONFDIR%%/openwebmail/openwebmail.conf\n" if ($opt{'debug'});
|
||||
}
|
||||
|
||||
# trap this once now. Let usertool() test it at the domain level later
|
||||
@@ -555,10 +555,10 @@
|
||||
@@ -558,10 +558,10 @@
|
||||
|
||||
foreach $logindomain (@domains) {
|
||||
%config_raw=();
|
||||
- load_owconf(\%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf.default");
|
||||
- load_owconf(\%config_raw, "$SCRIPT_DIR/etc/defaults/openwebmail.conf");
|
||||
- if ( -f "$SCRIPT_DIR/etc/openwebmail.conf") {
|
||||
- read_owconf(\%config, \%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf");
|
||||
- print "D readconf $SCRIPT_DIR/etc/openwebmail.conf\n" if ($opt{'debug'});
|
||||
+ load_owconf(\%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf.default");
|
||||
+ load_owconf(\%config_raw, "%%SYSCONFDIR%%/openwebmail/defaults/openwebmail.conf");
|
||||
+ if ( -f "%%SYSCONFDIR%%/openwebmail/openwebmail.conf") {
|
||||
+ read_owconf(\%config, \%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf");
|
||||
+ print "D readconf %%SYSCONFDIR%%/openwebmail/openwebmail.conf\n" if ($opt{'debug'});
|
||||
}
|
||||
|
||||
if ( -f "$config{'ow_sitesconfdir'}/$logindomain") {
|
||||
@@ -630,16 +630,16 @@
|
||||
@@ -633,16 +633,16 @@
|
||||
$>=$euid_to_use;
|
||||
|
||||
%config_raw=();
|
||||
- load_owconf(\%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf.default");
|
||||
- load_owconf(\%config_raw, "$SCRIPT_DIR/etc/defaults/openwebmail.conf");
|
||||
- if ( -f "$SCRIPT_DIR/etc/openwebmail.conf") {
|
||||
- read_owconf(\%config, \%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf");
|
||||
- print "D readconf $SCRIPT_DIR/etc/openwebmail.conf\n" if ($opt{'debug'});
|
||||
+ load_owconf(\%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf.default");
|
||||
+ load_owconf(\%config_raw, "%%SYSCONFDIR%%/openwebmail/defaults/openwebmail.conf");
|
||||
+ if ( -f "%%SYSCONFDIR%%/openwebmail/openwebmail.conf") {
|
||||
+ read_owconf(\%config, \%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf");
|
||||
+ print "D readconf %%SYSCONFDIR%%/openwebmail/openwebmail.conf\n" if ($opt{'debug'});
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-cgi-bin_openwebmail_openwebmail_pl,v 1.8 2004/07/21 00:26:11 kevlo Exp $
|
||||
--- cgi-bin/openwebmail/openwebmail.pl.orig Tue Jul 20 18:24:51 2004
|
||||
+++ cgi-bin/openwebmail/openwebmail.pl Wed Jul 21 08:14:47 2004
|
||||
$OpenBSD: patch-cgi-bin_openwebmail_openwebmail_pl,v 1.9 2004/11/21 17:01:46 naddy Exp $
|
||||
--- cgi-bin/openwebmail/openwebmail.pl.orig Fri Nov 12 10:37:38 2004
|
||||
+++ cgi-bin/openwebmail/openwebmail.pl Fri Nov 12 14:11:33 2004
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/suidperl -T
|
||||
+#!/usr/bin/perl
|
||||
@ -19,14 +19,14 @@ $OpenBSD: patch-cgi-bin_openwebmail_openwebmail_pl,v 1.8 2004/07/21 00:26:11 kev
|
||||
+if ($SCRIPT_DIR eq '') { print "Content-type: text/html\n\nSCRIPT_DIR not set in %%SYSCONFDIR%%/openwebmail/openwebmail_path.conf !\n"; exit 0; }
|
||||
push (@INC, $SCRIPT_DIR);
|
||||
|
||||
foreach (qw(PATH ENV BASH_ENV CDPATH IFS TERM)) { $ENV{$_}='' } # secure ENV
|
||||
foreach (qw(ENV BASH_ENV CDPATH IFS TERM)) {delete $ENV{$_}}; $ENV{PATH}='/bin:/usr/bin'; # secure ENV
|
||||
@@ -63,8 +63,8 @@
|
||||
$SIG{PIPE}=\&openwebmail_exit; # for user stop
|
||||
$SIG{TERM}=\&openwebmail_exit; # for user stop
|
||||
|
||||
-load_owconf(\%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf.default");
|
||||
-load_owconf(\%config_raw, "$SCRIPT_DIR/etc/defaults/openwebmail.conf");
|
||||
-read_owconf(\%config, \%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf") if (-f "$SCRIPT_DIR/etc/openwebmail.conf");
|
||||
+load_owconf(\%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf.default");
|
||||
+load_owconf(\%config_raw, "%%SYSCONFDIR%%/openwebmail/defaults/openwebmail.conf");
|
||||
+read_owconf(\%config, \%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf") if (-f "%%SYSCONFDIR%%/openwebmail/openwebmail.conf");
|
||||
loadlang($config{'default_language'}); # so %lang... can be used in error msg
|
||||
|
||||
@ -40,7 +40,7 @@ $OpenBSD: patch-cgi-bin_openwebmail_openwebmail_pl,v 1.8 2004/07/21 00:26:11 kev
|
||||
my ($fmode, $fuid, $fgid) = (stat($config{'logfile'}))[2,4,5];
|
||||
if ( !($fmode & 0100000) ) {
|
||||
open (LOGFILE,">>$config{'logfile'}") or
|
||||
@@ -230,7 +230,7 @@
|
||||
@@ -251,7 +251,7 @@
|
||||
|
||||
# create domain logfile
|
||||
if ($config{'logfile'}) {
|
||||
@ -49,3 +49,30 @@ $OpenBSD: patch-cgi-bin_openwebmail_openwebmail_pl,v 1.8 2004/07/21 00:26:11 kev
|
||||
my ($fmode, $fuid, $fgid) = (stat($config{'logfile'}))[2,4,5];
|
||||
if ( !($fmode & 0100000) ) {
|
||||
open (LOGFILE,">>$config{'logfile'}") or
|
||||
@@ -322,7 +322,7 @@
|
||||
if (!-d $domainhome) {
|
||||
mkdir($domainhome, 0750);
|
||||
openwebmailerror(__FILE__, __LINE__, "Couldn't create domain homedir $domainhome") if (! -d $domainhome);
|
||||
- my $mailgid=getgrnam('mail');
|
||||
+ my $mailgid=getgrnam('_mail');
|
||||
chown($uuid, $mailgid, $domainhome);
|
||||
}
|
||||
}
|
||||
@@ -383,7 +383,7 @@
|
||||
|
||||
umask(0077);
|
||||
if ( $>==0 ) { # switch to uuid:mailgid if script is setuid root.
|
||||
- my $mailgid=getgrnam('mail'); # for better compatibility with other mail progs
|
||||
+ my $mailgid=getgrnam('_mail'); # for better compatibility with other mail progs
|
||||
ow::suid::set_euid_egids($uuid, $mailgid, split(/\s+/,$ugid));
|
||||
if ( $)!~/\b$mailgid\b/) { # group mail doesn't exist?
|
||||
openwebmailerror(__FILE__, __LINE__, "Set effective gid to mail($mailgid) failed!");
|
||||
@@ -595,7 +595,7 @@
|
||||
writelog("login error - $config{'auth_module'}, ret $errorcode, $errormsg");
|
||||
umask(0077);
|
||||
if ( $>==0 ) { # switch to uuid:mailgid if script is setuid root.
|
||||
- my $mailgid=getgrnam('mail');
|
||||
+ my $mailgid=getgrnam('_mail');
|
||||
ow::suid::set_euid_egids($uuid, $mailgid, split(/\s+/,$ugid));
|
||||
}
|
||||
my $historyfile=ow::tool::untaint(dotpath('history.log'));
|
||||
|
@ -1,13 +1,13 @@
|
||||
$OpenBSD: patch-cgi-bin_openwebmail_shares_ow-shared_pl,v 1.1 2004/03/04 06:34:11 kevlo Exp $
|
||||
--- cgi-bin/openwebmail/shares/ow-shared.pl.orig Thu Mar 4 12:37:54 2004
|
||||
+++ cgi-bin/openwebmail/shares/ow-shared.pl Thu Mar 4 12:38:50 2004
|
||||
@@ -222,14 +222,14 @@
|
||||
$OpenBSD: patch-cgi-bin_openwebmail_shares_ow-shared_pl,v 1.2 2004/11/21 17:01:46 naddy Exp $
|
||||
--- cgi-bin/openwebmail/shares/ow-shared.pl.orig Fri Nov 12 10:38:07 2004
|
||||
+++ cgi-bin/openwebmail/shares/ow-shared.pl Fri Nov 12 14:12:41 2004
|
||||
@@ -231,14 +231,14 @@
|
||||
########## USERENV_INIT ##########################################
|
||||
# init user globals, switch euid
|
||||
sub userenv_init {
|
||||
- load_owconf(\%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf.default");
|
||||
- load_owconf(\%config_raw, "$SCRIPT_DIR/etc/defaults/openwebmail.conf");
|
||||
- read_owconf(\%config, \%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf") if (-f "$SCRIPT_DIR/etc/openwebmail.conf");
|
||||
+ load_owconf(\%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf.default");
|
||||
+ load_owconf(\%config_raw, "%%SYSCONFDIR%%/openwebmail/defaults/openwebmail.conf");
|
||||
+ read_owconf(\%config, \%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf") if (-f "%%SYSCONFDIR%%/openwebmail/openwebmail.conf");
|
||||
loadlang($config{'default_language'}); # so %lang... can be used in error msg
|
||||
|
||||
|
@ -1,51 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: DEINSTALL,v 1.5 2004/04/14 14:24:35 xsa Exp $
|
||||
#
|
||||
# De-installation setup of openwebmail
|
||||
|
||||
# exit on errors, use a sane path and install prefix
|
||||
#
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/var/www}
|
||||
CONFIG_DIR=${CONFDIR}/openwebmail
|
||||
|
||||
# Function: tell the user what they need to do to delete the port completely
|
||||
#
|
||||
do_notice()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| To completely deinstall the $1 package"
|
||||
echo "| you need to perform these steps as root:"
|
||||
echo "|"
|
||||
echo "| groupdel _mail"
|
||||
echo "| rm -rf ${CONFIG_DIR}"
|
||||
echo "|"
|
||||
echo "| Do not do this if you plan on re-installing"
|
||||
echo "| $1 at some future time."
|
||||
echo "+---------------"
|
||||
echo
|
||||
}
|
||||
|
||||
# Verify proper execution
|
||||
#
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "usage: $0 distname DEINSTALL" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verify/process the command
|
||||
#
|
||||
case $2 in
|
||||
DEINSTALL)
|
||||
if [ ${PKG_DELETE_EXTRA} != Yes -a -e ${CONFIG_DIR} ]; then
|
||||
do_notice "$1"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 distname DEINSTALL" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -1,101 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: INSTALL,v 1.12 2004/06/24 03:33:15 brad Exp $
|
||||
#
|
||||
# Pre/post-installation setup of openwebmail
|
||||
|
||||
# exit on errors, use a sane path and install prefix
|
||||
#
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/var/www}
|
||||
CONFIG_DIR=${CONFDIR}/openwebmail
|
||||
CONFIG_FILE=$CONFIG_DIR/openwebmail.conf
|
||||
CGI_DIR=${PREFIX}/cgi-bin/openwebmail
|
||||
SAMPLE_CONFIG_FILE=$CONFIG_FILE.default
|
||||
SCRIPTFILES="openwebmail-abook.pl openwebmail-advsearch.pl openwebmail-cal.pl \
|
||||
openwebmail-folder.pl openwebmail-main.pl openwebmail-prefs.pl \
|
||||
openwebmail-read.pl openwebmail-send.pl openwebmail-spell.pl \
|
||||
openwebmail-tool.pl openwebmail-vdomain.pl openwebmail-viewatt.pl \
|
||||
openwebmail-webdisk.pl openwebmail.pl"
|
||||
OPENWEBMAILGROUP=_mail
|
||||
ID=524
|
||||
|
||||
# Function: set up _mail group
|
||||
#
|
||||
do_accts()
|
||||
{
|
||||
groupinfo -e $OPENWEBMAILGROUP
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "===> Using $OPENWEBMAILGROUP group for openwebmail"
|
||||
else
|
||||
echo "===> Creating $OPENWEBMAILGROUP group for openwebmail"
|
||||
groupadd -g $ID $OPENWEBMAILGROUP
|
||||
fi
|
||||
}
|
||||
|
||||
# Function: tell the user what they need to do to use the port just installed
|
||||
#
|
||||
do_notice()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| The existing $1 configuration file,"
|
||||
echo "| $CONFIG_FILE,"
|
||||
echo "| has NOT been changed. You may want to"
|
||||
echo "| compare it to the current sample file"
|
||||
echo "| $SAMPLE_CONFIG_FILE"
|
||||
echo "| and update your configuration as needed."
|
||||
echo "+---------------"
|
||||
echo
|
||||
}
|
||||
|
||||
# Function: install configuration files
|
||||
#
|
||||
do_install()
|
||||
{
|
||||
chgrp -R $OPENWEBMAILGROUP $CGI_DIR/*
|
||||
for file in $SCRIPTFILES
|
||||
do
|
||||
chmod 4555 $CGI_DIR/$file
|
||||
done
|
||||
chmod 771 $CONFIG_DIR/{sessions,users}
|
||||
chgrp -R $OPENWEBMAILGROUP $CONFIG_DIR
|
||||
install -o root -g $OPENWEBMAILGROUP -m 644 $SAMPLE_CONFIG_FILE $CONFIG_FILE
|
||||
echo "/var/www/cgi-bin/openwebmail/" | cat > $CONFIG_DIR/openwebmail_path.conf
|
||||
perl $CGI_DIR/openwebmail-tool.pl --init --no
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| The $1 configuration file,"
|
||||
echo "| $CONFIG_FILE,"
|
||||
echo "| has been installed. Please view this file and"
|
||||
echo "| change the configuration to meet your needs."
|
||||
echo "+---------------"
|
||||
echo
|
||||
}
|
||||
|
||||
# Verify proper execution
|
||||
#
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verify/process the command
|
||||
#
|
||||
case $2 in
|
||||
PRE-INSTALL)
|
||||
do_accts
|
||||
;;
|
||||
POST-INSTALL)
|
||||
if [ -f ${CONFIG_FILE} ]; then
|
||||
do_notice "$1"
|
||||
else
|
||||
do_install "$1"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user