Skip to content

Commit d7bf138

Browse files
committed
Force roundcube to use smtp for mails.
1 parent f4ef8be commit d7bf138

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

install/hst-install-debian.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,12 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
12851285
/etc/roundcube/plugins/password/config.inc.php
12861286
mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
12871287
chmod a+r /etc/roundcube/main.inc.php
1288+
1289+
# Fix to send all mails using smtp and add userinformations
1290+
sed -i "/\$config\['smtp_server'\]/c\$config\['smtp_server'\] = 'localhost';" /etc/roundcube/defaults.inc.php
1291+
sed -i "/\$config\['smtp_user'\]/c\$config\['smtp_user'\] = '%u';" /etc/roundcube/defaults.inc.php
1292+
sed -i "/\$config\['smtp_pass'\]/c\$config\['smtp_pass'\] = '%p';" /etc/roundcube/defaults.inc.php
1293+
12881294
if [ "$release" -eq 8 ] || [ "$release" -eq 9 ]; then
12891295
mv -f /etc/roundcube/main.inc.php /etc/roundcube/config.inc.php
12901296
mv -f /etc/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
@@ -1293,7 +1299,7 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
12931299
chown root:www-data /etc/roundcube/debian-db-roundcube.php
12941300
chown root:www-data /etc/roundcube/config.inc.php
12951301
fi
1296-
if [ "$release" -eq 8 ]; then
1302+
if [ "$release" -eq 8 ] || [ "$release" -eq 9 ]; then
12971303
# RoundCube tinyMCE fix
12981304
tinymceFixArchiveURL=$hestiacp/roundcube/roundcube-tinymce.tar.gz
12991305
tinymceParentFolder=/usr/share/roundcube/program/js
@@ -1316,7 +1322,6 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
13161322
fi
13171323
fi
13181324
fi
1319-
13201325
fi
13211326
fi
13221327

install/hst-install-ubuntu.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,6 +1258,12 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
12581258
mysql -e "GRANT ALL ON roundcube.*
12591259
TO roundcube@localhost IDENTIFIED BY '$r'"
12601260
sed -i "s/%password%/$r/g" /etc/roundcube/db.inc.php
1261+
1262+
# Fix to send all mails using smtp and add userinformations
1263+
sed -i "/\$config\['smtp_server'\]/c\$config\['smtp_server'\] = 'localhost';" /etc/roundcube/defaults.inc.php
1264+
sed -i "/\$config\['smtp_user'\]/c\$config\['smtp_user'\] = '%u';" /etc/roundcube/defaults.inc.php
1265+
sed -i "/\$config\['smtp_pass'\]/c\$config\['smtp_pass'\] = '%p';" /etc/roundcube/defaults.inc.php
1266+
12611267
touch /var/log/roundcube/errors
12621268
chmod 640 /var/log/roundcube/errors
12631269
chown www-data:adm /var/log/roundcube/errors

0 commit comments

Comments
 (0)