1

Topic: SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown

- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6.5

Hello,

    I am able to connect to iRedmail via JavaMail, though upon doing so, I am not able totransmit an e-mail message via SMTP.  Upon doing so, I encounter errors (client/server logs are below).  How to remedy?  Please advise, and thank you.

Best regards,

rehmke

[*** Server Log ***]

Feb 10 22:37:46 mail postfix/smtpd[1765]: connect from unknown[webserver]
Feb 10 22:37:50 mail postfix/smtpd[1765]: SSL_accept error from unknown[webserver]: 0
Feb 10 22:37:50 mail postfix/smtpd[1765]: warning: TLS library problem: 1765:error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown:s3_pkt.c:1256:SSL alert number 46:
Feb 10 22:37:50 mail postfix/smtpd[1765]: lost connection after STARTTLS from unknown[webserver]
Feb 10 22:37:50 mail postfix/smtpd[1765]: disconnect from unknown[webserver]

[*** Client Log ***]

DEBUG: JavaMail version 1.4.5
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "mailserver", port 587, isSSL false
220 mailserver ESMTP Postfix
DEBUG SMTP: connected to host "mailserver", port: 587
EHLO workstation
250-mailserver
250-PIPELINING
250-SIZE 15728640
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "SIZE", arg "15728640"
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
STARTTLS
220 2.0.0 Ready to start TLS

[*** JavaMail / Apache Commons Mail Source Code ***]

                import import org.apache.commons.mail.*
                Email email = new SimpleEmail();
                email.setDebug(DEBUG);
                email.setSmtpPort(587);
                email.setStartTLSEnabled(true);
                email.setStartTLSRequired(true);
                email.setHostName(Configuration.get("EMAIL_HOST"));
                email.setAuthenticator(new DefaultAuthenticator(Configuration.get("EMAIL_USER"), Configuration.get("EMAIL_PASS")));
                email.setFrom(_from, _from);
                email.addTo(_to);
                email.setSubject(_subject);
                email.setMsg(_body);               
                email.send();

2

Re: SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown

Did you try to send email via smtp over tls with other mail clients? E.g outlook, thunderbird. Do they work? If yes, there might be something wrong in your java code.

If all of them failed, there must be something wrong with your server. Paste output of command "postconf -n" and "dovecot -n" here to help troubleshoot please.