If you have problem with configuration your Roundcube client in Epesi or synchronizations post, calendars, you should check connection epesi.server <----> Office365.server. Microsoft as default setting has turned off IMAP/ POP ports.
You have to go into Office365 Admin and allow IMAP access to external applications, you then wait for it to propogate and then you must use these settings. Link below show it step by step:
https://www.eduhk.hk/ocio/content/faq-settings-pop-or-imap-access-office-365
Here is what we need to verify:
Is your Office 365 server ready to accept IMAP protocol clients?
If yes then can we use TLS/SSL and username / password combination?
If you want to be sure you can use other IMAP desktop client like Thunderbird and test it this way.
What port are you connecting on? Check your server's firewall if it is not blocking incoming or connections on this port. Probably your server is not blocking incoming IMAP traffic, you just need to enable IMAP forcing Microsoft to behave like an adult and adhere to open standards.
Proper settings for Epesi e-mail account using built-in Roundcube IMAP client are:
Office365 IMAP Server outlook.office365.com
IMAP port 993
IMAP security SSL / TLS
IMAP username Your full email address
IMAP password Your Office365 password
Office365 SMTP Server smtp.office365.com
SMTP port 587
SMTP security STARTTLS
SMTP username Your full email address
SMTP password Your Office365 password
From: https://getmailspring.com/setup/access-office365-via-imap-smtp