imapx icon indicating copy to clipboard operation
imapx copied to clipboard

how to use TLS 1.2?

Open LarsOde opened this issue 4 years ago • 3 comments

Hi,

we try to implement a script on a Server 2019. I have to enable TLS1.0 and TLS1.1 (client) for it to work... can I somehow force usage of TLS1.2 with imapx?

LarsOde avatar Jun 25 '20 10:06 LarsOde

https://github.com/azanov/imapx/issues/19#issuecomment-432969814

Have not checked it, though.

LaraSQP avatar Jul 22 '20 03:07 LaraSQP

found it, this works $imap.SslProtocol = [Net.SecurityProtocolType]::Tls12

LarsOde avatar Jul 22 '20 08:07 LarsOde

found it, this works $imap.SslProtocol = [Net.SecurityProtocolType]::Tls12

Thanks, finaly I established a succesfull connection, but for some reason, this parameter works only if added after other connection parameters, heres an example

This doesnt work:

$client = New-Object ImapX.ImapClient $client.SslProtocol = [Net.SecurityProtocolType]::Tls12 $client.Behavior.MessageFetchMode = "Full" $client.Host = "mail.example.com" $client.Port = 993 $client.UseSsl = $true $client.Connect()

This works:

$client = New-Object ImapX.ImapClient $client.Behavior.MessageFetchMode = "Full" $client.Host = "mail.example.com" $client.Port = 993 $client.UseSsl = $true $client.SslProtocol = [Net.SecurityProtocolType]::Tls12 $client.Connect()

reinistihovs avatar Apr 23 '21 06:04 reinistihovs