1 (edited by heeter 2019-11-29 11:39:36)

Topic: Roundcube "connection to imap server failed"

Hi all,

I am having issues trying to connect to the mailserver with a fresh install of roundcube 1.4.

Here is the server configurations:

Mailserver:
Ubuntu18, iredmail 0.99, ports 993 incoming & 587 outgoing.
2 domains serving: mail.example1,com, mail.example2.com
IP 192.168.100.17

Webserver
Ubuntu18, nginx, Mysql, PHP7.3, Letsencrypt, roundcube1.4, Rainloop.
IP 192.168.100.18

Everything functioning correctly, Thunderbird, android K9, Evolution, rainloop.

Roundcube can't connect to mailserver.
current config.inc.php

<?php

$config = array();
$config['db_dsnw'] = 'mysql://user:password@localhost/roundcube_db';
$config['default_host'] = array(
  'ssl://mail.example1.com:993' => 'Example1 Secure Webmail',
  'ssl://mail.example2.com:993' => 'Example2 Secure Webmail'
);
$config['smtp_server'] = 'tls://mail.example1.com';
$config['smtp_port'] = 587;
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['product_name'] = 'Webmail';
$config['des_key'] = 'rcmail-!24ByteDESkey';
$config['plugins'] = array(
    'archive',
    'zipdownload',
);
$config['skin'] = 'elastic';

Any assistance will be greatly appreciated, have been trying to figure out this config file for a couple of days already

Regards

2

Re: Roundcube "connection to imap server failed"

- Is Dovecot service (POP3 and IMAP) running?
- Any related error in /var/log/dovecot/dovecot.log (and imap.log)?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3 (edited by heeter 2019-12-01 08:51:02)

Re: Roundcube "connection to imap server failed"

Hi

dovecot error log:

root@mail:/etc/dovecot# service dovecot start
Job for dovecot.socket failed.
See "systemctl status dovecot.socket" and "journalctl -xe" for details.
root@mail:/etc/dovecot# systemctl status dovecot.socket
● dovecot.socket - Dovecot IMAP/POP3 email server activation socket
   Loaded: loaded (/lib/systemd/system/dovecot.socket; disabled; vendor preset: enabled)
   Active: inactive (dead)
   Listen: 0.0.0.0:143 (Stream)
           [::]:143 (Stream)
           0.0.0.0:993 (Stream)
           [::]:993 (Stream)

Nov 30 17:47:03 mail systemd[1]: dovecot.socket: Socket service dovecot.service already active, refusing.
Nov 30 17:47:03 mail systemd[1]: Failed to listen on Dovecot IMAP/POP3 email server activation socket.
Nov 30 17:47:28 mail systemd[1]: dovecot.socket: Socket service dovecot.service already active, refusing.
Nov 30 17:47:28 mail systemd[1]: Failed to listen on Dovecot IMAP/POP3 email server activation socket.
Nov 30 17:47:55 mail systemd[1]: dovecot.socket: Socket service dovecot.service already active, refusing.
Nov 30 17:47:55 mail systemd[1]: Failed to listen on Dovecot IMAP/POP3 email server activation socket.
Nov 30 17:49:14 mail systemd[1]: dovecot.socket: Socket service dovecot.service already active, refusing.
Nov 30 17:49:14 mail systemd[1]: Failed to listen on Dovecot IMAP/POP3 email server activation socket.
root@mail:/etc/dovecot# journalctl -xe
-- Subject: Unit dovecot.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit dovecot.service has finished starting up.
-- 
-- The start-up result is RESULT.
Nov 30 17:48:38 mail dovecot[3697]: doveconf: Warning: SSLv2 not supported by OpenSSL. Please consider removing it from ssl_protocols.
Nov 30 17:48:38 mail dovecot[3697]: doveconf: Warning: SSLv2 not supported by OpenSSL. Please consider removing it from ssl_protocols.
Nov 30 17:48:38 mail dovecot[3697]: master: Dovecot v2.2.33.2 (d6601f4ec) starting up for pop3, imap, sieve, lmtp (core dumps disabled)
Nov 30 17:48:38 mail dovecot[3718]: doveconf: Warning: SSLv2 not supported by OpenSSL. Please consider removing it from ssl_protocols.
Nov 30 17:48:38 mail dovecot[3718]: config: Warning: SSLv2 not supported by OpenSSL. Please consider removing it from ssl_protocols.
Nov 30 17:49:14 mail systemd[1]: Configuration file /lib/systemd/system/iredapd.service is marked executable. Please remove executable permission bits. Proceeding
Nov 30 17:49:14 mail systemd[1]: Configuration file /lib/systemd/system/iredapd.service is marked world-inaccessible. This has no effect as configuration data is 
Nov 30 17:49:14 mail systemd[1]: dovecot.socket: Socket service dovecot.service already active, refusing.
Nov 30 17:49:14 mail systemd[1]: Failed to listen on Dovecot IMAP/POP3 email server activation socket.
-- Subject: Unit dovecot.socket has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit dovecot.socket has failed.
-- 
-- The result is RESULT.
lines 2182-2204/2204 (END)

