Ernesto Nicolás Carrea 5 years ago
parent
commit
b80b7b4d5e
2 changed files with 6 additions and 1 deletions
  1. 5 0
      bin/module/spamassassin/install.inc
  2. 1 1
      install/rhel/exim/exim.conf

+ 5 - 0
bin/module/spamassassin/install.inc

@@ -23,6 +23,11 @@ hestia_module_spamassassin_install() {
         if [[ "$unit_files" =~ "disabled" ]]; then
             systemctl enable spamassassin > /dev/null 2>&1
         fi
+    elif [ $OS_BASE = 'rhel' ]; then
+        # Set SpamAssassin to listen on IPv4 localhost
+        spamd_options=$(osal_kv_read '/etc/sysconfig/spamassassin' 'SPAMDOPTIONS')
+        spamd_options="$spamd_options --listen-ip=127.0.0.1"
+        osal_kv_write '/etc/sysconfig/spamassassin' 'SPAMDOPTIONS' "$spamd_options"
     fi
 
     osal_service_enable $OSAL_SERVICE_SPAMASSASSIN > /dev/null 2>&1

+ 1 - 1
install/rhel/exim/exim.conf

@@ -27,7 +27,7 @@ acl_smtp_data = acl_check_data
 acl_smtp_mime = acl_check_mime
 
 .ifdef SPAMASSASSIN
-spamd_address = localhost 783
+spamd_address = 127.0.0.1 783
 .endif
 
 .ifdef CLAMD