Microsoft has started to gradually disable support for old email protocols (IMAP and POP) to connect to Office 365 mailboxes. There is no way of knowing when exactly it will happen to you since it seems to be quite random and it has been going on for a couple of months.
If it happens you will see "LOGIN FAILED" errors in Admin - Email - Edit incoming mailboxes. Even if you do not see these errors now we highly recommend you to switch your IMAP mailboxes to Office 365. Here is how to do that:
- Go to Administration - Email - Edit incoming mailboxes
- See if you have any connected Office 365 mailboxes with IMAP or POP in the "Type" column.
- If you don't you don't need to do anything.
- Delete the mailboxes. You will need to connect them again.
- Select "Office 365" in the "Server type" and click "Connect to Office 365"
- Do that for every mailbox
On-premises customers are highly recommended to upgrade to 10.* to be sure that all of the above works properly.