[gelöst] IMAPS mit alten Exchange und TLS1

Hilfe zu OTRS Problemen aller Art
Post Reply
lustigerpinguin
Znuny newbie
Posts: 12
Joined: 21 Jan 2016, 14:23
Znuny Version: 6.0.28
Real Name: Karsten Tröß
Company: N4

[gelöst] IMAPS mit alten Exchange und TLS1

Post by lustigerpinguin »

Hi,
ich habe ein OTRS 6.0.28 auf CentOS8 installiert.
Nun versuche ich die Mails via IMAPS abzuholen - die Gegenstelle kann aber kein aktuelles TLS - dort wird nur TLS1 unterstützt (Win Server 2008R2).

Wie bekomme ich das aktuelle OTRS 6 mit aktuellen Perl - Modulen dazu TLS1 zu machen?

Ich habe, soweit mir möglich, die Einstellungen durchsucht, aber nix passendes gefunden.

Vielen Dank für eure Hilfe.
Gruß
lustigerpinguin
Last edited by lustigerpinguin on 07 Jun 2020, 16:34, edited 1 time in total.
wurzel
Znuny guru
Posts: 3232
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: IMAPS mit alten Exchange und TLS1

Post by wurzel »

Hi,

bau Dir 'n vernünftiges Mailing mit lokalem MX/MTA/MDA
https://doc.otrs.com/doc/manual/admin/6 ... eiving-cmd

viele Grüße
Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: IMAPS mit alten Exchange und TLS1

Post by root »

Hi,
lustigerpinguin wrote: 05 Jun 2020, 22:30 Wie bekomme ich das aktuelle OTRS 6 mit aktuellen Perl - Modulen dazu TLS1 zu machen?
wer sagt denn das das nicht geht?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
lustigerpinguin
Znuny newbie
Posts: 12
Joined: 21 Jan 2016, 14:23
Znuny Version: 6.0.28
Real Name: Karsten Tröß
Company: N4

Re: IMAPS mit alten Exchange und TLS1

Post by lustigerpinguin »

Hallo
@root

meine Frage war eher wie es geht.
Ich habe keine IMAPS - Einstellung gefunden die nur TLS1 macht.

Sollte ich die Frage falsch verstanden haben - so habe ich getestet:
openssl s_client -connect <imap-mail-server> -showcerts -> hat nicht funktioniert
openssl s_client -connect -tls1 <imap-mail-server> -showcerts -> hat funktioniert

-tls1_1 hat ebenfalls NICHT funktioniert

@wurzel
ich hoffe das es eine Einstellung gibt damit man das nicht braucht.

Danke.
Gruß
lustigerpinguin
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: IMAPS mit alten Exchange und TLS1

Post by root »

lustigerpinguin wrote: 06 Jun 2020, 21:51 Hallo
@root

meine Frage war eher wie es geht.
Ich habe keine IMAPS - Einstellung gefunden die nur TLS1 macht.
Hi,

es gibt auch keine Einstellung bzgl. der TLS Version für IMAPS in OTRS. Hast Du denn einfach mal die Zugangs-/Verbindungsdaten in OTRS eingetragen und getestet?

Wenn das schiefgeht kann man auch als OTRS Benutzer mit dem Befehl bin/otrs.Console.pl Maint::PostMaster::MailAccountFetch --debug testen um zu sehen was es sein könnte

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
lustigerpinguin
Znuny newbie
Posts: 12
Joined: 21 Jan 2016, 14:23
Znuny Version: 6.0.28
Real Name: Karsten Tröß
Company: N4

Re: IMAPS mit alten Exchange und TLS1

Post by lustigerpinguin »

Hallo @root,

den von dir genannten Test habe ich gemacht (Domain geändert).

Code: Select all

bash-4.4$ bin/otrs.Console.pl Maint::PostMaster::MailAccountFetch  --debug

Spawning child process to fetch incoming messages from mail accounts...

