OTRS 6 und Office 365 SMTP

Hilfe zu OTRS Problemen aller Art
Post Reply
gr8smiley
Znuny newbie
Posts: 27
Joined: 16 Feb 2019, 22:45
Znuny Version: OTRS6

OTRS 6 und Office 365 SMTP

Post by gr8smiley »

Guten Morgen!

Zuerst mal muss ich sagen dass ich sowohl bei Linux als auch bei OTRS ein Neuling bin. Man möge mir Anfängerfehler bitte verzeihen.

Ich habe auf einem CentOS 7 ein OTRS 6 installiert. Beides aktuelle Versionen.

Der Versand von E-Mails aus dem OTRS über das MultiSMTP Plugin scheitert mit dem Fehler 500 AUTH Command unknown.

Das dürfte glaube ich schon bekannt sein bzw. wurde hier auch schon diskutiert. Ich bin auch schon in Kontakt mit dem Verfasser des MultiSMTP Plugins und er kam zu dem Schluss dass das OTRS 6 möglicherweise ein Problem mit Office 365 hat.

Ich habe bereits einen Connector im Office 365 erstellt um den E-Mail versand zu ermöglichen, jedoch schaffe ich es nur unverschlüsselt. Das erscheint mir in Zeiten der DSGVO nicht mehr praktikabel.

Meine Fragen:

1. Hat schon jemand OTRS 6 mit MultiSMTP und STARTTLS MIT Authentifizierung OHNE Connector zum laufen gebracht? Wenn ja wie?

2. Hat schon jemand OTRS 6 mit MultiSMTP und STARTTLS OHNE Authentifizierung MIT Connector zum laufen gebracht? Wenn ja wie?

3. Gibt es Ansätze wo das Problem mit OTRS 6 und Office 365 liegen kann. Theoretisch sollte es ja nur der SMTP Standard sein. Praktisch hat Office 365 vielleicht seinen eigenen Standard.

Für jede Hilfe wäre ich sehr dankbar. Falls ich Log Dateien oder sonstige Informationen liefern soll bitte sagen.

Schöne Grüße,

Thomas L.
gr8smiley
Znuny newbie
Posts: 27
Joined: 16 Feb 2019, 22:45
Znuny Version: OTRS6

Re: OTRS 6 und Office 365 SMTP

Post by gr8smiley »

Hallo zusammen,

ich antworte mal auf mein eigenes Post :-)

Ich habe gerade herausgefunden durch Analyse der Logs und Test dass der Office 365 Mailserver nach dem StartTLS Kommando NOCHEINMAL EIN EHLO haben möchte. Meiner Meinung nach wird das von OTRS nicht gesendet.

Könnte das bitte jemand bestätigen bzw. mir sagen ob sich das in den entsprechenden Scripts ändern ließe?

Falls sich das bestätigen würde könnte man so vielleicht auch das ursprüngliche Problem lösen.

Vielen Dank für Eure Hilfe!

Schöne Grüße,

Thomas L

Aus dem OTRS Log:
Net::SMTP=GLOB(0x48a5f70)>>> EHLO otrs......
Net::SMTP=GLOB(0x48a5f70)<<< 250-VE1EUR03FT042.mail.protection.outlook.com Hello [89.26.108.219]
Net::SMTP=GLOB(0x48a5f70)<<< 250-SIZE 157286400
Net::SMTP=GLOB(0x48a5f70)<<< 250-PIPELINING
Net::SMTP=GLOB(0x48a5f70)<<< 250-DSN
Net::SMTP=GLOB(0x48a5f70)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP=GLOB(0x48a5f70)<<< 250-STARTTLS
Net::SMTP=GLOB(0x48a5f70)<<< 250-8BITMIME
Net::SMTP=GLOB(0x48a5f70)<<< 250-BINARYMIME
Net::SMTP=GLOB(0x48a5f70)<<< 250-CHUNKING
Net::SMTP=GLOB(0x48a5f70)<<< 250 SMTPUTF8
Net::SMTP=GLOB(0x48a5f70)>>> STARTTLS
Net::SMTP=GLOB(0x48a5f70)<<< 220 2.0.0 SMTP server ready
Net::SMTP=GLOB(0x48a5f70)>>> MAIL FROM:<info@xxyyxx.eu>
[Tue Feb 19 13:46:13 2019] otrs.Daemon.pl: Net::SMTP: Unexpected EOF on command channel at /opt/otrs/Kerne.....

