Adding email domain and email account results in a timeout error

Im trying to add an email domain, and then an email account. In both cases i get a popup telling me that there was a time out.

Looking in nginx log i see:

2025/01/28 10:49:06 [error] 95760#95760: *61779 upstream timed out (110: Connection timed out) whilrver: cyber-defence, request: “POST /api/method/frappe.desk.form.save.savedocs HTTP/1.1”, upstream:s", host: “10.0.0.4”, referrer: “http://10.0.0.4/app/email-domain/new-email-domain-jsqmkusprg

And checking the scheduler:

frappe@frappe:~/frappe-bench$ bench --site cyber-defence scheduler status
Scheduler is enabled for site cyber-defence

The email domain and the email accounts are all in O365. I have connected to O365 fine and set up all the integration.

What am I missing to make this work please?

Hi,

Any relevant messages in the Error Log List?

Can you test the connection with telnet? ( telnet smtp.office365.com 587)

Connection to mail service works fine, and the oauth setup worked perfectly. Where do I find the logs? I dont see anything relevant in ~/frappe-bench/logs/frappe.log or the schedule.log

For troubleshooting email, I usually look at the Error Log List in the UI, and in the Email Queue List, failed messages may have useful info. More info on logging can be found here:
https://docs.frappe.io/framework/user/en/logging

There have been numerous threads here on 365 oauth , a search of the forum might turn something up. For example

https://discuss.frappe.io/t/tutorial-connecting-frappe-erpnext-to-microsoft-365-mail-services-oauth/106003