0

I have set up roundcube on a debian box per the instructions here: https://www.server-world.info/en/note?os=Debian_10&p=httpd&f=14

When trying to log into the web interface, I get a "Connection to storage server failed". When using the openssl command, I can log in remotely with the a authenticate login just fine. And when I select the inbox remotely, the mailboxes are automatically generated in the user's directory. So there has to be some disconnect between roundcube and dovecot.

This is the in logs about 3x for each failed attempt on roundcube:

Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x10, ret=1: before SSL initialization
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: before SSL initialization
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2002, ret=-1: before SSL initialization
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: before SSL initialization
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS read client hello
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write server hello
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write certificate
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write key exchange
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write server done
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2002, ret=-1: SSLv3/TLS write server done
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2002, ret=-1: SSLv3/TLS write server done
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2002, ret=-1: SSLv3/TLS write server done
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write server done
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS read client key exchange
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS read change cipher spec
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS read finished
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write session ticket
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write change cipher spec
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write finished
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x20, ret=1: SSL negotiation finished successfully
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL: where=0x2002, ret=1: SSL negotiation finished successfully
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL alert: close notify
Oct  5 18:44:47 mail dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=xxx.xxx.xxx.xxx, lip=xxx.xxx.xxx.xxx, TLS, session=<wJBr4PCwYrQD5UF7>
Oct  5 18:44:47 mail dovecot: imap-login: Debug: SSL alert: close notify

Roundcube config:

$config = array();
$config['default_host'] = 'tls://example.com';
$config['smtp_server'] = 'tls://example.com';
$config['smtp_port'] = 587;
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['support_url'] = '';
$config['product_name'] = 'Webmail';
$config['des_key'] = 'abcd1234';
$config['plugins'] = array(
);
$config['skin'] = 'larry';
$config['enable_spellcheck'] = false;
$config['default_port'] = 143;
$config['smtp_auth_type'] = 'LOGIN';
$config['smtp_helo_host'] = 'mail.smartlu63.org';
$config['main_domain'] = 'smartlu63.org';
$config['useragent'] = 'Union Webmail';
$config['imap_conn_options'] = array( 'ssl' => array( 'verify_peer' => true, 'CN_match' => 'smartlu63.org', 'allow_self_signed' => true, 'ciphers' => 'HIGH:!SSLv2:!SSLv3',),);

Dovecot config

auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain login
auth_verbose = yes
auth_verbose_passwords = yes
disable_plaintext_auth = no
mail_debug = yes
mail_location = maildir:~/Maildir
mail_privileged_group = mail
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  driver = pam
}
plugin {
  sieve = file:~/sieve;active=~/.dovecot.sieve
}
protocols = " imap pop3"
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
}
ssl_cert = </etc/dovecot/private/dovecot.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
userdb {
  driver = passwd
}
verbose_ssl = yes

Note: I uninstalled the sieve package to try to minimized the complexity of the configuration.

StevieD
  • 474
  • 5
  • 17

1 Answers1

0

Setting value $config['default_host'] from = tls://mail.example.com to just mail.example.com did the trick. Not sure why.

StevieD
  • 474
  • 5
  • 17