Răsfoiți Sursa

Update mail domain routines

Kristan Kenney 7 ani în urmă
părinte
comite
01293af909
2 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 4 0
      func/domain.sh
  2. 1 0
      func/rebuild.sh

+ 4 - 0
func/domain.sh

@@ -629,6 +629,10 @@ add_mail_ssl_config() {
 
 
 # Delete SSL support for mail domain
 # Delete SSL support for mail domain
 del_mail_ssl_config() {
 del_mail_ssl_config() {
+    
+    # Remove old mail certificates
+    rm -f $HOMEDIR/$user/conf/mail/$domain/ssl/*
+
     # Remove dovecot configuration
     # Remove dovecot configuration
     rm -f /etc/dovecot/conf.d/domains/mail.$domain.conf
     rm -f /etc/dovecot/conf.d/domains/mail.$domain.conf
 
 

+ 1 - 0
func/rebuild.sh

@@ -498,6 +498,7 @@ rebuild_mail_domain_conf() {
 
 
         # Remove and recreate SSL configuration
         # Remove and recreate SSL configuration
         if [ "$SSL" = 'yes' ]; then
         if [ "$SSL" = 'yes' ]; then
+            del_mail_ssl_config
             add_mail_ssl_config
             add_mail_ssl_config
 
 
             # Update counters
             # Update counters