Here again your favorite Random Dude,
Hope everything has been going well for everyone. Lately, I was tasked with securing more our O365 accounts and one way requested was to basically remove all SMPT capabilities company-wide. While doing that I found a silly issue, no emails were going out. Tickets get created just fine as I am using OAuth but SMTP for outbound.
Every time an email was intended to go out I would see the following:
2022-05-06 09:42:01 1nn11l-000Fpd-21 <= email@example.com H=localhost [127.0.0.1] P=esmtp S=84036
2022-05-06 09:42:01 Warning: purging the environment.
Suggested action: use keep_environment.
2022-05-06 09:42:01 1nn11l-000Frz-QO <= firstname.lastname@example.org U=www P=local S=810
2022-05-06 09:42:01 1nn11l-000Fpd-21 => org1.servicedesk2 <email@example.com> R=helpdesk T=helpdesk_pipe
2022-05-06 09:42:01 1nn11l-000Fpd-21 Completed
2022-05-06 09:45:04 1nn0zs-000CGs-J5 H=random-com.mail.protection.outlook.com [220.127.116.11]: SMTP timeout after initial connection: Operation timed out
2022-05-06 09:45:07 Warning: purging the environment.
Yeah, I have removed all actual emails.
Went back to MS documentation and found out that you can keep it for some accounts.
1. Open the Microsoft 365 admin center and go to Users > Active users.
2. Select the user, and in the flyout that appears, click Mail.
3. In the Email apps section, click Manage email apps.
4. Verify the Authenticated SMTP setting: unchecked = disabled, checked = enabled.
5. When you're finished, click Save changes.
This may be already known by a lot of people, but I wanted to leave it here for general knowledge.
I hope this helps someone. If you have any questions or comments put them down there.