I have an application that needs to write emails directly to local imap accounts. No MTA (Postfix,Sendmail etc.) in between so as to keep it simple to maintain, and no MTA vulnerability to worry about ,since there will be around 100K IMAP accounts (maildir files).
Is it possible to write directly to a Maildir file programatically without taking the help of an MTA?
So far, I have looked at femtomail but it's too simple for my needs since it's intended for use on a single-user machine.Also saw some python modules which would do this but not sure if Python would be fast enough considering we are talking about 100K IMAP accounts here.
Planning to do this on an AWS or a DO instance. Any suggestions on the architecture also will be much appreciated.