Specialized MTA / Email Proxy Possible in Elixir?

I’m toying with the idea of doing a fairly specialized incoming SMTP proxy and I’m considering Elixir for the task due to performance, concurrency, and pattern matching.

However, I can’t find any reliable libraries or examples. At a very high level this Proxy would switch between the Internet and the actual email server and filter/parse/handle incoming emails to a particular domain. e.g. MX public records for example.com are pointing to this server which will handle incoming emails filter out and pass them through to google apps email servers for the user to digest.

I’m curious why you want an intermediary program for this? Instead of just using ipfilter rules and so forth? Or are you wanting to dispatch based on the domain, which the usual email server can also do and proxy on?

Have you looked at the gen_smtp Erlang library? It provides support for building both SMTP clients and servers.

I think this is the standard SMTP library in Elixir/Erlang.

Part of the reason is some manipulation of the email itself and building rules around the email contents, to address etc.

1 Like

This might get me pretty close to where I want to be. Thank you