diff --git a/bin/v-add-srs-support-to-exim b/bin/v-add-srs-support-to-exim index 5113c693b..b31be1e85 100644 --- a/bin/v-add-srs-support-to-exim +++ b/bin/v-add-srs-support-to-exim @@ -50,6 +50,16 @@ if ! /usr/local/vesta/bin/v-grep 'remote_forwarded_smtp:' '/etc/exim4/exim4.conf v-sed 'procmail:\n driver = pipe' 'remote_forwarded_smtp:\n driver = smtp\n dkim_domain = DKIM_DOMAIN\n dkim_selector = mail\n dkim_private_key = DKIM_PRIVATE_KEY\n dkim_canon = relaxed\n dkim_strict = 0\n hosts_try_fastopen = \n hosts_try_chunking = !93.188.3.0/24\n message_linelength_limit = 1G\n # modify the envelope from, for mails that we forward\n max_rcpt = 1\n return_path = ${srs_encode {SRS_SECRET} {$return_path} {$original_domain}}\n\nprocmail:\n driver = pipe' '/etc/exim4/exim4.conf.template' fi +release=$(cat /etc/debian_version | tr "." "\n" | head -n1) +if [ "$release" -lt 11 ]; then + echo "= Removing \"smtputf8_advertise_hosts\" line for Debian < 11" + sed -i "s|smtputf8_advertise_hosts|#smtputf8_advertise_hosts|g" /etc/exim4/exim4.conf.template +fi +if [ "$release" -lt 12 ]; then + echo "= Removing \"message_linelength_limit\" line for Debian < 12" + sed -i "s|message_linelength_limit|#message_linelength_limit|g" /etc/exim4/exim4.conf.template +fi + echo "= Restarting exim4 service" systemctl restart exim4