Re: Could not convert socket to TLS
Rupesh Singh <[email protected]> Thu, 24 Jul 2025 09:28:47 -0400
| Newsgroups | gmane.comp.jakarta.james.user |
|---|---|
| Message-ID | <CAGVEPA9uNkjGUsXu_TO+OZ2HR+R=NQ5NxS7FLhb49BXA+85HFw@mail.gmail.com> |
--000000000000cdefa9063aaccec2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, can disable ssl and test to ensure cert is the issue. Thanks, Rupesh On Wed, Jul 23, 2025 at 12:14=E2=80=AFPM Matt Pryor < [email protected]> wrote: > Hi all, > > Running the latest code, Apache James 3.8.2 Server JPA Guice. > > I'm seeing this error below when attempting to deliver to some recipients= ' > mail servers: > > 2025-07-22 12:17:49.917 [DEBUG] o.a.j.t.m.r.d.MailDelivrer - Exception > delivering message > (Mail1753186668620-a77a76bb-d3f4-4170-9f5e-8ca8159a2276-to-zzzzzzz.com) - > Could > not convert socket to TLS > 2025-07-22 12:17:49.918 [INFO ] o.a.j.t.m.r.d.MailDelivrer - Could not > convert socket to TLS > > My mailetcontainer.xml contains the following, it seems to work on most > occasions but (sod's law) not when the customer is testing it. > > <processor state=3D"relay" enabledJmx=3D"true"> > <mailet match=3D"ALL" class=3D"RemoteDelivery"> > .... > <startTLS>true</startTLS> > </mailet> > </processor> > > I enabled -Djavax.net.debug=3Dssl:handshake:verbose, -Dmail.debug=3Dtrue = and > after inspecting stderr I believe what's causing it is not trusting the > remote server's SSL certificate which causes Javamail to abandon the > connection. > > Testing with openssl, it seems that the SSL certificate CN doesn't match > the server hostname. > > This must be a common problem in the wild. > > Does anyone have any workarounds? I've tried setting > -Dmail.smtp.ssl.trust=3D* but it doesn't seem to make any difference. > > Many thanks in advance. > > Kind regards > Matt Pryor > Research and Development Manager > > The International Presence Group of Companies > EMAIL: [email protected] > URL: www.International-presence.com > --000000000000cdefa9063aaccec2--