|
@@ -4758,11 +4758,14 @@ function configure_email {
|
4758
|
4758
|
chown root:Debian-exim /etc/exim4/exim.key /etc/exim4/exim.crt /etc/exim4/exim.dhparam
|
4759
|
4759
|
chmod 640 /etc/exim4/exim.key /etc/exim4/exim.crt /etc/exim4/exim.dhparam
|
4760
|
4760
|
|
4761
|
|
- sed -i '/login_saslauthd_server/,/.endif/ s/# *//' /etc/exim4/exim4.conf.template
|
4762
|
|
- sed -i "/.ifdef MAIN_HARDCODE_PRIMARY_HOSTNAME/i\MAIN_HARDCODE_PRIMARY_HOSTNAME = $DEFAULT_DOMAIN_NAME\nMAIN_TLS_ENABLE = true" /etc/exim4/exim4.conf.template
|
|
4761
|
+ # create a configuration
|
|
4762
|
+ cp /etc/exim4/exim4.conf.template /etc/exim4/exim4.conf
|
|
4763
|
+
|
|
4764
|
+ sed -i '/login_saslauthd_server/,/.endif/ s/# *//' /etc/exim4/exim4.conf
|
|
4765
|
+ sed -i "/.ifdef MAIN_HARDCODE_PRIMARY_HOSTNAME/i\MAIN_HARDCODE_PRIMARY_HOSTNAME = $DEFAULT_DOMAIN_NAME\nMAIN_TLS_ENABLE = true" /etc/exim4/exim4.conf
|
4763
|
4766
|
sed -i "s|SMTPLISTENEROPTIONS=''|SMTPLISTENEROPTIONS='-oX 465:25:587 -oP /var/run/exim4/exim.pid'|g" /etc/default/exim4
|
4764
|
|
- if ! grep -q "tls_on_connect_ports=465" /etc/exim4/exim4.conf.template; then
|
4765
|
|
- sed -i '/SSL configuration for exim/i\tls_on_connect_ports=465' /etc/exim4/exim4.conf.template
|
|
4767
|
+ if ! grep -q "tls_on_connect_ports=465" /etc/exim4/exim4.conf; then
|
|
4768
|
+ sed -i '/SSL configuration for exim/i\tls_on_connect_ports=465' /etc/exim4/exim4.conf
|
4766
|
4769
|
fi
|
4767
|
4770
|
|
4768
|
4771
|
adduser $MY_USERNAME sasl
|
|
@@ -4838,7 +4841,7 @@ function spam_filtering {
|
4838
|
4841
|
apt-get -y install spamassassin
|
4839
|
4842
|
sa-update -v
|
4840
|
4843
|
sed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/spamassassin
|
4841
|
|
- sed -i 's/# spamd_address = 127.0.0.1 783/spamd_address = 127.0.0.1 783/g' /etc/exim4/exim4.conf.template
|
|
4844
|
+ sed -i 's/# spamd_address = 127.0.0.1 783/spamd_address = 127.0.0.1 783/g' /etc/exim4/exim4.conf
|
4842
|
4845
|
# This configuration is based on https://wiki.debian.org/DebianSpamAssassin
|
4843
|
4846
|
sed -i 's/local_parts = postmaster/local_parts = postmaster:abuse/g' /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt
|
4844
|
4847
|
sed -i '/domains = +local_domains : +relay_to_domains/a\ set acl_m0 = rfcnames' /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt
|