Reply
Emerging Member
Posts: 48
Registered: ‎01-20-2014
Accepted Solution

Unable to get email notifications working(Office 365)

[ Edited ]

We are an MSP with a locally hosted UniFi controller that contains all of our client site Unifi devices for us to centrally monitor/manage them.  We're not using an Ubiquiti gateway or cloud key.  Local and external DNS are configured.

 

I configured site settings > controller > SMTP for smtp.office365.com / 587 / SSL and authenticating using a kiosk licensed mailbox in our Office365 tenant, send as ubiquiti@ourdomain.com, and the admin account for the controller is set up with clientalerts@ourdomain.com which I'm assuming is where the alert e-mails will ultimately go.  Enable Alert Emails is enabled.

 

When I test SMTP settings it says it failed to send the e-mail to the SMTP server.  Knowing there has been and may still be some weird issue where the test fails but actual alerts do get e-mailed I decided to reboot one of the APs in the controller, and Notification(Beta) settings are configured to alert AND email on admin reboot of an AP.  Never got the email to clientalerts@ourdomain.com.

 

I've checked all folders/junk mail in clientalerts@ourdomain.com and the alerts just aren't arriving at all and according to the error I'm receiving they're not even getting to or through Office 365.

 

Are notification emails still broken or is something not configured right on our end?


Accepted Solutions
Member
Posts: 150
Registered: ‎02-23-2012
Kudos: 76
Solutions: 5

Re: Unable to get email notifications working(Office 365)

Create a distribution list called ubiquiti@yourdomain.com, doesn't need to have any members. Grant send-as permission to the account you're using the credentials of in the controller software.

View solution in original post


All Replies
Senior Member
Posts: 19,200
Registered: ‎08-04-2017
Kudos: 3598
Solutions: 934

Re: Unable to get email notifications working(Office 365)

Hello @LTSjohnny,

 

Can you ping the SMTP server?

Check the controller logs for errors.

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
USW-XG-16 • USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W 3x • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
Emerging Member
Posts: 48
Registered: ‎01-20-2014

Re: Unable to get email notifications working(Office 365)

I can ping the SMTP server from the virtual machine the controller is on, if that's what you're asking.

I can view events and alerts in the controller but not sure how to view logs.
Emerging Member
Posts: 48
Registered: ‎01-20-2014

Re: Unable to get email notifications working(Office 365)

I just ran message traces in Office 365 exchange admin center to check outgoing mail from the account being used to authenticate/send SMTP, and the receiving clientalerts@ account. Office365 is not getting those alerts or tests from the UniFi controller which tells me the issue is the controller.

I also watched the traffic monitor in our firewall and I'm not seeing any traffic over the usual e-mail ports or the port 587 I've set in the UniFi controller SMTP settings area.
Senior Member
Posts: 19,200
Registered: ‎08-04-2017
Kudos: 3598
Solutions: 934

Re: Unable to get email notifications working(Office 365)

Hello @LTSjohnny,


You can view them via the controller

Insights > Controller Logs

 

 

Regards,
Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
USW-XG-16 • USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W 3x • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
Emerging Member
Posts: 48
Registered: ‎01-20-2014

Re: Unable to get email notifications working(Office 365)

I had to have the controller open in two tabs so I could have log view open while testing SMTP since log doesn't show history in the web UI.

It output a lot of random numbers/letters with error text mixed in.

 

[2019-02-11 15:24:23,711] <webapi-108> INFO event - fail to send email: 554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 16.55847:7C1B0000, 17.43559:0000000094000000000000000100000000000000, 20.52176:140F41860B0010100300170E, 20.50032:140F41867B1710100A000E81, 0.35180:E7020000, 255.23226:0A008440, 255.27962:0A000000, 255.27962:0E000000, 255.31418:0A000000, 16.55847:C0000000, 17.43559:00000000A0010000000000000100000000000000, 20.52176:140F41860B00101036000000, 20.50032:140F41867B1710103B000000, 0.35180:1F000737, 255.23226:56000000, 255.27962:0A000000, 255.27962:32000000, 255.17082:DC040000, 0.27745:76000000, 4.21921:DC040000, 255.27962:FA000000, 255.1494:1F000E37, 0.38698:00000000, 0.37692:05000780, 0.44092:00000000, 0.41232:05000780, 0.60208:01040480, 0.37136:83EF47A9, 0.34608:37000100, 0.55056:00000000, 0.42768:302E3136, 0.56112:31313A4D, 0.52807:30344D42, 4.33016:DC040000, 7.40748:010000000000010B3565342D, 7.57132:000000000000000039383165, 1.63016:32000000, 4.39640:DC040000, 8.45434:F54A07FB83DEA64F868708786DA9FA5133343343, 5.10786:0000000031352E32302E313630312E3031313A4D5748505230344D42313032343A64306662363266322D333534622D343565342D626665662D33613534653662393831653100333545000000, 255.1750:0A007E86, 255.31418:11010000, 0.22753:0A00B086, 255.21817:DC040000, 4.60547:DC040000, 0.21966:1B010000, 4.30158:DC040000 [Hostname=MWHPR04MB1024.namprd04.prod.outlook.com]
[2019-02-11 15:24:23,779] <webapi-108> INFO api - [api] api.err.SmtpSendFailed: /api/s/khljxi0y/cmd/cfgmgr
[2019-02-11 15:24:23,711] <webapi-108> INFO event - fail to send email: 554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 16.55847:7C1B0000, 17.43559:0000000094000000000000000100000000000000, 20.52176:140F41860B0010100300170E, 20.50032:140F41867B1710100A000E81, 0.35180:E7020000, 255.23226:0A008440, 255.27962:0A000000, 255.27962:0E000000, 255.31418:0A000000, 16.55847:C0000000, 17.43559:00000000A0010000000000000100000000000000, 20.52176:140F41860B00101036000000, 20.50032:140F41867B1710103B000000, 0.35180:1F000737, 255.23226:56000000, 255.27962:0A000000, 255.27962:32000000, 255.17082:DC040000, 0.27745:76000000, 4.21921:DC040000, 255.27962:FA000000, 255.1494:1F000E37, 0.38698:00000000, 0.37692:05000780, 0.44092:00000000, 0.41232:05000780, 0.60208:01040480, 0.37136:83EF47A9, 0.34608:37000100, 0.55056:00000000, 0.42768:302E3136, 0.56112:31313A4D, 0.52807:30344D42, 4.33016:DC040000, 7.40748:010000000000010B3565342D, 7.57132:000000000000000039383165, 1.63016:32000000, 4.39640:DC040000, 8.45434:F54A07FB83DEA64F868708786DA9FA5133343343, 5.10786:0000000031352E32302E313630312E3031313A4D5748505230344D42313032343A64306662363266322D333534622D343565342D626665662D33613534653662393831653100333545000000, 255.1750:0A007E86, 255.31418:11010000, 0.22753:0A00B086, 255.21817:DC040000, 4.60547:DC040000, 0.21966:1B010000, 4.30158:DC040000 [Hostname=MWHPR04MB1024.namprd04.prod.outlook.com]
[2019-02-11 15:24:23,779] <webapi-108> INFO api - [api] api.err.SmtpSendFailed: /api/s/khljxi0y/cmd/cfgmgr

