问题原文
原帖链接 · kojow7 · CC BY-SA 4.0
I am trying to get roundcube, dovecot, postfix, and certificates from letsencrypt to all work together on Debian 9.
I installed roundcube using the apt-get command.
When trying to log into roundcube it takes a long time where it says "Loading..." but then does not log me in. The onscreen error says Connection to storage server failed. Lookingin the roundcube error logs I get the following error:
IMAP Error: Login failed for [email omitted] from 192.0.2.10. Empty startup greeting (localhost:143) in /usr/share/roundcube/program/lib/Roundcube/rcube_imap.php on line 193 (POST /?_task=login&_action=login)
Running /etc/init.d/dovecot status I get the following:
dovecot[29431]: imap-login: Disconnected (no auth attempts in 60 secs): user=<>, rip=::1, lip=::1, TLS handshaking: SSL_accept() syscall failed: Success, session=<azgn6uptGtgAAAAAAAAAAAAAAAAAAAAB>
I have the following in my config.inc.php:
$config['default_host'] = 'tls://localhost';
and
$config['imap_conn_options'] = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
),
);
$config['username_domain'] = '%d';
and the following specified in my dovecot 10-ssl.conf file:
ssl = required
ssl_cert = </etc/letsencrypt/live/example.com/fullchain.pem
ssl_key = </etc/letsencrypt/live/example.com/privkey.pem
I also have the following in my 10-master.conf file:
service imap-login {
inet_listener imap {
port = 0
}
inet_listener imaps {
port = 143
ssl = yes
}
}
service pop3-login {
inet_listener pop3 {
port = 0
}
inet_listener pop3s {
port = 995
ssl = yes
}
}
If I do telnet localhost 143 I get:
Trying ::1...
Connected to localhost.
Escape character is '^]'.
I am not sure if I should be getting any more than that.
Frankly, I am not sure where my problem lies or what else to look into. Why am I not able to log into roundcube and where else should I be checking to pinpoint my problem?
已采纳解答
原帖链接 · kojow7 · CC BY-SA 4.0
To get this working I had to change the following:
$config['default_host'] = 'tls://localhost';
to
$config['default_host'] = 'imaps://localhost';
However, I am not sure why this works as it does not seem to be documented anywhere.
In case it helps someone else this is the rest of my configuration:
/etc/dovecot/conf.d/10-master.conf:
service imap-login {
inet_listener imap {
#port = 143
port = 0
}
inet_listener imaps {
#port = 993
#ssl = yes
}
}
service pop3-login {
inet_listener pop3 {
#port = 110
port = 0
}
inet_listener pop3s {
#port = 995
#ssl = yes
}
}
In my roundcube/config/config.inc.php I have:
$config['default_host'] = 'imaps://localhost';
$config['username_domain'] = '%d';
$config['imap_conn_options'] = array(
'ssl' => array(
'verify_peer' => true,
'allow_self_signed' => false,
'ssl_cert' => '/etc/letsencrypt/live/example.com/fullchain.pem',
'ssl_key' => '/etc/letsencrypt/live/example.com/privkey.pem',
'ciphers' => 'TLSv1+HIGH:!aNull:@STRENGTH',
'peer_name' => 'mail.example.com',
),
);
$config['smtp_conn_options'] = array(
'ssl' => array(
'verify_peer' => true,
'allow_self_signed' => false,
'ssl_cert' => '/etc/letsencrypt/live/example.com/fullchain.pem',
'ssl_key' => '/etc/letsencrypt/live/example.com/privkey.pem',
'ciphers' => 'TLSv1+HIGH:!aNull:@STRENGTH',
'peer_name' => 'mail.example.com',
),
);
To help diagnose this, I enabled logging also in my roundcube/config/config.inc.php file:
// Log successful/failed logins to <log_dir>/userlogins or to syslog
$config['log_logins'] = true;
// Log session authentication errors to <log_dir>/session or to syslog
$config['log_session'] = true;
// Log SQL queries to <log_dir>/sql or to syslog
$config['sql_debug'] = true;
// Log IMAP conversation to <log_dir>/imap or to syslog
$config['imap_debug'] = true;
// Log LDAP conversation to <log_dir>/ldap or to syslog
$config['ldap_debug'] = true;
// Log SMTP conversation to <log_dir>/smtp or to syslog
$config['smtp_debug'] = true;
Logs were saved in the roundcube/logs installation directory.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
