network/squirrelmail: Added (forever green webmail).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Jan F. Chadima 2020-02-23 22:05:31 +07:00 committed by Willy Sudiarto Raharjo
parent fefbe4a9d9
commit 112941cc72
9 changed files with 449 additions and 0 deletions

View File

@ -0,0 +1,8 @@
quirrelMail is a project that provides both a web-based email client
and a proxy server for the IMAP protocol. SquirrelMail webmail is available
for any platform supporting PHP. The SquirrelMail webmail client itself is a
complete webmail system, but extra features are available in the form of
plugins. There are over 200 third-party plugins available for download from
the SquirrelMail website and SquirrelMail ships with several "standard" or
"core" plugins. SquirrelMail webmail has been translated into over 50
languages.

View File

@ -0,0 +1,177 @@
<?php
/**
* SquirrelMail Configuration File
* Created using the configure script, conf.pl
*/
global $version;
$config_version = '1.4.0';
$config_use_color = 1;
$org_name = "SquirrelMail";
$org_logo = SM_PATH . 'images/sm_logo.png';
$org_logo_width = '308';
$org_logo_height = '111';
$org_title = "SquirrelMail $version";
$signout_page = '';
$frame_top = '_top';
$provider_uri = 'http://squirrelmail.org/';
$provider_name = 'SquirrelMail';
$motd = "";
$squirrelmail_default_language = 'en_US';
$domain = 'localhost';
$imapServerAddress = 'localhost';
$imapPort = 143;
$useSendmail = true;
$smtpServerAddress = 'localhost';
$smtpPort = 25;
$sendmail_path = '/usr/sbin/sendmail';
$pop_before_smtp = false;
$imap_server_type = 'uw';
$invert_time = false;
$optional_delimiter = '/';
$default_folder_prefix = 'mail/';
$trash_folder = 'Trash';
$sent_folder = 'Sent';
$draft_folder = 'Drafts';
$default_move_to_trash = true;
$default_move_to_sent = true;
$default_save_as_draft = true;
$show_prefix_option = true;
$list_special_folders_first = true;
$use_special_folder_color = true;
$auto_expunge = true;
$default_sub_of_inbox = false;
$show_contain_subfolders_option = true;
$default_unseen_notify = 2;
$default_unseen_type = 1;
$auto_create_special = true;
$delete_folder = false;
$noselect_fix_enable = false;
$default_charset = 'utf-8';
$data_dir = '/var/lib/squirrelmail/prefs/';
$attachment_dir = '/var/spool/squirrelmail/attach/';
$dir_hash_level = 0;
$default_left_size = '150';
$force_username_lowercase = false;
$default_use_priority = true;
$hide_sm_attributions = false;
$default_use_mdn = true;
$edit_identity = true;
$edit_name = true;
$allow_thread_sort = true;
$allow_server_sort = true;
$allow_charset_search = true;
$uid_support = true;
$plugins[0] = 'delete_move_next';
$plugins[1] = 'squirrelspell';
$plugins[2] = 'newmail';
$theme_css = '';
$theme_default = 0;
$theme[0]['PATH'] = SM_PATH . 'themes/default_theme.php';
$theme[0]['NAME'] = 'Default';
$theme[1]['PATH'] = SM_PATH . 'themes/plain_blue_theme.php';
$theme[1]['NAME'] = 'Plain Blue';
$theme[2]['PATH'] = SM_PATH . 'themes/sandstorm_theme.php';
$theme[2]['NAME'] = 'Sand Storm';
$theme[3]['PATH'] = SM_PATH . 'themes/deepocean_theme.php';
$theme[3]['NAME'] = 'Deep Ocean';
$theme[4]['PATH'] = SM_PATH . 'themes/slashdot_theme.php';
$theme[4]['NAME'] = 'Slashdot';
$theme[5]['PATH'] = SM_PATH . 'themes/purple_theme.php';
$theme[5]['NAME'] = 'Purple';
$theme[6]['PATH'] = SM_PATH . 'themes/forest_theme.php';
$theme[6]['NAME'] = 'Forest';
$theme[7]['PATH'] = SM_PATH . 'themes/ice_theme.php';
$theme[7]['NAME'] = 'Ice';
$theme[8]['PATH'] = SM_PATH . 'themes/seaspray_theme.php';
$theme[8]['NAME'] = 'Sea Spray';
$theme[9]['PATH'] = SM_PATH . 'themes/bluesteel_theme.php';
$theme[9]['NAME'] = 'Blue Steel';
$theme[10]['PATH'] = SM_PATH . 'themes/dark_grey_theme.php';
$theme[10]['NAME'] = 'Dark Grey';
$theme[11]['PATH'] = SM_PATH . 'themes/high_contrast_theme.php';
$theme[11]['NAME'] = 'High Contrast';
$theme[12]['PATH'] = SM_PATH . 'themes/black_bean_burrito_theme.php';
$theme[12]['NAME'] = 'Black Bean Burrito';
$theme[13]['PATH'] = SM_PATH . 'themes/servery_theme.php';
$theme[13]['NAME'] = 'Servery';
$theme[14]['PATH'] = SM_PATH . 'themes/maize_theme.php';
$theme[14]['NAME'] = 'Maize';
$theme[15]['PATH'] = SM_PATH . 'themes/bluesnews_theme.php';
$theme[15]['NAME'] = 'BluesNews';
$theme[16]['PATH'] = SM_PATH . 'themes/deepocean2_theme.php';
$theme[16]['NAME'] = 'Deep Ocean 2';
$theme[17]['PATH'] = SM_PATH . 'themes/blue_grey_theme.php';
$theme[17]['NAME'] = 'Blue Grey';
$theme[18]['PATH'] = SM_PATH . 'themes/dompie_theme.php';
$theme[18]['NAME'] = 'Dompie';
$theme[19]['PATH'] = SM_PATH . 'themes/methodical_theme.php';
$theme[19]['NAME'] = 'Methodical';
$theme[20]['PATH'] = SM_PATH . 'themes/greenhouse_effect.php';
$theme[20]['NAME'] = 'Greenhouse Effect (Changes)';
$theme[21]['PATH'] = SM_PATH . 'themes/in_the_pink.php';
$theme[21]['NAME'] = 'In The Pink (Changes)';
$theme[22]['PATH'] = SM_PATH . 'themes/kind_of_blue.php';
$theme[22]['NAME'] = 'Kind of Blue (Changes)';
$theme[23]['PATH'] = SM_PATH . 'themes/monostochastic.php';
$theme[23]['NAME'] = 'Monostochastic (Changes)';
$theme[24]['PATH'] = SM_PATH . 'themes/shades_of_grey.php';
$theme[24]['NAME'] = 'Shades of Grey (Changes)';
$theme[25]['PATH'] = SM_PATH . 'themes/spice_of_life.php';
$theme[25]['NAME'] = 'Spice of Life (Changes)';
$theme[26]['PATH'] = SM_PATH . 'themes/spice_of_life_lite.php';
$theme[26]['NAME'] = 'Spice of Life - Lite (Changes)';
$theme[27]['PATH'] = SM_PATH . 'themes/spice_of_life_dark.php';
$theme[27]['NAME'] = 'Spice of Life - Dark (Changes)';
$theme[28]['PATH'] = SM_PATH . 'themes/christmas.php';
$theme[28]['NAME'] = 'Holiday - Christmas';
$theme[29]['PATH'] = SM_PATH . 'themes/darkness.php';
$theme[29]['NAME'] = 'Darkness (Changes)';
$theme[30]['PATH'] = SM_PATH . 'themes/random.php';
$theme[30]['NAME'] = 'Random (Changes every login)';
$theme[31]['PATH'] = SM_PATH . 'themes/midnight.php';
$theme[31]['NAME'] = 'Midnight';
$theme[32]['PATH'] = SM_PATH . 'themes/alien_glow.php';
$theme[32]['NAME'] = 'Alien Glow';
$theme[33]['PATH'] = SM_PATH . 'themes/dark_green.php';
$theme[33]['NAME'] = 'Dark Green';
$theme[34]['PATH'] = SM_PATH . 'themes/penguin.php';
$theme[34]['NAME'] = 'Penguin';
$default_use_javascript_addr_book = false;
$addrbook_dsn = '';
$addrbook_table = 'address';
$prefs_dsn = '';
$prefs_table = 'userprefs';
$prefs_user_field = 'user';
$prefs_key_field = 'prefkey';
$prefs_val_field = 'prefval';
$no_list_for_subscribe = false;
$smtp_auth_mech = 'none';
$imap_auth_mech = 'login';
$use_imap_tls = false;
$use_smtp_tls = false;
$session_name = 'SQMSESSID';
@include SM_PATH . 'config/config_local.php';
/**
* Make sure there are no characters after the PHP closing
* tag below (including newline characters and whitespace).
* Otherwise, that character will cause the headers to be
* sent and regular output to begin, which will majorly screw
* things up when we try to send more headers later.
*/
?>

