This article applies as of PRTG 22
Message age check with the IMAP sensor
The IMAP sensor provides several options to define a sensor status based on the emails that are in the inbox that you monitor. For example, you can set the sensor status to the Warning or Down status if the subject or body of a received email contains a certain text (or not).
You can also select the option Only Include Recent Emails (in versions previous to PRTG 16.3.26, Check Last Message Date) and set the sensor to the Warning or Down status if there is no matching email in the inbox covered by the defined time span.
This message age check basically works like this: The IMAP sensor retrieves a list of the emails in the inbox. This list is sorted by the time stamp that indicates when an email was touched the last time. Then the sensor checks the time stamp that indicates when an email was sent. As soon as the sensor finds an email with a “sent at” time stamp below the error threshold that you have defined, it stops reading the sorted list of emails and ignores all other emails in the list. If there is an email below the warning threshold, the sensor continues analyzing the emails to check for the error threshold.
If the IMAP sensor does not show the correct status, check your sensor configuration first. Make sure that your filter and validation settings are defined in a way to find the emails you want to consider. For example, email validation only takes place with the latest email that matches the filters in section Filter Emails in Inbox. If no email is found, the sensor does not perform any email validation. (Note that in versions previous to PRTG 16.3.26, the setting No Matching Email Behavior in section Sensor Behavior overrides the settings from Check Last Message Date.)
Also, use a dedicated IMAP account that is accessed by PRTG only. For example, if some client accesses the inbox (a webmail client can be enough), the “last touched” time stamp may change and so does the order of emails for the IMAP sensor. This can result in an unwanted behavior of the IMAP sensor.
If you can rule out these common error sources, check the date format of the email time stamps. IMAP delivers the date as a string and if the responsible PRTG component cannot read it, the date is interpreted as 1/1/1900. Check the configured date format on the email servers and on the machines that send the emails. An inappropriate setup of the Region and language settings can result in a wrong “sent at” time stamp of the email. Try United States (en-us) if you have issues with the message age check.
For example, a customer reported that a server that sends backup emails had an incorrect region and language setting for non-unicode programs. This resulted in a wrong month for the sent date in the email from the backup solution so that the IMAP sensor could not correctly identify new emails. Changing to English (United States) helped.