Browse Source

Variable exim config

Ernesto Nicolás Carrea 5 years ago
parent
commit
f2d7e9ce2b

+ 4 - 3
bin/v-add-mail-domain

@@ -22,6 +22,7 @@ source $HESTIA/func/main.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/conf/hestia.conf
 source $HESTIA/func/ip.sh
+source $HESTIA/func/osal.sh
 
 # Define mail user
 if [ "$MAIL_SYSTEM" = 'exim4' ]; then
@@ -105,10 +106,10 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
     if [ ! -z "$local_ip" ]; then
         IP_RDNS=$(is_ip_rdns_valid "$local_ip")
         if [ ! -z "$IP_RDNS" ]; then
-            if [ $(grep -s "^${domain}:" /etc/exim4/mailhelo.conf) ]; then
-                sed -i "/^${domain}:/c\\${domain}:${IP_RDNS}" /etc/exim4/mailhelo.conf
+            if [ $(grep -s "^${domain}:" $OSAL_PATH_EXIM_CONF/mailhelo.conf) ]; then
+                sed -i "/^${domain}:/c\\${domain}:${IP_RDNS}" $OSAL_PATH_EXIM_CONF/mailhelo.conf
             else
-                echo ${domain}:${IP_RDNS} >> /etc/exim4/mailhelo.conf
+                echo ${domain}:${IP_RDNS} >> $OSAL_PATH_EXIM_CONF/mailhelo.conf
             fi
         fi        
     fi

+ 2 - 1
bin/v-delete-mail-domain

@@ -19,6 +19,7 @@ domain_idn=$2
 source $HESTIA/func/main.sh
 source $HESTIA/func/domain.sh
 source $HESTIA/conf/hestia.conf
+source $HESTIA/func/osal.sh
 
 # Additional argument formatting
 format_domain
@@ -86,7 +87,7 @@ rm -f $USER_DATA/mail/$domain.pub
 rm -f $USER_DATA/mail/*@$domain.msg
 
 # Unsetting HELO for mail domain
-sed -i "/^${domain}:/d" /etc/exim4/mailhelo.conf
+sed -i "/^${domain}:/d" $OSAL_PATH_EXIM_CONF/mailhelo.conf
 
 # Decreasing domain value
 decrease_user_value "$user" '$U_MAIL_DOMAINS'

+ 4 - 4
func/rebuild.sh

@@ -522,13 +522,13 @@ rebuild_mail_domain_conf() {
         if [ ! -z "$local_ip" ]; then
             IP_RDNS=$(is_ip_rdns_valid "$local_ip")
             if [ ! -z "$IP_RDNS" ]; then
-                if [ $(grep -s "^${domain}:" /etc/exim4/mailhelo.conf) ]; then
-                    sed -i "/^${domain}:/c\\${domain}:${IP_RDNS}" /etc/exim4/mailhelo.conf
+                if [ $(grep -s "^${domain}:" $OSAL_PATH_EXIM_CONF/mailhelo.conf) ]; then
+                    sed -i "/^${domain}:/c\\${domain}:${IP_RDNS}" $OSAL_PATH_EXIM_CONF/mailhelo.conf
                 else
-                    echo ${domain}:${IP_RDNS} >> /etc/exim4/mailhelo.conf
+                    echo ${domain}:${IP_RDNS} >> $OSAL_PATH_EXIM_CONF/mailhelo.conf
                 fi
             else
-                sed -i "/^${domain}:/d" /etc/exim4/mailhelo.conf
+                sed -i "/^${domain}:/d" $OSAL_PATH_EXIM_CONF/mailhelo.conf
             fi
         fi
 

+ 2 - 2
install/rhel/dovecot/conf.d/auth-passwdfile.conf.ext

@@ -1,9 +1,9 @@
 passdb {
   driver = passwd-file
-  args = scheme=MD5-CRYPT username_format=%n /etc/exim4/domains/%d/passwd
+  args = scheme=MD5-CRYPT username_format=%n /etc/exim/domains/%d/passwd
 }
 
 userdb {
   driver = passwd-file
-  args = username_format=%n /etc/exim4/domains/%d/passwd
+  args = username_format=%n /etc/exim/domains/%d/passwd
 }