1

I'm using openpop to read PEC email on Aruba with fw 4.6,
it works fine until Aruba update your security protol to tls 1.2.

pop3Client.Connect("ServerName", 995, True)

OpenPOP: (DEBUG) Server-Response: "-ERR [AUTH] La versione del client di posta che stai utilizzando non rispetta i requisiti di sicurezza minimi richiesti dal servizio PEC. Per maggiori dettagli sui requisiti di compatibilit?? vai su verifica.pec.it" OpenPOP: Problem logging in using method Auto. Server response was: -ERR [AUTH] La versione del client di posta che stai utilizzando non rispetta i requisiti di sicurezza minimi richiesti dal servizio PEC. Per maggiori dettagli sui requisiti di compatibilit?? vai su verifica.pec.it Eccezione generata: 'OpenPop.Pop3.Exceptions.InvalidLoginException' in OpenPop.dll Eccezione di tipo 'OpenPop.Pop3.Exceptions.InvalidLoginException' in OpenPop.dll non gestita nel codice utente Server did not accept user credentials

Dado
  • 21
  • 3
  • On Windows 7, the .Net `ServicePointManager` may not have TLS1.2 as the default SSL protocol, hence it may not handle a TLS 1.2 handshake. You can try to manually set the [ServicePointManager.SecurityProtocol](https://learn.microsoft.com/en-us/dotnet/api/system.net.servicepointmanager.securityprotocol) to [`SecurityProtocolType`](https://learn.microsoft.com/en-us/dotnet/api/system.net.securityprotocoltype)`.Tls12` beforehand. See also the [BypassSslCertificateCheck](http://hpop.sourceforge.net/exampleOverrideSSL.php) example on SourceForge. – Jimi Oct 02 '19 at 17:25
  • If you want to make use of the new security layer features on both Windows 10 and Windows 7, I suggest to reference .Net `4.7.1+` instead of .Net `4.6.x`. – Jimi Oct 02 '19 at 17:33
  • I'm having the same exact problem – Stefano Losi Oct 02 '19 at 18:32
  • I set manually TLS with System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
    – Dado Oct 03 '19 at 07:37
  • Also with .Net 4.7.2 same problem – Dado Oct 03 '19 at 07:50
  • Post the code you're using. Note that OpenPOP, when a SSL connection is requested (setting `True` in the `Connect()` method as you're doing now, for example), creates a SslStream on top of the NetworkStream already created by a TcpClient connection. Thus, at this point, a TLS1.2 SSL connection must have already been negotiated. `SecurityProtocolType.Tls12` must be already set. Read this: [Update to enable TLS 1.1 and TLS 1.2 as default secure protocols in WinHTTP in Windows](https://support.microsoft.com/en-us/help/3140245/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-wi) – Jimi Oct 03 '19 at 08:12
  • I have same problem (Aruba PEC), solved following this post to enforce strong cryptography on .net framework [.Net Framework 4.6.1 not defaulting to TLS 1.2](https://stackoverflow.com/a/46177690/12158285). Also reference .Net 4.7.1 in project. Hope this help. – DavideB Oct 03 '19 at 11:00

0 Answers0