Skip to content

Commit 3aac247

Browse files
author
Kristan Kenney
committed
Update counters if SSL is enabled during rebuild
1 parent bd9e1ad commit 3aac247

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

func/rebuild.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,15 @@ rebuild_mail_domain_conf() {
495495
if [ ! -z "$CATCHALL" ]; then
496496
echo "*@$domain_idn:$CATCHALL" >> $dom_aliases
497497
fi
498+
499+
# Remove and recreate SSL configuration
500+
if [ "$SSL" = 'yes' ]; then
501+
add_mail_ssl_config
502+
503+
# Update counters
504+
update_object_value 'mail' 'DOMAIN' "$domain" '$SSL' "yes"
505+
U_MAIL_SSL=$((U_MAIL_SSL + 1))
506+
fi
498507
fi
499508

500509
# Rebuild domain accounts
@@ -545,12 +554,6 @@ rebuild_mail_domain_conf() {
545554
chown -R dovecot:mail $HOMEDIR/$user/conf/mail/$domain/passwd
546555
fi
547556
chown $user:mail $HOMEDIR/$user/mail/$domain_idn
548-
# Remove and recreate SSL configuration
549-
if [ "$SSL" = 'yes' ]; then
550-
mkdir -p $HOMEDIR/$user/conf/mail/$domain/ssl/
551-
del_mail_ssl_config
552-
add_mail_ssl_config
553-
fi
554557
fi
555558

556559
# Update counters

0 commit comments

Comments
 (0)