|
|
@@ -1794,23 +1794,25 @@ fi
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
echo "[ * ] Install Roundcube..."
|
|
|
-# Min requirements Dovecote + Exim + Mysql
|
|
|
+# Min requirements Dovecot + Exim + Mysql
|
|
|
|
|
|
if [ "$mysql" == 'yes' ] && [ "$dovecot" == "yes" ]; then
|
|
|
$HESTIA/bin/v-add-sys-roundcube
|
|
|
write_config_value "WEBMAIL_ALIAS" "webmail"
|
|
|
fi
|
|
|
|
|
|
+
|
|
|
#----------------------------------------------------------#
|
|
|
# Install Sieve #
|
|
|
#----------------------------------------------------------#
|
|
|
-# Min requirements Dovecote + Exim + Mysql + roundcube
|
|
|
+
|
|
|
+# Min requirements Dovecot + Exim + Mysql + Roundcube
|
|
|
if [ "$sieve" = 'yes' ]; then
|
|
|
# Folder paths
|
|
|
RC_INSTALL_DIR="/var/lib/roundcube"
|
|
|
RC_CONFIG_DIR="/etc/roundcube"
|
|
|
|
|
|
- echo "[ * ] Install Sieve ..."
|
|
|
+ echo "[ * ] Install Sieve..."
|
|
|
|
|
|
# dovecot.conf install
|
|
|
sed -i "s/namespace/service stats \{\n unix_listener stats-writer \{\n group = mail\n mode = 0660\n user = dovecot\n \}\n\}\n\nnamespace/g" /etc/dovecot/dovecot.conf
|
|
|
@@ -1826,7 +1828,7 @@ if [ "$sieve" = 'yes' ]; then
|
|
|
# replace dovecot-sieve config files
|
|
|
cp -f $HESTIA_INSTALL_DIR/dovecot/sieve/* /etc/dovecot/conf.d
|
|
|
|
|
|
- # dovecot default file install
|
|
|
+ # Dovecot default file install
|
|
|
echo -e "require [\"fileinto\"];\n# rule:[SPAM]\nif header :contains \"X-Spam-Flag\" \"YES\" {\n fileinto \"INBOX.Spam\";\n}\n" > /etc/dovecot/sieve/default
|
|
|
|
|
|
# exim4 install
|
|
|
@@ -1834,28 +1836,28 @@ if [ "$sieve" = 'yes' ]; then
|
|
|
|
|
|
sed -i "s/address_pipe:/dovecot_virtual_delivery:\n driver = pipe\n command = \/usr\/lib\/dovecot\/dovecot-lda -e -d \$local_part@\$domain -f \$sender_address -a \$original_local_part@\$original_domain\n delivery_date_add\n envelope_to_add\n return_path_add\n log_output = true\n log_defer_output = true\n user = \${extract{2}{:}{\${lookup{\$local_part}lsearch{\/etc\/exim4\/domains\/\${lookup{\$domain}dsearch{\/etc\/exim4\/domains\/}}\/passwd}}}}\n group = mail\n return_output\n\naddress_pipe:/g" /etc/exim4/exim4.conf.template
|
|
|
|
|
|
- # Modify roundcube install install
|
|
|
+ # Modify Roundcube install
|
|
|
mkdir -p $RC_CONFIG_DIR/plugins/managesieve
|
|
|
|
|
|
cp -f $HESTIA_INSTALL_DIR/roundcube/plugins/config_managesieve.inc.php $RC_CONFIG_DIR/plugins/managesieve/config.inc.php
|
|
|
ln -s $RC_CONFIG_DIR/plugins/managesieve/config.inc.php $RC_INSTALL_DIR/plugins/managesieve/config.inc.php
|
|
|
|
|
|
- # permission changes
|
|
|
+ # Permission changes
|
|
|
chown -R dovecot:mail /var/log/dovecot.log
|
|
|
chmod 660 /var/log/dovecot.log
|
|
|
-
|
|
|
chown -R root:www-data $RC_CONFIG_DIR/
|
|
|
- chmod 751 -R $RC_CONFIG_DIR
|
|
|
-
|
|
|
+ chmod 751 -R $RC_CONFIG_DIR
|
|
|
+ chmod 644 $RC_CONFIG_DIR/*.php
|
|
|
chmod 644 $RC_CONFIG_DIR/plugins/managesieve/config.inc.php
|
|
|
-
|
|
|
+
|
|
|
sed -i "s/'archive'/'archive', 'managesieve'/g" $RC_CONFIG_DIR/config.inc.php
|
|
|
|
|
|
- #restart dovecot and exim4
|
|
|
+ # Restart Dovecot and exim4
|
|
|
systemctl restart dovecot > /dev/null 2>&1
|
|
|
systemctl restart exim4 > /dev/null 2>&1
|
|
|
fi
|
|
|
|
|
|
+
|
|
|
#----------------------------------------------------------#
|
|
|
# Configure API #
|
|
|
#----------------------------------------------------------#
|