Skip to content

Commit 8ce19de

Browse files
authored
Merge pull request hestiacp#2702 from jaapmarcus/fix/apply-system-filters-exim
Add system.filters to exim config for 4.94 and current installs
2 parents 0c80559 + e67aa31 commit 8ce19de

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

install/deb/exim/exim4.conf.4.94.template

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ SMTP_RELAY_PORT = ${lookup{port}lsearch{SMTP_RELAY_FILE}}
8282
SMTP_RELAY_USER = ${lookup{user}lsearch{SMTP_RELAY_FILE}}
8383
SMTP_RELAY_PASS = ${lookup{pass}lsearch{SMTP_RELAY_FILE}}
8484

85+
# Custom Filter
86+
system_filter = /etc/exim4/system.filter
87+
system_filter_user = Debian-exim
88+
8589
######################################################################
8690
# ACL CONFIGURATION #
8791
# Specifies access control lists for incoming SMTP mail #

install/upgrade/versions/1.6.2.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ upgrade_config_set_value 'UPGRADE_UPDATE_MAIL_TEMPLATES' 'no'
2121
upgrade_config_set_value 'UPGRADE_REBUILD_USERS' 'no'
2222
upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'false'
2323

24+
system_filter=$(cat /etc/exim4/exim4.conf.template | grep 'system_filter');
25+
if [ -z "$system_filter" ]; then
26+
sed -i '/SMTP_RELAY_PASS = \${lookup{pass}lsearch{SMTP_RELAY_FILE}}/a #shouldberemoved\n# Custom Filter\nsystem_filter = \/etc\/exim4\/system.filter\nsystem_filter_user = Debian-exim' /etc/exim4/exim4.conf.template
27+
# Keep the spacing between the reley_pass and Custom Filter we need to insert a dummy text and remove it later on
28+
sed -i 's/#shouldberemoved//g' /etc/exim4/exim4.conf.template
29+
fi

0 commit comments

Comments
 (0)