News for hackers. Stuff that matters.

Ask HN: Scriptable IMAP/SMTP servers?

I'm looking to build a mail system that can be accessed via normal IMAP/SMTP clients (mobile devices, Apple Mail/Thunderbird/Outlook, etc.) but with a decent scripting ability. The goal is to have inbound and outbound emails to be reviewed by a third party before they're delivered. Googling has revealed a number of dead tries at making a Node IMAP server, a long-dead Lua-scriptable IMAP server, but nothing particularly usable.
( 5 comments | 3 points | on HN )
Re:Ask HN: Scriptable IMAP/SMTP servers? by mindcrash on Tuesday May 12, 2015 @04:31AM (#9530252)
Sieve (http://sieve.info/) could get you pretty far for anything IMAP related scripting. I believe Pigeonhole (http://pigeonhole.dovecot.org/), the implementation for Dovecot, also allows external applications to be run for advanced scenarios.
Re:Ask HN: Scriptable IMAP/SMTP servers? by madhouse on Friday May 08, 2015 @09:54AM (#9511711)
I remember http://lamsonproject.org/ being a python SMTP server library thing. It may be possible to piece together something based on it. That covers the SMTP part.

Mind you, the git repo looks dead, with the last commit being over two years old.

Re:Ask HN: Scriptable IMAP/SMTP servers? by stephenr on Saturday May 09, 2015 @09:39PM (#9518416)
Why reinvent the wheel. Setup mail delivery routing so mail goes to a different mail handling system first, if it's approved send it on to the final recipient.
Re:Ask HN: Scriptable IMAP/SMTP servers? by alanhoff on Friday May 08, 2015 @12:52PM (#9512722)
Take a look at this https://haraka.github.io/
Re:Ask HN: Scriptable IMAP/SMTP servers? by ceejayoz on Friday May 08, 2015 @01:17PM (#9512880)
Yeah, I'm evaluating that for the SMTP side. The IMAP side seems to be more complex.