Re: Could not convert socket to TLS

Benoit TELLIER <[email protected]> Thu, 24 Jul 2025 15:15:11 +0000
Newsgroups gmane.comp.jakarta.james.user
Message-ID <[email protected]>
---=Part.17.fd4d7a46f37f5654.1983d00ac25.2a60e236a48e6743=-
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT, de-DE
Content-Language: en-US

Have you tried setting the=C2=A0verifyServerIdentity
property to false in r=
emote delivery to false?
CF=C2=A0https://james=2Estaged=2Eapache=2Eorg/jame=
s-project/3=2E9=2E0/servers/distributed/configure/mailets=2Ehtml#_remotedel=
ivery=C2=A0verifyServerIdentityAlso if you use self signed certificates you=
 may consider unsing authoritative ones for RemoteDelivery=2E--=C2=A0

Best=
 regards,

Benoit TELLIER

General manager of Linagora VIETNAM=2E
Product o=
wner for Team-Mail product=2E
Chairman of the Apache James project=2E

Mail=
: btellier@linagora=2Ecom
Tel: (0033) 6 77 26 04 58 (WhatsApp, Signal)


On=
 Jul 24, 2025 3:29 PM, from Rupesh Singh <thakur01@gmail=2Ecom>Hi, can disa=
ble ssl and test to ensure cert is the issue=2E
Thanks,
Rupesh

On Wed, Jul=
 23, 2025 at 12:14=E2=80=AFPM Matt Pryor <
pryor@international-presence=2Ec=
om> wrote:

> Hi all,
>
> Running the latest code, Apache James 3=2E8=2E2 S=
erver JPA Guice=2E
>
> I'm seeing this error below when attempting to deliv=
er to some recipients'
> mail servers:
>
> 2025-07-22 12:17:49=2E917 [DEBUG=
] o=2Ea=2Ej=2Et=2Em=2Er=2Ed=2EMailDelivrer - Exception
> delivering message=

> (Mail1753186668620-a77a76bb-d3f4-4170-9f5e-8ca8159a2276-to-zzzzzzz=2Ecom=
) -
> Could
> not convert socket to TLS
> 2025-07-22 12:17:49=2E918 [INFO ]=
 o=2Ea=2Ej=2Et=2Em=2Er=2Ed=2EMailDelivrer - Could not
> convert socket to T=
LS
>
> My mailetcontainer=2Exml contains the following, it seems to work on=
 most
> occasions but (sod's law) not when the customer is testing it=2E
>
=
> <processor state=3D"relay" enabledJmx=3D"true">
>    <mailet match=3D"ALL=
" class=3D"RemoteDelivery">
>        =2E=2E=2E=2E
>        <startTLS>true</=
startTLS>
>    </mailet>
> </processor>
>
> I enabled -Djavax=2Enet=2Edebug=
=3Dssl:handshake:verbose, -Dmail=2Edebug=3Dtrue and
> after inspecting stde=
rr I believe what's causing it is not trusting the
> remote server's SSL ce=
rtificate which causes Javamail to abandon the
> connection=2E
>
> Testing =
with openssl, it seems that the SSL certificate CN doesn't match
> the serv=
er hostname=2E
>
> This must be a common problem in the wild=2E
>
> Does an=
yone have any workarounds? I've tried setting
> -Dmail=2Esmtp=2Essl=2Etrust=
=3D* but it doesn't seem to make any difference=2E
>
> Many thanks in advan=
ce=2E
>
> Kind regards
> Matt Pryor
> Research and Development Manager
>
> =
The International Presence Group of Companies
> EMAIL: pryor@presencebpm=2E=
com
> URL: International-presence=2Ecom
>

---=Part.17.fd4d7a46f37f5654.1983d00ac25.2a60e236a48e6743=---