Re:Fennel – Lisp in Lua
by stevekemp on Sunday September 06, 2020 @11:11PM
(#24396320)
It wouldn't be impossible to iterate over a series of mails, and get the message-bodies, but it would be a bit fiddly and annoying as the program was more designed as an email-client.
https://github.com/lumail/lumail/
https://lumail.org/
Honestly I'd probably write something in perl/go/similar to just walk over a remote IMAP mailbox:
* Search for messages that are unread, or which don't have a given tag.
* Process each one.
* Mark as read, or add a tag.
(I actually did something like that recently for processing DMARC reports.)