News for hackers. Stuff that matters.
Re:Pimutils: The coreutils of personal information management by 01100011 on Wednesday November 25, 2020 @09:48PM (#25216413)
Unrelated ask: Does anyone know of a good way to filter my Outlook 365/IMAP inbox using rules running on my Linux box? I want more complex and easily maintainable rules than what I can get via Outlook.
Re:Pimutils: The coreutils of personal information management by deadbunny on Wednesday November 25, 2020 @11:15PM (#25216746)
I've used DavMail[1] to access Office365 for years.

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.

1. http://davmail.sourceforge.net/

Re:Pimutils: The coreutils of personal information management by cgb_ on Thursday November 26, 2020 @05:23AM (#25218643)
Yup - https://github.com/lefcha/imapfilter

"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."

Re:Pimutils: The coreutils of personal information management by toast0 on Thursday November 26, 2020 @01:35AM (#25217450)
Two jobs ago, I had written something for this; but it was written at work, so I wasn't able to keep it. Also, it was on premises Exhange, not Microsoft's cloud. But I recall, the exchange IMAP server isn't too horrible, although a bit slow. Perl with one of the CPAN IMAP modules, plus a little bit of caching, and I could do all sorts of filters that couldn't be done in Exchange (like sorting read mail into archive folders).
Re:Pimutils: The coreutils of personal information management by tleb_ on Thursday November 26, 2020 @04:11AM (#25218269)
I have used mbsync & notmuch to do a one time filter on my entire inbox. If you handle your emails locally, this could be a solution.