@@ -1794,23 +1794,25 @@ fi
17941794# ----------------------------------------------------------#
17951795
17961796echo " [ * ] Install Roundcube..."
1797- # Min requirements Dovecote + Exim + Mysql
1797+ # Min requirements Dovecot + Exim + Mysql
17981798
17991799if [ " $mysql " == ' yes' ] && [ " $dovecot " == " yes" ]; then
18001800 $HESTIA /bin/v-add-sys-roundcube
18011801 write_config_value " WEBMAIL_ALIAS" " webmail"
18021802fi
18031803
1804+
18041805# ----------------------------------------------------------#
18051806# Install Sieve #
18061807# ----------------------------------------------------------#
1807- # Min requirements Dovecote + Exim + Mysql + roundcube
1808+
1809+ # Min requirements Dovecot + Exim + Mysql + Roundcube
18081810if [ " $sieve " = ' yes' ]; then
18091811 # Folder paths
18101812 RC_INSTALL_DIR=" /var/lib/roundcube"
18111813 RC_CONFIG_DIR=" /etc/roundcube"
18121814
1813- echo " [ * ] Install Sieve ..."
1815+ echo " [ * ] Install Sieve..."
18141816
18151817 # dovecot.conf install
18161818 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,36 +1828,36 @@ if [ "$sieve" = 'yes' ]; then
18261828 # replace dovecot-sieve config files
18271829 cp -f $HESTIA_INSTALL_DIR /dovecot/sieve/* /etc/dovecot/conf.d
18281830
1829- # dovecot default file install
1831+ # Dovecot default file install
18301832 echo -e " require [\" fileinto\" ];\n# rule:[SPAM]\nif header :contains \" X-Spam-Flag\" \" YES\" {\n fileinto \" INBOX.Spam\" ;\n}\n" > /etc/dovecot/sieve/default
18311833
18321834 # exim4 install
18331835 sed -i " s/\stransport = local_delivery/ transport = dovecot_virtual_delivery/" /etc/exim4/exim4.conf.template
18341836
18351837 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
18361838
1837- # Modify roundcube install install
1839+ # Modify Roundcube install
18381840 mkdir -p $RC_CONFIG_DIR /plugins/managesieve
18391841
18401842 cp -f $HESTIA_INSTALL_DIR /roundcube/plugins/config_managesieve.inc.php $RC_CONFIG_DIR /plugins/managesieve/config.inc.php
18411843 ln -s $RC_CONFIG_DIR /plugins/managesieve/config.inc.php $RC_INSTALL_DIR /plugins/managesieve/config.inc.php
18421844
1843- # permission changes
1845+ # Permission changes
18441846 chown -R dovecot:mail /var/log/dovecot.log
18451847 chmod 660 /var/log/dovecot.log
1846-
18471848 chown -R root:www-data $RC_CONFIG_DIR /
1848- chmod 751 -R $RC_CONFIG_DIR
1849-
1849+ chmod 751 -R $RC_CONFIG_DIR
1850+ chmod 644 $RC_CONFIG_DIR / * .php
18501851 chmod 644 $RC_CONFIG_DIR /plugins/managesieve/config.inc.php
1851-
1852+
18521853 sed -i " s/'archive'/'archive', 'managesieve'/g" $RC_CONFIG_DIR /config.inc.php
18531854
1854- # restart dovecot and exim4
1855+ # Restart Dovecot and exim4
18551856 systemctl restart dovecot > /dev/null 2>&1
18561857 systemctl restart exim4 > /dev/null 2>&1
18571858fi
18581859
1860+
18591861# ----------------------------------------------------------#
18601862# Configure API #
18611863# ----------------------------------------------------------#
0 commit comments