From 1a498d69e5d964230a50348fce99983be4c5803e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Mon, 16 May 2016 22:03:52 +0200 Subject: [PATCH] [enh] Authenticate to the SMTP server to send emails --- conf/config.inc.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/conf/config.inc.php b/conf/config.inc.php index c01161e..b4458e4 100644 --- a/conf/config.inc.php +++ b/conf/config.inc.php @@ -22,6 +22,9 @@ +-----------------------------------------------------------------------+ */ +// Retrieve YunoHost main domain +$main_domain = exec('cat /etc/yunohost/current_host'); + $config = array(); // Database connection string (DSN) for read+write operations @@ -53,19 +56,19 @@ $config['default_host'] = 'localhost'; // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part) // %z - IMAP domain (IMAP hostname without the first part) // For example %n = mail.domain.tld, %t = domain.tld -$config['smtp_server'] = ''; +$config['smtp_server'] = 'tls://' . $main_domain; // SMTP port (default is 25; use 587 for STARTTLS or 465 for the // deprecated SSL over SMTP (aka SMTPS)) -$config['smtp_port'] = 25; +$config['smtp_port'] = 587; // SMTP username (if required) if you use %u as the username Roundcube // will use the current username for login -$config['smtp_user'] = ''; +$config['smtp_user'] = '%u'; // SMTP password (if required) if you use %p as the password Roundcube // will use the current user's password for login -$config['smtp_pass'] = ''; +$config['smtp_pass'] = '%p'; // provide an URL where a user can get support for this Roundcube installation // PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE! @@ -126,8 +129,7 @@ $config['new_user_identity_addressbook'] = 'yunohost'; // -- http_authentication // Redirect the client to this URL after logout. -$main_domain = exec('cat /etc/yunohost/current_host'); -$config['logout_url'] = 'https://'.$main_domain.'/yunohost/sso/?action=logout'; +$config['logout_url'] = 'https://' . $main_domain . '/yunohost/sso/?action=logout'; // -- ldapAliasSync $config['ldapAliasSync'] = array(