Customize Undelivered Message Retry Period in Exchange Online

Customize Undelivered Message Retry Period in Exchange Online

Email is an integral part of the way organizations conduct business, so every email sent and received needs to be monitored appropriately. Otherwise, it might collapse the entire organization framework. There are times, however, when emails won’t be delivered to the recipient due to any Microsoft 365 service breakdown, internal network glitches, etc. This results in emails getting piled up in the queued messages and are periodically reattempted to deliver them. And here is where Microsoft brought the idea of message expiration in Exchange Online.

Don’t know what for? No worries! Let’s see what message expiration is in Exchange Online and what the latest updates are.

Why Message Expiration in Exchange Online?

Assume you’re out-of-office (OOO) elsewhere with poor network connectivity, trying to send an email, but the network doesn’t cooperate. So, Microsoft queues your email and attempts to deliver it periodically.

Previously, Exchange Online will try to deliver the message until it reaches its intended recipient. (It might even take days to send). Therefore, Microsoft introduced the idea of message expiration to Exchange Online.

What is Message Expiration in Office 365?

Message Expiration prevents the message from being sent again after a certain interval and notifies the sender with a non-delivery response (NDR)/ bounce message. By default, Microsoft has set the value to 1 day (24 hours).

And now, here’s the update! Microsoft has now made the message expiration interval period to be customized by admins.

Now, admins can customize the message expiration timeout to be less than 24 hours.

Set Message Expiration Timeout Interval Using PowerShell:

One-day intervals are too long to notify users their messages aren’t delivered!🫤 So, to become aware of the delayed deliveries early and to take the necessary actions immediately, Microsoft has updated the setting and allowed us to set a value between 12 to 24 hours.

By using PowerShell, you can modify the message expiration duration. But before running the cmdlet, make sure to connect with the Exchange-Online module.

Now, use the Set-TransportConfig cmdlet and specify the time range in the HH:MM:SS format. The MessageExpiration parameter specifies the maximum value that a particular message can remain in a queue. Over this time period, a message is considered a permanent failure and returned to the sender.

For example, if you want to expire your queued message after 13 hours in the queued stack, use the following cmdlet.

Set-TransportConfig –MessageExpiration 13:00:00 

Run the following cmdlet to verify that the message expiration timeout has been set as expected.

Get-TransportConfig | Select-Object MessageExpiration 

Get the message expiration status

That’s it! This can be completed in a flash! Now, that you have set up the expiry time for every message, you should always keep an eye on the queued messages report.

Get the Queued Message Report in the Exchange Online:

Unsent messages are queued in the queued messages stack; admins can view the report and keep track of unsent messages. However, prior to reviewing the queued messages report in mail flow reports, ensure that any of the permissions:

  • Exchange Administrator
  • Organization Management
  • Compliance Administrator
  • Security Administrator
  • Security Reader
  • View-only Recipients

Navigate to the path below and access the queued messages report.

Exchange admin center –> Reports –> Mail Flow reports –> Queued Messages report.

With the queued messages report, admins can check how many messages are currently stacked in the queue pile and take necessary action to clear it.

queued messages report in exchange online

Messages that don’t get delivered are notified to the user with a non-delivery response, which can be viewed in the non-delivery report in the mail flow reports.

Navigate to the path below and access the non-delivery details report.

Exchange admin center –> Reports –> Mail Flow reports –> non-delivery details report.

Here you will find details on the error code that indicates why the email wasn’t delivered, solutions to get the email delivered, and a link to more help.

non-delivery reports in exchange online

Customize Queued Message Alerts in Microsoft 365 Defender Portal:

Not every time, Office 365 admins can check on the queued messages list, so Microsoft has created a default alert policy under the mail flow category named Messages have been delayedin Microsoft 365 Defender portal. This alert policy automatically sends an alert if there are more than 2000 queued messages and have been waiting for more than an hour.

Further, admins can customize and edit the default alert policy in the Microsoft 365 Defender portal as needed. The dynamic elements up for modification are:

  • Email Recipients
  • Daily Notification Limit
  • Threshold Value

Message Expiration Alert Policy

This customization of message expiration has been a long-awaited update for admins, as they don’t want to wait for one whole day to know that their message hasn’t been delivered. Fortunately, Microsoft has provided a customizable dynamic option that lets admins take the necessary actions quickly. By doing so, an organization can improve the efficiency and effectiveness of its email management.

I hope this blog gave you a better idea of message expiration timeout intervals, queued message alerts, etc. What other features are you expecting from Microsoft? Share your ideas down!

Customize Undelivered Message Retry Period in Exchange Online

by Pavithra time to read: 3 min
0