View File

@ -0,0 +1,18 @@
<?php
/**
* Local config overrides.
*
* You can override the config.php settings here.
* Don't do it unless you know what you're doing.
* Use standard PHP syntax, see config.php for examples.
*
* @copyright &copy; 2002-2006 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
* @subpackage config
*/
$default_folder_prefix = '';
?>

View File

@ -0,0 +1,2 @@
chown apache:apache /var/lib/squirrelmail/prefs /var/spool/squirrelmail/attach
chmod 0700 /var/lib/squirrelmail/prefs /var/spool/squirrelmail/attach

View File

@ -0,0 +1,18 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
squirrelmail: squirrelmail (forever green webmail)
squirrelmail:
squirrelmail: SquirrelMail is a project that provides both a web-based email client
squirrelmail: and a proxy server for the IMAP protocol.
squirrelmail:
squirrelmail:
squirrelmail:
squirrelmail:
squirrelmail:
squirrelmail:

View File

@ -0,0 +1,173 @@
#!/bin/sh
# Slackware build script for squirrelmail
# Copyright 2020 Jan F. Chadima <jfch@jagda.eu>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=squirrelmail
VERSION=${VERSION:-1.4.22}
LOCALEVERSION=${LOCALEVERSION:-1.4.18-20090526}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
SRCNAM="squirrelmail-webmail"
ARCH=noarch
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
rm -rf $PKG
mkdir -p $PKG/usr/share $OUTPUT
cd $PKG/usr/share
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
mv $SRCNAM* $PRGNAM
cd $PRGNAM
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p $PKG/usr/doc/
mv doc $PKG/usr/doc/$PRGNAM-$VERSION
mv plugins/README.plugins $PKG/usr/doc/$PRGNAM-$VERSION
mv locale/README.locales $PKG/usr/doc/$PRGNAM-$VERSION
mv themes/README.themes $PKG/usr/doc/$PRGNAM-$VERSION
rm -f $PKG/usr/doc/$PRGNAM-$VERSION/.htaccess
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/etc/httpd/extra
cat $CWD/squirrelmail.conf > $PKG/etc/httpd/extra/squirrelmail.conf
rm -rf $TMP/squireelmail-locales
mkdir $TMP/squireelmail-locales
cd $TMP/squireelmail-locales
tar xf $CWD/locales-$LOCALEVERSION-src.tar.gz
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
#use utf-8 by default
for LOCALE in $(ls locale/) ; do
SKIPINVALID=
case $LOCALE in
ja_JP)
CHARSET=euc-jp
;;
ko_KR)
SKIPINVALID=-c
CHARSET=$(grep CHARSET locale/$LOCALE/setup.php | \
cut -f6 -d\')
;;
*)
CHARSET=$(grep CHARSET locale/$LOCALE/setup.php | \
cut -f6 -d\')
;;
esac
grep LOCALE locale/$LOCALE/setup.php | grep -vi $CHARSET || true
if [ "$CHARSET" != utf-8 -a "$CHARSET" != UTF-8 ] ; then
for a in $(ls help/$LOCALE/ 2>/dev/null) ; do
if [ "$LOCALE" == "ja_JP" ] ; then continue ; fi
iconv $SKIPINVALID -f $CHARSET -t utf-8 \
help/$LOCALE/$a > $a.new && \
mv $a.new help/$LOCALE/$a
done
sed -e "s/CHARSET..[ ]*= [^;]*;/CHARSET'] = 'utf-8';/" \
-e "s/LOCALE..[ ]*= [^;]*;/LOCALE'] = '$LOCALE.UTF-8';/" \
locale/$LOCALE/setup.php > \
setup.php.new && \
mv setup.php.new locale/$LOCALE/setup.php
fi
done
for POFILE in $(find locale -name \*.po) ; do
CHARSET=$(grep charset= $POFILE | cut -f2 -d= | cut -f1 -d\\)
if [ "$CHARSET" != utf-8 -a "$CHARSET" != UTF-8 ]; then
sed s/charset=$CHARSET/charset=utf-8/ $POFILE | \
iconv -f $CHARSET -t utf-8 > $POFILE.new && \
mv $POFILE.new $POFILE
fi
done
for POFILE in $(find . -name \*.po) ; do
msgfmt $POFILE -c -o $(echo $POFILE | sed s/\.po\$/.mo/)
done
find locale -name \*.mo | cpio -pduv $PKG/usr/share/squirrelmail/
cp -r images/* $PKG/usr/share/squirrelmail/images/
cp -r help/* $PKG/usr/share/squirrelmail/help/
cd $PKG/usr/share/squirrelmail
sed -i 's/^ *\($default_charset *=\).*$/'"\1 'utf-8';/" \
config/config_default.php
sed -i functions/i18n.php \
-e "s/^\(\$languages\['\([^']*\)'\]\['CHARSET'].*= '\)\([^']*\)';/\1utf-8';/" \
-e "s/^\(\$languages\['\([^']*\)'\]\['LOCALE'].*=\).*/\1 '\2.UTF-8';/"
rm -f plugins/make_archive.pl
mkdir -p $PKG/etc/squirrelmail
cp $CWD/config.php $PKG/etc/squirrelmail/config.php
ln -sf /etc/squirrelmail/config.php config/config.php
cp $CWD/config_local.php $PKG/etc/squirrelmail/config_local.php
ln -sf /etc/squirrelmail/config_local.php config/config_local.php
mv plugins/squirrelspell/sqspell_config.php \
$PKG/etc/squirrelmail/sqspell_config.php
ln -sf /etc/squirrelmail/sqspell_config.php \
plugins/squirrelspell/sqspell_config.php
mv data/default_pref $PKG/etc/squirrelmail/default_pref
mkdir -p $PKG/var/lib/squirrelmail/prefs
ln -sf /etc/squirrelmail/default_pref \
$PKG/var/lib/squirrelmail/prefs/default_pref
mkdir -p $PKG/var/spool/squirrelmail/attach
mkdir -p $PKG/etc/cron.daily
cp $CWD/squirrelmail.cron $PKG/etc/cron.daily/squirrelmail
chmod +x $PKG/etc/cron.daily/squirrelmail
rm -rf contrib data po README configure plugins/demo
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View File

@ -0,0 +1,36 @@
#
# SquirrelMail is a webmail package written in PHP.
#
Alias /webmail /usr/share/squirrelmail
<Directory "/usr/share/squirrelmail/plugins/squirrelspell/modules">
<IfModule mod_authz_core.c>
# Apache 2.4
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Deny from all
</IfModule>
</Directory>
# this section makes squirrelmail use https connections only, for this you
# need to have mod_ssl installed. If you want to use unsecure http
# connections, just remove this section:
<Directory /usr/share/squirrelmail>
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order allow,deny
Allow from all
</IfModule>
</Directory>

View File

@ -0,0 +1,5 @@
#!/bin/sh
find /var/spool/squirrelmail/attach/ -type f -mtime +30 -print0 |
xargs -0 rm -f >/dev/null 2>&1

View File

@ -0,0 +1,12 @@
PRGNAM="squirrelmail"
VERSION="1.4.22"
HOMEPAGE="https://squirrelmail.sourceforge.net"
DOWNLOAD="https://downloads.sourceforge.net/project/squirrelmail/stable/1.4.22/squirrelmail-webmail-1.4.22.tar.gz
https://sourceforge.net/projects/squirrelmail/files/locales/1.4.18-20090526/locales-1.4.18-20090526-src.tar.gz"
MD5SUM="ae9e2bc7f4fa58162b6152fcb0cbb3a5
fc5258ad981f866844955e27a0fb9b67"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Jan F. Chadima"
EMAIL="jfch@jagda.eu"