github.com/johannesebke/go-imap-sync (go): Package imapsync provides a single function to download an IMAP folder to a local directory, with each email in a plain text file. Emails are downloaded only once, even if the function is run repeatedly.  A command line tool is available at https://github.com/JohannesEbke/go-imap-sync/cmd/go-imap-sync
Keywords: email|imap|imap-client|mail