It basically acts as a translation layer between Microsoft protocols and open protocols. I usually run it as a local systemd user service.
My only issue is with MFA. To set it up you'll need to dig through the stdout/logs to get the initial "add app"/Auth URL. After that the push notifications from the Microsoft Authenticator work as expected.
If you're not using push based MFA I'm not sure if it'll work, you might need to dig through the logs to grab the URL each time. If it was me I'd probably setup another script to sit watching the log, extract the MFA URL and send a notification with lib notify.
So yeah, a little janky to set up (yay for proprietary protocols) but you can then use whatever email client you like and manipulate it as you need.
"IMAPFilter is a mail filtering utility. It connects to remote mail servers using the Internet Message Access Protocol (IMAP), sends searching queries to the server and processes mailboxes based on the results. It can be used to delete, copy, move, flag, etc. messages residing in mailboxes at the same or different mail servers. The 4rev1 and 4 versions of the IMAP protocol are supported."