Просмотр исходного кода

Update current exim config for pre 1.6 installs (#2687)

* Update current exim config for pre 1.6 installs

* Add few extra spaces for alignment

* Typo

Co-authored-by: Raphael <rs@scit.ch>
Jaap Marcus 3 лет назад
Родитель
Сommit
da9be94b00
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      install/upgrade/versions/1.6.1.sh

+ 7 - 0
install/upgrade/versions/1.6.1.sh

@@ -28,4 +28,11 @@ if [ "$MAIL_SYSTEM" = "exim4" ]; then
         echo "[ * ] Fixed an issue with rate limits and alias mail addresses"
         sed -i 's/${extract{1}{:}{${lookup{$sender_address_local_part@$sender_address_domain}/${extract{1}{:}{${lookup{$authenticated_id}/' /etc/exim4/exim4.conf.template
     fi
+    spamscore=$(cat /etc/exim4/exim4.conf.template | grep 'SPAM_REJECT_SCORE =')
+    if [ -z "$spamscore" ]; then
+        echo "[ * ] Fixed an issue reject spam not working properly."
+        sed -i '/SPAM_SCORE = .*/a SPAM_REJECT_SCORE = 100' /etc/exim4/exim4.conf.template
+        sed -i '/          set acl_m1    = yes/a    warn    condition     = ${if exists {/etc/exim4/domains/$domain/reject_spam}{yes}{no}}\n          set acl_m3    = yes' /etc/exim4/exim4.conf.template
+    fi
+    
 fi