From cf8a49f7394e91f4d8ee22040695f7ef0d914122 Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Wed, 6 Jul 2022 14:38:58 +0200 Subject: [PATCH] Patch for GMail SMTP timeouts --- src/deb/vesta/postinst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/deb/vesta/postinst b/src/deb/vesta/postinst index 8bda7d8d..cc798224 100755 --- a/src/deb/vesta/postinst +++ b/src/deb/vesta/postinst @@ -31,6 +31,24 @@ if [ "$release" -eq 11 ]; then sed -i "s/yescrypt/sha512/g" /etc/pam.d/common-password fi +# Fixing Gmail hosts_try_fastopen in Exim4 +if [ "$release" -eq 11 ]; then + if [ -f "/etc/exim4/exim4.conf.template" ]; then + check_grep=$(grep -c 'hosts_try_fastopen' /etc/exim4/exim4.conf.template) + if [ "$check_grep" -eq 0 ]; then + echo "=== Fixing Gmail hosts_try_fastopen in Exim4" + FIND="dkim_strict = 0" + ADD=" hosts_try_fastopen = \!\*.l.google.com" + sed -i "s#$FIND#$FIND\n$ADD#g" /etc/exim4/exim4.conf.template + systemctl restart exim4 + + sed -i "s/net.ipv4.tcp_window_scaling/#net.ipv4.tcp_window_scaling/g" /etc/sysctl.conf + echo 1 > /proc/sys/net/ipv4/tcp_window_scaling + fi + fi +fi + + # Adding Barracuda RBL to SpamAssassin if [ ! -f "/usr/local/vesta/data/upgrades/barracuda_rbl" ]; then spamassassin_installed=$(/usr/local/vesta/bin/v-list-sys-services | grep -c 'spamassassin')