Error connecting SMTP and IMAP to Exchange

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Halfnice112
Posts: 4
Joined: Wed Nov 22, 2023 8:00 am

Error connecting SMTP and IMAP to Exchange

Post 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?
shddcit
Posts: 60
Joined: Wed Mar 30, 2022 3:54 pm

Re: Error connecting SMTP and IMAP to Exchange

Post by shddcit »

On the first point. Try it. It works for me.
Image
Halfnice112
Posts: 4
Joined: Wed Nov 22, 2023 8:00 am

Re: Error connecting SMTP and IMAP to Exchange

Post by Halfnice112 »

@shddcit thanks for your reply

This is how its configured.
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Error connecting SMTP and IMAP to Exchange

Post 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?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Halfnice112
Posts: 4
Joined: Wed Nov 22, 2023 8:00 am

Re: Error connecting SMTP and IMAP to Exchange

Post 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
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Error connecting SMTP and IMAP to Exchange

Post 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?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Halfnice112
Posts: 4
Joined: Wed Nov 22, 2023 8:00 am

Re: Error connecting SMTP and IMAP to Exchange

Post 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]
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Error connecting SMTP and IMAP to Exchange

Post 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply