[SOLVED]RoundCube SMTP Error: Authentication failure

Discussion in 'Installation/Configuration' started by Samo_slo, Aug 24, 2016.

  1. Samo_slo

    Samo_slo Member

    I'm using Postfix, Dovecot and Roundcube 1.1.3 and it works when using smtp_port = 25. When I change the port to 587 I get the error ERROR: STARTTLS failed () and SMTP Error: Authentication failure: STARTTLS failed.
    My roundcube config file is:

    $config['default_host'] = 'tls://%n';

    $config['smtp_server'] = 'tls://%n;

    $config['smtp_port'] = 587;

    $config['smtp_user'] = '%u';

    $config['smtp_pass'] = '%p';

    $config['smtp_conn_options'] = array(
    'ssl' => array(
    'verify_peer' => true,
    'verify_depth' => 3,
    'cafile' => '/usr/local/share/ca-certificates/ispserver.crt',
    //'local_cert' => '/etc/ssl/private/pure-ftpd.pem'
    ),
    );
    If I use ms outlook I can send and recive email on port 587 but in roundcube i just get Authentication error 220. Can anyone help?
     
  2. Samo_slo

    Samo_slo Member

    Ok... it's probablly a cert issue, because after changing the roundcube config.ini.php
    $config['smtp_conn_options'] = array(
    'ssl' => array(
    'verify_peer' => false,
    'verify_peer_name' => false,
    ....
    $config['smtp_auth_type'] = 'PLAIN';

    I finally get an error in postfix log
    SSL_accept error from xx-xxx-xxx-xxx.static.t-2.net[xx.xxx.xxx.xxx]: -1
    Aug 25 11:40:02 mail postfix/submission/smtpd[21461]: warning: TLS library problem: error:140760FC:SSL routines: SSL23_GET_CLIENT_HELLO:unknown protocol:s23_srvr.c:649:

    and when running "openssl s_client -connect mail.mydomain.si:587 -starttls smtp" I get:
    Verify return code: 20 (unable to get local issuer certificate)

    So I thing that I need to get a different cert to fix this.
     
  3. Samo_slo

    Samo_slo Member

    SOLVED the problem. Had to add to config.ini:

    $config['default_host'] = 'tls://%n';

    $config['imap_conn_options'] = array(
    'ssl' => array(
    'verify_peer' => false,
    'verfify_peer_name' => false,
    ),
    );
    $config['smtp_conn_options'] = array(
    'ssl' => array(
    'verify_peer' => false,
    'verify_peer_name' => false,
    ),
    );
     

Share This Page