4

Re: Roundcube "connection to imap server failed"

1: Remove '!SSLv2' in /etc/dovecot/dovecot.conf, then restart Dovecot service.
2: Run "service dovecot restart", any error in /var/log/dovecot/dovecot.log?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

5 (edited by heeter 2019-12-02 23:22:57)

Re: Roundcube "connection to imap server failed"

Thank you helping me.

this is what I get after removing the SSL2 protocol

root@mail:/home/adminpc# service dovecot start
Job for dovecot.socket failed.
See "systemctl status dovecot.socket" and "journalctl -xe" for details.
root@mail:/home/adminpc# systemctl status dovecot.socket
● dovecot.socket - Dovecot IMAP/POP3 email server activation socket
   Loaded: loaded (/lib/systemd/system/dovecot.socket; disabled; vendor preset: 
   Active: inactive (dead)
   Listen: 0.0.0.0:143 (Stream)
           [::]:143 (Stream)
           0.0.0.0:993 (Stream)
           [::]:993 (Stream)

Nov 30 17:47:28 mail systemd[1]: dovecot.socket: Socket service dovecot.service 
Nov 30 17:47:28 mail systemd[1]: Failed to listen on Dovecot IMAP/POP3 email ser
Nov 30 17:47:55 mail systemd[1]: dovecot.socket: Socket service dovecot.service 
Nov 30 17:47:55 mail systemd[1]: Failed to listen on Dovecot IMAP/POP3 email ser
Nov 30 17:49:14 mail systemd[1]: dovecot.socket: Socket service dovecot.service 
Nov 30 17:49:14 mail systemd[1]: Failed to listen on Dovecot IMAP/POP3 email ser
Nov 30 17:57:26 mail systemd[1]: dovecot.socket: Socket service dovecot.service 
Nov 30 17:57:26 mail systemd[1]: Failed to listen on Dovecot IMAP/POP3 email ser
Dec 02 08:14:53 mail systemd[1]: dovecot.socket: Socket service dovecot.service 
Dec 02 08:14:53 mail systemd[1]: Failed to listen on Dovecot IMAP/POP3 email ser
lines 1-18/18 (END)
root@mail:/home/adminpc# service dovecot restart
root@mail:/home/adminpc# 

And here is nano /var/log/dovecot/dovecot.log

Dec  2 08:18:30 mail dovecot: master: Warning: Killed with signal 15 (by pid=12771 uid=0 code=kill)
Dec  2 08:18:30 mail dovecot: master: Dovecot v2.2.33.2 (d6601f4ec) starting up for pop3, imap, sieve, lmtp (core dumps disabled)

Still cant connect


Regards

6

Re: Roundcube "connection to imap server failed"

Hi

Still having issues with this, any help would be greatly appreciated.

Regards

7

Re: Roundcube "connection to imap server failed"

- Any error in /var/log/syslog?
- Also, try to start Dovecot service manually from command line, and show us the error message on console:

dovecot -c /etc/dovecot/dovecot.conf

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee