Skip to content

Commit 9cd3759

Browse files
authored
Fix dovecot sieve upgrade script (hestiacp#3799)
Make it more resilient for exiting users who haven't updated yet but made custom changes
1 parent 7260649 commit 9cd3759

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

install/upgrade/versions/1.8.0.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ if [ "$IMAP_SYSTEM" = "dovecot" ]; then
3131
fi
3232

3333
if [ -f /etc/dovecot/conf.d/90-sieve.conf ]; then
34-
if ! grep -qw "^sieve_vacation_send_from_recipient$" /etc/dovecot/conf.d/90-sieve.conf 2> /dev/null; then
35-
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
34+
if ! grep -q "sieve_vacation_send_from_recipient" /etc/dovecot/conf.d/90-sieve.conf 2> /dev/null; then
35+
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
3636
fi
3737
fi
3838
fi

0 commit comments

Comments
 (0)