What's the best MTA to integrate into Elixir Stack/OTP?

Hi elixirist, I’m wondering what’s the best MTA for sending mail, if I want to setup one. Let’s say on receiving side, I got gen_smtp taken care of, for sending side, you need MTA isn’t it? to relay the mail to recipient.

Anyway, I’ve been researching MTA for couple days, it seems people prefer Postfix because of better security [1][2][3] ?!? and scaling that seems okay [1][2] ?!? So I guess if my requirement is to handle 100k mail a day, futureproofing to 1 Mil mail a day shall be okay right ?!? Then a quick search on OTP MTA, I got this metis, skirnir which I guess I could put them under supervisor as children right ?!? What about non-OTP MTA (postfix, vSMTP) , do you think should I wrap them as OTP component so that I could put them under supervision tree?

I would suggest using some mail sending service, sendgrid/mailchinp etc for outgoing mails… IMHO running your own outgoing mail server is not worth the trouble.

Unless you have some specific reasons for running your own server for outgoing mails that is :slight_smile:

(And yeah, sorry this didn’t answer your question).

1 Like

I would suggest using some mail sending service, sendgrid/mailchinp etc for outgoing mails… IMHO running your own outgoing mail server is not worth the trouble.

Yeah, I’ve been using that cloud service in the past (Sendgrid, Amazon SES, Postmark) but for current project, I think I will go for self-managed route.

Unless you have some specific reasons for running your own server for outgoing mails that is :slight_smile:

It’s cost reason. :neutral_face:

(And yeah, sorry this didn’t answer your question).

No problem, it’s okay. I’ve been digging elixir forum to find self-managed MTA Thread, but can’t find any. Then I decided to post a new thread.

1 Like

Maintaining a mail server will likely cost you more (if only in hours) than you’ll pay for the mentioned services.

1 Like

I could be completely wrong, but I believe an MTA is the part that receives email (via. SMTP), and then hands it to a MUA (e.g. Dovecot) which stores it in a mailbox somewhere.

Could you elaborate on your usecase?

Edited to add: I guess SMTP relays are also called MTAs, but I think those are going out of fashion for spam protection reasons?

If you want to write your own mail server you can do so with gen_smtp. I have used it for both sending and receiving, but never as a complete mail server. For a general purpose mail server I would look at Postfix or Exim, and I would run it outside the BEAM as a regular OS application.

I use Exim, which is the default for most linux distributions and has the most extensive documentation.

Amazon SES is essentially free, same for sendgrid on azure.