Sfoglia il codice sorgente

Fix dovecot sieve upgrade script (#3799)

Make it more resilient for exiting users who haven't updated yet but made custom changes
Jaap Marcus 2 anni fa
parent
commit
9cd37598b0
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      install/upgrade/versions/1.8.0.sh

+ 2 - 2
install/upgrade/versions/1.8.0.sh

@@ -31,8 +31,8 @@ if [ "$IMAP_SYSTEM" = "dovecot" ]; then
 	fi
 	fi
 
 
 	if [ -f /etc/dovecot/conf.d/90-sieve.conf ]; then
 	if [ -f /etc/dovecot/conf.d/90-sieve.conf ]; then
-		if ! grep -qw "^sieve_vacation_send_from_recipient$" /etc/dovecot/conf.d/90-sieve.conf 2> /dev/null; then
-			sed -i "s/^}/  # This setting determines whether vacation messages are sent with the SMTP MAIL FROM envelope address set to the recipient address of the Sieve script owner.\n  sieve_vacation_send_from_recipient = yes\n}/g" /etc/dovecot/conf.d/90-sieve.conf
+		if ! grep -q "sieve_vacation_send_from_recipient" /etc/dovecot/conf.d/90-sieve.conf 2> /dev/null; then
+			sed -i "s/^plugin {/plugin {\n  # This setting determines whether vacation messages are sent with the SMTP MAIL FROM envelope address set to the recipient address of the Sieve script owner.\n  sieve_vacation_send_from_recipient = yes\n/g" /etc/dovecot/conf.d/90-sieve.conf
 		fi
 		fi
 	fi
 	fi
 fi
 fi