SVN Releases > Issues & Bugs

Roundcube client cannot connect to postfix mail server

(1/2) > >>

azizgstest:
Hi RC users,


I installed roundcube with postfix, but I'm unable to access it, it's giving an error message "connexion to storage server error", however I'm able to connect to my postfix server using outlook.

my roundcube config file contains the following values :

$config['db_dsnw'] = 'mysql://user:mypassword@localhost/mydatabase';
$config['default_host'] = 'ssl://localhost';
$config['default_port'] = 993;


$config['smtp_server'] = 'tls://localhost';
$config['smtp_port'] = 587;

In the logs I found the following error :


Login failed for user1@mycompany.com from 66.162.222.19. Could not connect to ssl://localhost:993: Unknown reason in /var/www/mail/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 196 (POST /roundcubemail/?_task=login&_action=login)


BR

JohnDoh:
When using localhost SSL/TLS is not required since no data is transmitted. So you could change your config to:

$config['default_host'] = 'localhost';
$config['default_port'] = 143;
$config['smtp_server'] = 'localhost';
$config['smtp_port'] = 25;

The "Unknown reason" error is likely coming from the fact that OpenSSL cannot verify your cert. There can be a few resons for that: is the CN on your cert localhost? is your cert a self signed one, or from a publisher that OpenSSL does not recognise like LetsEncrypt?

If you really want to use SSL/TLS you should change "localhost" to the public address of your IMAP + SMTP servers. The one that matches the CN on your cert. If you are using a self signed cert you will need to confiugre $config['imap_conn_options'] and $config['smtp_conn_options'] to either disable peer verification or tell OpenSSL how to verify the cert.

azizgstest:
Hi John,

Thank you for your feedback, in fact changing the following resolves my issue :

$config['default_host'] = 'localhost';
$config['default_port'] = 143;
$config['smtp_server'] = 'localhost';
$config['smtp_port'] = 25;

And yes, I'm using a certificate signed by known authority, the CN is my domain name. 
However, since I need to use TLS/SASL for sending/receiving emails, I'm wondering if it's possible to use SMTP, IMAP without encryption for roundcube (anything coming from localhost), and for any in/out external emails, they will be encrypted ?

Thank you
 

JohnDoh:

--- Quote ---However, since I need to use TLS/SASL for sending/receiving emails, I'm wondering if it's possible to use SMTP, IMAP without encryption for roundcube (anything coming from localhost), and for any in/out external emails, they will be encrypted ?
--- End quote ---
These are 2 separate things. how one client communicates with a server and how that server communicates with other clients/servers is not related to each other. What you describe is certainly possible, and I think quite normal. Its usually possible to configure the IMAP and SMTP server to require external clients to use encryption when localhost does not.

azizgstest:
Hello,


I tried to use both TLS and plaintext authentication methods in my postfix server, with the idea to block external SMTP/IMAP traffic using the firewall, and got the following results :

Incoming emails are working. but I'm not able to send emails from roundcube the error is the following :

Authentication failure: SMTP server does not support authentication (Code: ) in /var/www/mail/roundcubemail/program/lib/Roundcube/rcube.php on line 1667 (POST /?_task=mail&_unlock=loading1532603967783&_lang=fr_FR&_framed=1&_action=send

My config file is :


// IMAP
$config['default_host'] = 'localhost';
$config['default_port'] = 143;
$config['imap_auth_type'] = 'LOGIN';
$config['imap_delimiter'] = '/';

// SMTP
$config['smtp_server'] = 'localhost';
$config['smtp_port'] = 25;
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['smtp_auth_type'] = 'LOGIN';


Any hints what can cause this issue ?

Thanks in advance.

Navigation

[0] Message Index

[#] Next page

Go to full version