Wenn ich die Verbindung manuell versuche steht der Hinweis ganz am Ende:

(Connected with ....mail.protection.outlook.com)
220 DB5EUR03FT045.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Tue, 19 Feb 2019 13:20:40 +0000
EHLO otrs....
250-DB5EUR03FT045.mail.protection.outlook.com Hello [89.26.xxx.yyy]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
220 2.0.0 SMTP server ready
[Subject]
CN=mail.protection.outlook.com, O=Microsoft Corporation, L=Redmond, S=Washington, C=US

[Issuer]
CN=GlobalSign Organization Validation CA - SHA256 - G3, O=GlobalSign nv-sa, C=BE

[Serial Number]
5760C0769D1714309D2D95DE

[Not Before]
19.05.2018 00:06:55

[Not After]
19.05.2020 00:06:55

[Thumbprint]
73B89750FA406F7D4F7E43A9355A9D271079E938

Policy Errors: None

(TLS Active - Don't forget to resend EHLO)
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: OTRS 6 und Office 365 SMTP

Post by reneeb »

Eigentlich sendet das Perl-Modul das erneute EHLO: https://github.com/steve-m-hay/perl-lib ... TP.pm#L276

Da müsste man wahrscheinlich noch tiefer in der Debugging einsteigen, an welcher Stelle ggf. der Rückgabewert des Mailservers falsch ausgewertet wird...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
gr8smiley
Znuny newbie
Posts: 27
Joined: 16 Feb 2019, 22:45
Znuny Version: OTRS6

Re: OTRS 6 und Office 365 SMTP

Post by gr8smiley »

Hallo nochmal:

Ich möchte hier noch die RFC zitieren falls es jemanden interessiert. Darin steht der Client SOLLTE - "SHOULD" noch einmal ein EHLO senden. Vielleicht liegt da das Problem. Der O365 Server verlangt das obwohl er laut RFC scheinbar nicht darauf bestehen sollte.

4.2 Result of the STARTTLS Command

Upon completion of the TLS handshake, the SMTP protocol is reset to
the initial state (the state in SMTP after a server issues a 220
service ready greeting). The server MUST discard any knowledge
obtained from the client, such as the argument to the EHLO command,
which was not obtained from the TLS negotiation itself. The client
MUST discard any knowledge obtained from the server, such as the list
of SMTP service extensions, which was not obtained from the TLS
negotiation itself. The client SHOULD send an EHLO command as the
first command after a successful TLS negotiation.


5. Usage Example

The following dialog illustrates how a client and server can start a
TLS session:

S: <waits for connection on TCP port 25>
C: <opens connection>
S: 220 mail.imc.org SMTP service ready
C: EHLO mail.example.com
S: 250-mail.imc.org offers a warm hug of welcome
S: 250-8BITMIME
S: 250-STARTTLS
S: 250 DSN
C: STARTTLS
S: 220 Go ahead
C: <starts TLS negotiation>
C & S: <negotiate a TLS session>
C & S: <check result of negotiation>
C: EHLO mail.example.com
S: 250-mail.imc.org touches your hand gently for a moment
S: 250-8BITMIME
S: 250 DSN
gr8smiley
Znuny newbie
Posts: 27
Joined: 16 Feb 2019, 22:45
Znuny Version: OTRS6

Re: OTRS 6 und Office 365 SMTP

Post by gr8smiley »

Hallo Renee,

danke für deine Antwort.

Ich teste das mit dem Programm Socketlabs SMTP Console. Wenn ich da das StartTLS Kommando über das Menü schicken lassen macht das Programm den Handshake und die Sitzung funktioniert. Ich denke dass das Problem beim STARTTLS Handshake liegt. Aber das übersteigt mein Wissen leider.

Vielen Dank für Eure Hilfe!

220 VE1EUR03FT032.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Tue, 19 Feb 2019 14:10:12 +0000
ehlo otrs.local
250-VE1EUR03FT032.mail.protection.outlook.com Hello [89.26.x.y]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
220 2.0.0 SMTP server ready
[Subject]
CN=mail.protection.outlook.com, O=Microsoft Corporation, L=Redmond, S=Washington, C=US

[Issuer]
CN=GlobalSign Organization Validation CA - SHA256 - G3, O=GlobalSign nv-sa, C=BE

[Serial Number]
5760C0769D1714309D2D95DE

[Not Before]
19.05.2018 00:06:55

[Not After]
19.05.2020 00:06:55

[Thumbprint]
73B89750FA406F7D4F7E43A9355A9D271079E938

Policy Errors: None

(TLS Active - Don't forget to resend EHLO)
ehlo otrs.local
250-VE1EUR03FT032.mail.protection.outlook.com Hello [89.26.x.y]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
gr8smiley
Znuny newbie
Posts: 27
Joined: 16 Feb 2019, 22:45
Znuny Version: OTRS6

Re: OTRS 6 und Office 365 SMTP

Post by gr8smiley »

Hallo in die Runde!

Ich antworte am liebsten auf mein eigenes Posting :-)

Da ich leider keine Perl Kenntnisse besitze sagt mir der Code nichts.

Interessant ist, dass bei dem OTRS 5s dass ich ablösen soll das alles einwandfrei funktioniert. Ich habe mir die Github Seite angesehen und es gibt neuere Versionen als das OTRS 5s schätze ich.

Wenn ich statt dem Ganzen das sendmail verwende würde das mit den entsprechenden Absenderadressen hinaussenden oder nur mit einer? Dann würde ich die entsprechenden MX und SPF Einträge erstellen damit das OTRS die E-Mails direkt versenden kann.

Ich hoffe es gibt hier eine Lösung sonst komme ich mit dem Projekt nicht weiter.

Vielen Dank für Eure Unterstützung

Schöne Grüße,

Thomas L
gr8smiley
Znuny newbie
Posts: 27
Joined: 16 Feb 2019, 22:45
Znuny Version: OTRS6

Re: OTRS 6 und Office 365 SMTP

Post by gr8smiley »

Hallo in die Runde!

Ich habe das Problem jetzt beseitigt indem ich in einer eigenen VM Postfix Server installiert habe und den für das Relay zu Office 365 verwende.

Der kann auch ein senderabhängiges Mailrouting. Somit ist alles gut.

Vielen Dank an Alle.

Schöne Grüße,

Thomas L.
root
Administrator
Posts: 3961
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS 6 und Office 365 SMTP

Post by root »

Hallo,

gute Idee. Aber warum in einer eigenen VM?

- 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 ?
gr8smiley
Znuny newbie
Posts: 27
Joined: 16 Feb 2019, 22:45
Znuny Version: OTRS6

Re: OTRS 6 und Office 365 SMTP

Post by gr8smiley »

Hallo Roy,

wie schon gesagt, ich bin neu in der Linux und OTRS Welt. Ich trenne die Sachen lieber voneinander.

Wenn ich mir Fehler einbaue und nicht mehr zurückkomme ist nur ein Teil des gesamten Systems kaputt. Ausserdem weiß ich über die internen Abläufe vom OTRS und Postfix zuwenig Bescheid damit ich mir das zutraue das im OTRS System direkt zu machen.

Dafür sind die Linux VMs auch sehr ressourcensparend.

Schöne Grüße,

Thomas
Post Reply