mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-04-01 21:27:22 +02:00
more readable bash
This commit is contained in:
@@ -1,20 +1,23 @@
|
||||
# Webmail: Using roundcube
|
||||
##########################
|
||||
# Webmail with Roundcube
|
||||
# ----------------------
|
||||
|
||||
source setup/functions.sh # load our functions
|
||||
source /etc/mailinabox.conf # load global vars
|
||||
|
||||
# Ubuntu's roundcube-core has dependencies on Apache & MySQL, which we don't want, so we can't
|
||||
# install roundcube directly via apt-get install.
|
||||
# ### Installing Roundcube
|
||||
|
||||
# We install Roundcube from sources, rather than from Ubuntu, because:
|
||||
#
|
||||
# Additionally, the Roundcube shipped with Ubuntu is consistently out of date.
|
||||
# 1. Ubuntu's `roundcube-core` package has dependencies on Apache & MySQL, which we don't want.
|
||||
#
|
||||
# And it's packaged incorrectly --- it seems to be missing a directory of files.
|
||||
# 2. The Roundcube shipped with Ubuntu is consistently out of date.
|
||||
#
|
||||
# 3. It's packaged incorrectly --- it seems to be missing a directory of files.
|
||||
#
|
||||
# So we'll use apt-get to manually install the dependencies of roundcube that we know we need,
|
||||
# and then we'll manually install roundcube from source.
|
||||
|
||||
# These dependencies are from 'apt-cache showpkg roundcube-core'.
|
||||
# These dependencies are from `apt-cache showpkg roundcube-core`.
|
||||
apt_install \
|
||||
dbconfig-common \
|
||||
php5 php5-sqlite php5-mcrypt php5-intl php5-json php5-common php-auth php-net-smtp php-net-socket php-net-sieve php-mail-mime php-crypt-gpg php5-gd php5-pspell \
|
||||
@@ -35,6 +38,8 @@ if [ ! -d /usr/local/lib/roundcubemail ]; then
|
||||
rm -f /tmp/roundcube.tgz
|
||||
fi
|
||||
|
||||
# ### Configuring Roundcube
|
||||
|
||||
# Generate a safe 24-character secret key of safe characters.
|
||||
SECRET_KEY=$(dd if=/dev/random bs=1 count=18 2>/dev/null | base64 | fold -w 24 | head -n 1)
|
||||
|
||||
@@ -43,7 +48,7 @@ SECRET_KEY=$(dd if=/dev/random bs=1 count=18 2>/dev/null | base64 | fold -w 24 |
|
||||
# For security, temp and log files are not stored in the default locations
|
||||
# which are inside the roundcube sources directory. We put them instead
|
||||
# in normal places.
|
||||
cat - > /usr/local/lib/roundcubemail/config/config.inc.php <<EOF;
|
||||
cat > /usr/local/lib/roundcubemail/config/config.inc.php <<EOF;
|
||||
<?php
|
||||
/*
|
||||
* Do not edit. Written by Mail-in-a-Box. Regenerated on updates.
|
||||
|
||||
Reference in New Issue
Block a user