Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
cc8e1fa7
Commit
cc8e1fa7
authored
Aug 11, 2014
by
jkaberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set working dir for composer
parent
d53cb88a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
104 deletions
+1
-104
owncloud.sh
setup/owncloud.sh
+1
-1
webmail.sh
setup/webmail.sh
+0
-103
No files found.
setup/owncloud.sh
View file @
cc8e1fa7
...
...
@@ -43,7 +43,7 @@ cat - > /usr/local/lib/owncloud/config/config.php <<EOF;
\)
;
EOF
# Insert the following above (owncloud config generation) when we found a good solution:
#
TODO:
Insert the following above (owncloud config generation) when we found a good solution:
# 'mail_smtpmode' => 'smtp',
# 'mail_smtpsecure' => 'ssl',
# 'mail_from_address' => '**** need to figure this one out, nornamly: <user>@<domain>.<tld> ****',
...
...
setup/webmail.sh
deleted
100755 → 0
View file @
d53cb88a
# Webmail: Using 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.
#
# Additionally, the Roundcube shipped with Ubuntu is consistently out of date.
#
# And 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'.
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
\
tinymce libjs-jquery libjs-jquery-mousewheel libmagic1
# We used to install Roundcube from Ubuntu, without triggering the dependencies
# on Apache and MySQL, by downloading the debs and installing them manually.
# Now that we're beyond that, get rid of those debs before installing from source.
apt-get purge
-qq
-y
roundcube
*
# Install Roundcube from source if it is not already present.
# TODO: Check version?
if
[
!
-d
/usr/local/lib/roundcubemail
]
;
then
rm
-f
/tmp/roundcube.tgz
wget
-qO
/tmp/roundcube.tgz http://downloads.sourceforge.net/project/roundcubemail/roundcubemail/1.0.1/roundcubemail-1.0.1.tar.gz
tar
-C
/usr/local/lib
-zxf
/tmp/roundcube.tgz
mv
/usr/local/lib/roundcubemail-1.0.1/ /usr/local/lib/roundcubemail
rm
-f
/tmp/roundcube.tgz
fi
# Generate a safe 24-character secret key of safe characters.
SECRET_KEY
=
$(
dd
if
=
/dev/random
bs
=
20
count
=
1 2>/dev/null |
base64
|
fold
-w
24 |
head
-n
1
)
# Create a configuration file.
#
# 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
;
<?php
/*
* Do not edit. Written by Mail-in-a-Box. Regenerated on updates.
*/
\$
config = array();
\$
config['log_dir'] = '/var/log/roundcubemail/';
\$
config['temp_dir'] = '/tmp/roundcubemail/';
\$
config['db_dsnw'] = 'sqlite:///
$STORAGE_ROOT
/mail/roundcube/roundcube.sqlite?mode=0640';
\$
config['default_host'] = 'ssl://localhost';
\$
config['default_port'] = 993;
\$
config['imap_timeout'] = 15;
\$
config['smtp_server'] = 'tls://localhost';
\$
config['smtp_port'] = 587;
\$
config['smtp_user'] = '%u';
\$
config['smtp_pass'] = '%p';
\$
config['support_url'] = 'https://mailinabox.email/';
\$
config['product_name'] = 'Mail-in-a-Box/Roundcube Webmail';
\$
config['des_key'] = '
$SECRET_KEY
';
\$
config['plugins'] = array('archive', 'zipdownload', 'password', 'managesieve');
\$
config['skin'] = 'classic';
\$
config['login_autocomplete'] = 2;
\$
config['password_charset'] = 'UTF-8';
\$
config['junk_mbox'] = 'Spam';
?>
EOF
# Create writable directories.
mkdir
-p
/var/log/roundcubemail /tmp/roundcubemail
$STORAGE_ROOT
/mail/roundcube
chown
-R
www-data.www-data /var/log/roundcubemail /tmp/roundcubemail
$STORAGE_ROOT
/mail/roundcube
# Password changing plugin settings
# The config comes empty by default, so we need the settings
# we're not planning to change in config.inc.dist...
cp
/usr/local/lib/roundcubemail/plugins/password/config.inc.php.dist
\
/usr/local/lib/roundcubemail/plugins/password/config.inc.php
tools/editconf.py /usr/local/lib/roundcubemail/plugins/password/config.inc.php
\
"
\$
config['password_minimum_length']=6;"
\
"
\$
config['password_db_dsn']='sqlite:///
$STORAGE_ROOT
/mail/users.sqlite';"
\
"
\$
config['password_query']='UPDATE users SET password=%D WHERE email=%u';"
\
"
\$
config['password_dovecotpw']='/usr/bin/doveadm pw';"
\
"
\$
config['password_dovecotpw_method']='SHA512-CRYPT';"
\
"
\$
config['password_dovecotpw_with_method']=true;"
# so PHP can use doveadm, for the password changing plugin
usermod
-a
-G
dovecot www-data
# set permissions so that PHP can use users.sqlite
# could use dovecot instead of www-data, but not sure it matters
chown
root.www-data
$STORAGE_ROOT
/mail
chmod
775
$STORAGE_ROOT
/mail
chown
root.www-data
$STORAGE_ROOT
/mail/users.sqlite
chmod
664
$STORAGE_ROOT
/mail/users.sqlite
# Enable PHP modules.
php5enmod mcrypt
restart_service php-fastcgi
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment