7

I recently installed Postfix, Dovecot to setup a mail server on my own VPS ( using this tutorial: Email with Postfix, Dovecot, Mysql)

Imaps server uses port 993 for Authentication, and Postfix uses port 25 to send mails. In this tutorial, users stored in a Database ( so imaps use mysql to authenticate users). i'm sure every thing works fine with imaps and postfix , because few days ago i installed Kmail client (on my linux) and receive mails from my server. sending mails also works fine, i sent a mail to Gmail and google received it without a problem (in my "Gmail inbox" not spam folder)

So to get to my Emails from a web mail client, i installed Roundcube on /var/www/mail directory.

I configured Roundcube many times. but each time it gives me this Error:

IMAP Error: Login failed for [me@mydomain] from X.x.X.x . Empty startup greeting (localhost:993) in /var/www/mm/program/lib/Roundcube/rcube_imap.php on line 184 (POST /mm/?_task=login?_task=login&_action=login)

When i do log in from roundcube, imap server says ( in /var/log/mail.log ):

May 20 07:05:16 my-server dovecot: imap-login: Disconnected (no auth attempts): rip=::1, lip=::1, TLS handshaking: Disconnected

Here is my roundcube config file :

$config['db_dsnw'] = 'mysql://roundcubeuser:myPassword@localhost/roundcubemail';
// ----------------------------------
// IMAP
// ----------------------------------
$config['debug_level'] = 13;
$config['default_host'] = 'ssl://127.0.0.1';
$config['default_port'] = 993;
// ----------------------------------
// SMTP
// ----------------------------------
$config['smtp_server'] = 'ssl://localhost';

What's the problem? i really have no idea what is happening !

Thank you.

Amin Salami
  • 71
  • 1
  • 1
  • 3

2 Answers2

6

In my config :

$config['default_host'] = 'imaps://domain.tld';

// TCP port used for IMAP connections
$config['default_port'] = 993;

I know that it is not the doc, but it is working. Think about certificate : it should be compliant with your domain.tld

Dom
  • 6,628
  • 1
  • 19
  • 24
  • no that imaps://domain.tld doesn't work. i'm confused! what about certificate? what did u mean? – Amin Salami May 22 '14 at 06:57
  • 'imaps' string was also include for comparability for `ssl` string, it defined in [this line of code](https://github.com/roundcube/roundcubemail/blob/216b31dd99b54e7be3df8feebeafae72e423bb1c/program/include/rcmail.php#L533). – masegaloeh Mar 05 '15 at 10:01
  • This solved my problem with Roundcubemail 1.1.3 on CentOS 7. Thank you. – David W Jan 05 '16 at 10:02
  • 1
    It's taken me two days f&$%ing with `tls://` to find this answer, you've saved my hair, thank you! – oucil Dec 05 '19 at 22:10
  • this actually saved my day too. not documented on roundcube side but works for 1.3.4 too – Lelio Faieta Apr 28 '20 at 10:39
6

once i have problem with one of my mail servers i use these in dovecot.conf :

auth_verbose=yes
auth_debug=yes
auth_debug_passwords=yes
mail_debug=yes
verbose_ssl=yes
auth_verbose_passwords=plain

then use:

tail -f /var/log/mail.log

you will see everything that is going on behind the scene..

PLNech
  • 109
  • 5
ADM
  • 1,353
  • 12
  • 16