Fixing Roundcube to send via authenticated SMTP user instead via php

This commit is contained in:
myvesta 2020-09-21 00:39:46 +02:00 committed by GitHub
commit fb5a3da3de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -198,6 +198,15 @@ if [ ! -f "/usr/local/vesta/data/upgrades/limit_max_recipients" ]; then
fi
fi
# Fixing Roundcube to send via authenticated SMTP user instead via php
if [ ! -f "/usr/local/vesta/data/upgrades/roundcube_smtp_auth" ]; then
touch /usr/local/vesta/data/upgrades/roundcube_smtp_auth
if [ -f "/etc/roundcube/defaults.inc.php" ]; then
echo "=== Fixing Roundcube to send via authenticated SMTP user instead via php"
sed -i "s#^\$config\['smtp_user'\].*#\$config\['smtp_user'\] = '%u';#g" /etc/roundcube/defaults.inc.php
sed -i "s#^\$config\['smtp_pass'\].*#\$config\['smtp_pass'\] = '%p';#g" /etc/roundcube/defaults.inc.php
fi
fi
# Run custom triggers
if [ -x "/root/vesta-patch.sh" ]; then