<imaps-mail.server.tld> (IMAPS)...
[...cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connecting to <imaps-mail.server.tld>:993
[...cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connected, returning socket
[...cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connecting to <imaps-mail.server.tld>:993
[...cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connected, returning socket
ERROR: OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-10 Perl: 5.26.3 OS: linux Time: Sat Jun 6 22:25:15 2020

 Message: CommunicationLog(ID:2467,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:2467)::Kernel::System::MailAccount::IMAP => IMAPS: Can't connect to <imaps-mail.server.tld>

 Traceback (17531): 
   Module: Kernel::System::CommunicationLog::_LogError Line: 538
   Module: Kernel::System::CommunicationLog::ObjectLog Line: 306
   Module: Kernel::System::MailAccount::IMAP::_Fetch Line: 214
   Module: Kernel::System::MailAccount::IMAP::Fetch Line: 101
   Module: Kernel::System::MailAccount::MailAccountFetch Line: 566
   Module: (eval) Line: 172
   Module: Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch::Run Line: 164
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: bin/otrs.Console.pl Line: 36

<imaps-mail.server.tld> (IMAPS)...
[...cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connecting to <imaps-mail.server.tld>:993
[...cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connected, returning socket
[...cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connecting to <imaps-mail.server.tld>:993
[...cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connected, returning socket
ERROR: OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-10 Perl: 5.26.3 OS: linux Time: Sat Jun 6 22:25:20 2020

 Message: CommunicationLog(ID:2468,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:2468)::Kernel::System::MailAccount::IMAP => IMAPS: Can't connect to <imaps-mail.server.tld>

 Traceback (17531): 
   Module: Kernel::System::CommunicationLog::_LogError Line: 538
   Module: Kernel::System::CommunicationLog::ObjectLog Line: 306
   Module: Kernel::System::MailAccount::IMAP::_Fetch Line: 214
   Module: Kernel::System::MailAccount::IMAP::Fetch Line: 101
   Module: Kernel::System::MailAccount::MailAccountFetch Line: 566
   Module: (eval) Line: 172
   Module: Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch::Run Line: 164
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: bin/otrs.Console.pl Line: 36

Done.
Diese Ausgabe sagt mir nur das es Fehler gibt - mehr kann ich hier nicht erkennen.
Der Betreiber des MS Servers 2008R2 hat mir allerdings bereits gesagt dass er die ankommende Verbindung sieht, aber diese dann gleich wieder beendet wird - er tippt auf die TLS - Version.
Mit dem openssl -connect habe ich das versucht zu prüfen: erst durch explizite angabe von -tls1 hat es korrekt funktioniert.
Zur Gegenkontrolle habe ich das openssl -connect auch zu dem t-online und GMail - IMAP - Server ohne Parameter gemacht: dort funktioniert es.

Kann man evtl. im Perl - Code irgendwo etwas anpassen dass er TLS1 macht?

Danke
Gruß
lustigerpinguin
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: IMAPS mit alten Exchange und TLS1

Post by jojo »

welche Einstellungen hast Du für den Account im OTRS genommen?

- IMAP
- IMAPS
- IMAPTLS
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: IMAPS mit alten Exchange und TLS1

Post by root »

Hi,

also aus der Meldung IMAPS: Can't connect to <imaps-mail.server.tld> deutet ich jetzt mal das auf Port 993 kein Dienst lauscht. Am einfachsten testet man das mit telnet host port

Gab es denn eine Fehlermeldung bei dem nicht funktionierenden openssl Aufruf?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
lustigerpinguin
Znuny newbie
Posts: 12
Joined: 21 Jan 2016, 14:23
Znuny Version: 6.0.28
Real Name: Karsten Tröß
Company: N4

Re: IMAPS mit alten Exchange und TLS1

Post by lustigerpinguin »

Hi,
@jojo
ich habe es mit allen Einstellungen versucht - keine davon hat funktioniert

@root
was das Testen angeht:
ich habe mit

Code: Select all

openssl s_client -tls1_1 -connect <imaps-mail.server.tld>:993 -showcerts
getestet - da dieser Aufruf funktioniert würde ich mal behaupten dass auf Port 993 jemand lauscht. Wenn ich mich mit telnet mit dem Port verbinde bekomme ich auch ein connect.
Zur Frage der Fehlermeldung:

Code: Select all

# openssl s_client -connect <imaps-mail.server.tld>:993 -showcerts
CONNECTED(00000003)
139711892096832:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:ssl/statem/statem_lib.c:1919:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 1978 bytes and written 336 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
und wenn das ganze korrekt läuft (mit gekürzter / anonymisierter Ausgabe):

Code: Select all

# openssl s_client -tls1 -connect <imaps-mail.server.tld>:993 -showcerts
CONNECTED(00000003)
depth=0 C = DE, ST = xx, L = ORT, O = Firma, CN = imap.mail.local
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 C = DE, ST = xx, L = ORT, O = Firma, CN = imap.mail.local
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
 0 s:C = DE, ST = xx, L = ORT, O = Firma, CN = imap.mail.local
   i:DC = local, DC = Firma, CN = Server
-----BEGIN CERTIFICATE-----
MIIGAzCCBO
--- snip - snap ---
sA==
-----END CERTIFICATE-----
---
Server certificate
subject=C = DE, ST = xx, L = ORT, O = Firma, CN = imap.mail.local

issuer=DC = local, DC = Firma, CN = Server

---
No client certificate CA names sent
Peer signing digest: MD5-SHA1
Peer signature type: RSA
Server Temp Key: ECDH, P-256, 256 bits
---
SSL handshake has read 2037 bytes and written 268 bytes
Verification error: unable to verify the first certificate
---
New, TLSv1.0, Cipher is ECDHE-RSA-AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1
    Cipher    : ECDHE-RSA-AES256-SHA
    Session-ID: 854--snip---
    Session-ID-ctx: 
    Master-Key: 9F9--snip---
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1591525292
    Timeout   : 7200 (sec)
    Verify return code: 21 (unable to verify the first certificate)
    Extended master secret: yes
---
* OK The Microsoft Exchange IMAP4 service is ready.
Ich mache den connect - Versuch jedes mal auf den gleichen Server und den gleichen Port. Wenn ich als Parameter -tls1 mitgebe funktioniert es.

Der IMAP - Server ist, wie oben zu sehen, ein Exchange 2010 der auf einem Windows Server 2008R2 läuft.

Dem IMAP - Aufruf im OTRS müsste ich das entsprechend mitgeben - dann sollte es auch funktionieren.
Die 'alte' OTRS 5.0.13 Installation läuft auf einem ubuntu 14.04 (weshalb da auch alles neu gemacht wird).
Bei dieser alten Installation funktioniert die Einstellung die bei der neuen nicht mehr funktioniert. Was wiederum darauf hin deutet das die neue Installation 'einfach nur' mit aktuellen Protokollen arbeitet - hier müsste man irgendwo sagen: mach nur tls1 und nichts neueres.

Wie bereits gesagt: wenn ich das im Code anpassen könnte wäre mir das auch egal, Hauptsache es funktioniert.

Danke.
Gruß
lustigerpinguin
wurzel
Znuny guru
Posts: 3232
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: IMAPS mit alten Exchange und TLS1

Post by wurzel »

Hi,
lustigerpinguin wrote: 07 Jun 2020, 12:35 (...)Wie bereits gesagt: wenn ich das im Code anpassen könnte wäre mir das auch egal, Hauptsache es funktioniert.
Code ändern kannste? Dann kannste auch 'n lokalen Postfix aufsetzen. Wäre die sauberste Variante.
Wenn das IMAP und das Zertifikat Gedöns nicht läuft (ich kenne allerdings keine einzige Implementierung wo es nicht läuft, deshalb vermute ich eine Einschränkung auf dem Exchange Server) ist ein lokaler MX/MTA/MDA am Besten.

viele Grüße
Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: IMAPS mit alten Exchange und TLS1

Post by root »

Hi,
139711892096832:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:ssl/statem/statem_lib.c:1919:
das ist doch mal eine Fehlermeldung. Da Du CentOS 8 erwähnt hast würde ich als erster die Crypto Policy auf LEGACY ändern. Das dürfte schon ausreichen.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
lustigerpinguin
Znuny newbie
Posts: 12
Joined: 21 Jan 2016, 14:23
Znuny Version: 6.0.28
Real Name: Karsten Tröß
Company: N4

Re: IMAPS mit alten Exchange und TLS1

Post by lustigerpinguin »

Hallo @root,

danke. Das hat geholfen.
Ist vielleicht nicht die sauberste Lösung aber dafür ausreichend, denke ich.

Danke.

Gruß
lustigerpinguin
Post Reply