Hello,
Many of us know that Uebimiau is EOL (end of life) and not secure application, that's why I was working on its alternative Telaen and today I can give you the script to install it. The code is based on the well known webmail interface - Uebimiau.
For anyone who wants to install Telaen please use the following script:
Many of us know that Uebimiau is EOL (end of life) and not secure application, that's why I was working on its alternative Telaen and today I can give you the script to install it. The code is based on the well known webmail interface - Uebimiau.
For anyone who wants to install Telaen please use the following script:
Code:
#!/bin/sh
# This script is written by Martynas Bendorius and DirectAdmin
# It is used to install Telaen webmail into DirectAdmin servers
# Official Telaen webmail page: http://www.telaen.org
VER=1.3.1
FILENAME=telaen_${VER}
REMOTE_FILE=http://hivelocity.dl.sourceforge.net/sourceforge/telaen/${FILENAME}.tgz
FILE=/usr/local/directadmin/scripts/packages/${FILENAME}.tgz;
DEST=/var/www/html;
REALPATH=${DEST}/${FILENAME};
ALIASPATH=${DEST}/telaen
TMPDIR=${REALPATH}/telaen/database
SMARTYDIR=`perl -le'print map+(A..Z,a..z,0..9)[rand 62],0..7'`;
if [ -e /etc/httpd/conf/exta/httpd-alias.conf ]; then
HTTPDCONF=/etc/httpd/conf/exta/httpd-alias.conf
else
HTTPDCONF=/etc/httpd/conf/httpd.conf
fi
OS=`uname`
TAR=/bin/tar
MKDIR=/bin/mkdir
CHMOD=/bin/chmod
CHOWN=/bin/chown
if [ "$OS" = "FreeBSD" ]; then
TAR=/usr/bin/tar
CHOWN=/usr/sbin/chown
fi
if [ ! -e ${FILE} ]; then
wget -O $FILE $REMOTE_FILE
fi
if [ ! -e ${FILE} ]; then
echo "Unable to find ${FILE}, make sure it exists.";
exit 1;
fi
$TAR xzf ${FILE} -C ${DEST}
if [ -d ${ALIASPATH}/database ]; then
cp -Rp ${ALIASPATH}/database ${REALPATH}
fi
#link it from a fake path:
/bin/rm -f ${ALIASPATH}
ln -sf ${REALPATH}/telaen ${ALIASPATH}
mv ${REALPATH}/smarty_move_me ${REALPATH}/${SMARTYDIR}
cp ${REALPATH}/telaen/inc/config.php.default ${REALPATH}/telaen/inc/config.php
cp ${REALPATH}/telaen/inc/config.security.php.default ${REALPATH}/telaen/inc/config.security.php
cp ${REALPATH}/telaen/inc/config.languages.php.default ${REALPATH}/telaen/inc/config.languages.php
$CHOWN -f -R webapps:webapps ${REALPATH};
if [ ! -d $TMPDIR ]; then
$MKDIR -p $TMPDIR;
fi
$CHMOD -f -R 700 $TMPDIR;
$CHOWN -f -R apache:apache $TMPDIR;
if [ ! -e $TMPDIR/.htaccess ]; then
echo "Deny from All" >> $TMPDIR/.htaccess
fi
#editing configs
/usr/bin/perl -pi -e "s|/some/place/safe/smarty/|/var/www/html/${FILENAME}/${SMARTYDIR}/|" ${REALPATH}/telaen/inc/config.php > /dev/null
#writing alias to httpd.conf
COUNTALIAS=`grep -c -e "Alias /telaen" ${HTTPDCONF}`
if [ "${COUNTALIAS}" = "0" ]; then
echo "Adding telaen alias to ${HTTPDCONF}"
echo "" >> ${HTTPDCONF}
echo "# Alias for Telaen webmail" >> ${HTTPDCONF}
echo "Alias /telaen ${ALIASPATH}/" >> ${HTTPDCONF}
echo "" >> ${HTTPDCONF}
echo "You need to restart the httpd service if you want alias to work."
fi
Last edited: