-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvpsInstallMailServer5.bash
More file actions
36 lines (25 loc) · 1.36 KB
/
vpsInstallMailServer5.bash
File metadata and controls
36 lines (25 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
#############################################################
# Source: http://www.tictech.info/post/mail_dovecot
# $1 votresite.com
# $2 admin webmail
#############################################################
# Installation de Roundcube
wget https://downloads.sourceforge.net/project/roundcubemail/roundcubemail/1.1.2/roundcubemail-1.1.2-complete.tar.gz
tar xvf roundcubemail-1.1.2-complete.tar.gz
mv roundcubemail-1.1.2 /var/www/webmail
chown -R www-data:www-data /var/www/webmail/temp /var/www/webmail/logs
sed -e "s/MAILUSER/$1/" ./ressources/add_webmail.conf | sed -e "s/PWD_MAILUSER/$2/" > /etc/apache2/sites-available/webmail.conf
cp ./ressources/rewrite_ports.conf /etc/apache2/ports.conf
sudo a2enmod ssl
a2ensite webmail
service apache2 reload
read -p "rendez-vous sur https://mail.$1/installer afin de configurer Roundcube" ok
read -p "rendez-vous sur https://mail.$1 pour vérification" ok
rm -rf /var/www/webmail/installer
#############################################################
# Ajout de repertoire dans Dovecot
sed -e "s/\#mail_plugins = \$mail_plugins/mail_plugins = \$mail_plugins autocreate/" /etc/dovecot/conf.d/20-imap.conf > /etc/dovecot/conf.d/20-imap.conf.tmp
cat ./ressources/add_20-imap.conf >> /etc/dovecot/conf.d/20-imap.conf.tmp
mv /etc/dovecot/conf.d/20-imap.conf.tmp /etc/dovecot/conf.d/20-imap.conf
service dovcot restart