|
|
@@ -22,7 +22,6 @@ HAS_DOVECOT_SIEVE_INSTALLED=`dpkg --get-selections dovecot-sieve | grep dovecot-
|
|
|
RC_INSTALL_DIR="/var/lib/roundcube"
|
|
|
RC_CONFIG_DIR="/etc/roundcube"
|
|
|
|
|
|
-
|
|
|
# If we want to install sieve
|
|
|
if [ "$HAS_DOVECOT_SIEVE_INSTALLED" = "0" ]; then
|
|
|
|
|
|
@@ -78,9 +77,6 @@ else
|
|
|
# Uninstall sieve if it exist
|
|
|
if [ -f "/etc/dovecot/conf.d/90-sieve.conf" ]; then
|
|
|
|
|
|
- # If sieve is installed... remove it.
|
|
|
- apt-get -qq remove --purge dovecot-sieve -y
|
|
|
-
|
|
|
# dovecot.conf multiline sed
|
|
|
sed -i -E -z "s/service stats \{\n unix_listener stats-writer \{\n group = mail\n mode = 0660\n user = dovecot\n \}\n\}\n\n//g" /etc/dovecot/dovecot.conf
|
|
|
|
|
|
@@ -100,9 +96,12 @@ else
|
|
|
# Dovecot default file
|
|
|
rm -r -f /etc/dovecot/sieve
|
|
|
|
|
|
+ # If sieve is installed... remove it.
|
|
|
+ apt-get -qq remove --purge dovecot-sieve -y
|
|
|
+
|
|
|
# Exim4
|
|
|
sed -i "s/\stransport = dovecot_virtual_delivery/ transport = local_delivery/" /etc/exim4/exim4.conf.template
|
|
|
- sed -i "s/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/g" /etc/exim4/exim4.conf.template
|
|
|
+ sed -i "s/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//g" /etc/exim4/exim4.conf.template
|
|
|
|
|
|
# Roundcube
|
|
|
rm -f -r $RC_CONFIG_DIR/plugins/managesieve
|