Page 1 of 1
Error connecting SMTP and IMAP to Exchange
Posted: Wed Nov 22, 2023 8:07 am
by Halfnice112
HESK Version
3.4.3
Hello friends,
we want to send Mails via smtp und fetch them with imap. We already have services running with stmp, without authentification, on our exchange. If we try it with Hesk we see this error: Authentication failed: No supported authentication methods found
Also on Imap we get this error:
Kerberos error: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_33) (try running kinit) for msx02.sft.kug-gmbh.de
IMAP Authentication cancelled
Can anyone please help us?
Re: Error connecting SMTP and IMAP to Exchange
Posted: Wed Nov 22, 2023 2:43 pm
by shddcit
On the first point. Try it. It works for me.

Re: Error connecting SMTP and IMAP to Exchange
Posted: Wed Nov 22, 2023 2:53 pm
by Halfnice112
@shddcit thanks for your reply
This is how its configured.
Re: Error connecting SMTP and IMAP to Exchange
Posted: Wed Nov 22, 2023 7:17 pm
by Klemen
For the IMAP error, try this file:
https://hesk.com/extras/hesk3/hesk341_imap_GSSAPI.zip
Place the
HeskIMAP.php file into your Hesk's
/inc/mail/imap folder then test again.
For SMTP, what does the full error log say when you test the connection?
Re: Error connecting SMTP and IMAP to Exchange
Posted: Thu Nov 23, 2023 6:49 am
by Halfnice112
@Klemen thanks for your reply
IMAP is working now, thank you!
for the SMTP Error: ( Servername changed to FQDN.com and IP changed to x.x.x.x)
Authentication failed: No supported authentication methods found
2023-11-23 06:47:08 SERVER -> CLIENT: 220 FQDN.com Microsoft ESMTP MAIL Service ready at Thu, 23 Nov 2023 07:46:15 +0100
2023-11-23 06:47:08 CLIENT -> SERVER: EHLO lamp
2023-11-23 06:47:08 SERVER -> CLIENT: 250-FQDN.com Hello [x.x.x.x]
250-SIZE 37748736
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-X-ANONYMOUSTLS
250-AUTH NTLM
250-X-EXPS GSSAPI NTLM
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 XRDST
Re: Error connecting SMTP and IMAP to Exchange
Posted: Thu Nov 23, 2023 12:07 pm
by Klemen
Are you sure "SMTP Username" and "SMTP Password" are empty in Hesk?
Any changes if you select TLS or SSL encryption?
What version of Exchange are you running?
Re: Error connecting SMTP and IMAP to Exchange
Posted: Thu Nov 23, 2023 1:02 pm
by Halfnice112
Yes im Sure, that there is no username and password set in Hesk.
We Use Exchange 2016.
2023-11-23 12:20:51 Connection: opening to FQDN.com:25, timeout=20, options=array (
'ssl' =>
array (
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true,
),
)
2023-11-23 12:20:51 Connection: opened
2023-11-23 12:20:51 SERVER -> CLIENT: 220 FQDN.com Microsoft ESMTP MAIL Service ready at Thu, 23 Nov 2023 13:19:58 +0100
2023-11-23 12:20:51 CLIENT -> SERVER: EHLO lamp
2023-11-23 12:20:51 SERVER -> CLIENT: 250-FQDN.com Hello [x.x.x.x]
250-SIZE 37748736
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-X-ANONYMOUSTLS
250-AUTH NTLM
250-X-EXPS GSSAPI NTLM
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 XRDST
2023-11-23 12:20:51 CLIENT -> SERVER: STARTTLS
2023-11-23 12:20:51 SERVER -> CLIENT: 220 2.0.0 SMTP server ready
2023-11-23 12:20:51 Connection failed. Error #2: stream_socket_enable_crypto(): SSL: Success [/var/www/support/vendor/phpmailer/phpmailer/src/SMTP.php line 476]
Re: Error connecting SMTP and IMAP to Exchange
Posted: Fri Nov 24, 2023 12:59 pm
by Klemen
Not sure what's wrong.
Just as a test, can you try connecting it to a third-party SMTP server, such as Gmail, and see if that works? Don't forget to use an "App password" to connect to Gmail or authentication will fail:
https://www.hesk.com/knowledgebase/?article=72