365 SMTP Email Issue

Infos:

  • Used Zammad version: 6.3.0-1715168141.6baf144b.jammy
  • Used Zammad installation type: (source, package, docker-compose, …) Package
  • Operating system: Ubuntu 22.04.4
  • Browser + version: Firefox

Expected behavior:

  • Email sent to customer/user

Actual behavior:

  • Delivery failed: “Unable to send email to ‘user@domain.com’: Can’t use Channel::Driver::Smtp: #<Net::SMTPAuthenticationError: Net::SMTPAuthenticationError>”

However the agent does receive a notification email. Which leads me to believe this is an internal issue with Zammad. This is a shared mailbox on 365 and I have set SmtpClientAuthenticationDisabled to False.

We also have a local email proxy server. If I can’t find a fix for this error, is there a way to tell Zammad to use the relay for outbound email instead of 365?

Edit:
Updated to 6.3.1-1716540828.c7fd5da9.jammy and restarted server but the problem persists.

We have this issue from time to time too. Applying the following seems to have helped a bit

https://admin-docs.zammad.org/en/latest/channels/microsoft365/common-errors.html#missing-permissions-for-the-azure-user

1 Like

Hi thank you for replying.
Yes I saw that page and have already applied the permission.
It still does not work correctly.

I don’t understand how the agent can get an update email from Zammad but the user who opened the ticket cannot.

Email channels are self healing.
For that to happen a action has to happen on that channel - so in that case sending an email out should reset the issue state.

Sounds like a different “issue” / topic and is not exactly good described I’m afraid.

Thank you.
For instance I have a ticket open from another email me2@domain.com.
I can send an update to the ticket no problem.
The agent me@domain.com gets the update email.

If the agent enters an update me2@domain.com does not get an email update.
This was working before we switched to 365.

After a few minutes the error is presented on the ticket and it’s also sent to the agent by email.

Hopefully I’ve explained it more clearly.

I just tried to update the ticket again and checked the monitoring tab. I see this error:

image

I also did a message trace in 365 and can see that an email was sent to:
verify-external-smtp-sending@discard.zammad.org

Solved!

I was able to figure it out by looking through the production.log file.

First of all I had my email in the 365 Accounts but it was disabled.
I had done this because I wanted to use a shared mailbox to send and receive the helpdesk emails.
This seemed to be the only way I was able to add the shared mailbox as a 365 Account to Zammad.

So I deleted my email account from there and the error then stopped coming up.
However the email was still not being sent to the end user.

Then I found in the log that the group the agent was in did not have an email address assigned to it.

After correcting that everything seems to be working properly now.

Thank you for the assistance.

1 Like

I would still not send via Office 365. Zammad does not have a resent / retry feature on failure. If your external connection is down or Exchange Online has an hick-up, you will need to repeat all failed outgoing mail manually.

I use the local MTA to queue and send the mails out. See here Allow selecting local MTA for outgoing mails in the Microsoft365 channel - #2 by MrGeneration

Thank you for the suggestion.
I do have my local email relay selected on the Email Channel tab for Outbound Email Notification.
My local relay is another Ubuntu server with sendmail running on it.

Does this accomplish the same thing?
Or are the Email Channel settings ignored when using the 365 connector?

I checked the log on the relay and it seems only some of the email is going through.
I suspect based on the behavior I was seeing that the alerts to agents may be using the email tab and not the 365 tab settings?

So the next question is could your solution of using the local MTA instead be changed to use the relay I have configured on my other server?

Or I suppose I could have the local MTA forward to my relay server as well.

Also, are there any kind of issues with using the config you mentioned?
I’m thinking about something like settings being reverted on updates.
Or anything else you have encountered after beginning to use the local MTA.

Thanks

Yes, when you use the M365 Channel, notifications are still configured in the E-Mail channel.

So the next question is could your solution of using the local MTA instead be changed to use the relay I have configured on my other server?

Probably. The M365 channel is basically a special mail channel with some fixed settings like outgoing SMTP. You could try: configure SMTP in the Mail-Channel and see what the options[“outbound”] property of the mail Channel object shows. Change the M365 Channel object accordingly.

Also, are there any kind of issues with using the config you mentioned?

We have been using this setup for nearly two years, no problems at all of any kind, just make sure Zammad max mail/attachment size and the one configured in the MTA are in line. We have been using this setup over multiple minor version updates and the major update 5.x to 6.x and the setting has always been retained. Still I check after every update just to be sure. I don’t think there will be problems as long as there is no major change in the channel architecture.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.