Nothing in there that incidicates what's happening, nothing about authentican errors, etc.

Senior Member
Posts: 19,200
Registered: ‎08-04-2017
Kudos: 3598
Solutions: 934

Re: Unable to get email notifications working(Office 365)

Hello @LTSjohnny,

 

Could you for giggles try a gmail account?

 


Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
USW-XG-16 • USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W 3x • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
Regular Member
Posts: 559
Registered: ‎09-13-2017
Kudos: 101
Solutions: 35

Re: Unable to get email notifications working(Office 365)

[ Edited ]

@LTSjohnny  can you try using 365 relay smtp?

 

Your MX endpoint, for example, contoso-com.mail.protection.outlook.com

Port 25

 

This will ONLY allow you to send to a verified email address on your domain.

 

--

 

With your original settings can you check if you an SPF record restricted to certain IPs? This could block you sending if the IP you are trying to send from is not on that list.

Emerging Member
Posts: 48
Registered: ‎01-20-2014

Re: Unable to get email notifications working(Office 365)

manroweb - I'm authenticating as/sending from a kiosk account within our Office 365 tenant/domain to a shared mailbox on the same tenant/domain.

 

We are using the default Office 365 SPF record in our domain DNS zone file with an additional SPF record for our e-mail security/spam filtering but that only applies if the e-mail comes in from external sender or goes out to external recipient.  In this case, sender/recipient are both mailboxes in our tenant on the same domain and it never goes through our e-mail security service.

 

Also, I use this same configuration on backup software at numerous client sites.  Authenticate SMTP/send as backup@ourdomain.com and send the backup reports to same mailbox or clientalerts@ourdomain.com, never had an issue with those configurations.

Emerging Member
Posts: 48
Registered: ‎01-20-2014

Re: Unable to get email notifications working(Office 365)

AmazedMender16 - I can give gmail a try when I'm back at my desk tomorrow morning.  Definitely want to get it working with Office 365 though, so the alerts at least have some level of our branding(email address) on them in case I ever need to forward those alerts to a client.

New Member
Posts: 2
Registered: ‎06-19-2018

Re: Unable to get email notifications working(Office 365)

Did you ever get this working? If so can you please update the post with the solution?

Emerging Member
Posts: 48
Registered: ‎01-20-2014

Re: Unable to get email notifications working(Office 365)

No, I still have not been able to get it to work using Office365 smtp and honestly haven't had the time to make a gmail account to in order test with that.

Member
Posts: 150
Registered: ‎02-23-2012
Kudos: 76
Solutions: 5

Re: Unable to get email notifications working(Office 365)

Create a distribution list called ubiquiti@yourdomain.com, doesn't need to have any members. Grant send-as permission to the account you're using the credentials of in the controller software.

Emerging Member
Posts: 48
Registered: ‎01-20-2014

Re: Unable to get email notifications working(Office 365)

[ Edited ]

I'm not sure how that would work, or have anything to do with the licensed mailbox I'm using for SMTP authentication/sending alerts from?

 

Edit:  Forgot I had the controller sending as ubiquiti@ourdomain.com, so it makes sense.  Created the ubiquiti@ distribution list and granted the mailbox used as SMTP auth send-as permission to the new dist list.  Tested settings again,said it sent the test e-mail successfully.  Just waiting for it to arrive now.

Emerging Member
Posts: 48
Registered: ‎01-20-2014

Re: Unable to get email notifications working(Office 365)

@JonnyMThat did the trick.  I received the test e-mail to the clientalerts@ourdomain.com mailbox.  Thanks!

New Member
Posts: 2
Registered: ‎06-19-2018

Re: Unable to get email notifications working(Office 365)

Thanks very much for this. It worked for me. For anyone else finding this thread here is exactly what I used in my CloudKey V1.

 

UniFiEnableMailServer.pngUnifi Mail Server Settings

Highlighted
Member
Posts: 150
Registered: ‎02-23-2012
Kudos: 76
Solutions: 5

Re: Unable to get email notifications working(Office 365)

Glad it helped

Reply