http://www.perlmonks.org?node_id=11158380


in reply to Re: MTA for Perl
in thread MTA for Perl

I'm assuming you are using Linux or Unix. My take is that any of Sendmail, Exim or Postfix are fine as MTAs and as a starting point would consider whichever is a default on your OS or distro, as it's more likely to have a good basic setup out of the box.

Yes - it's Linux

It's a Raspberry Pi which doesn't come with an MTA as default. Hence why I need to make a choice. I'm also treating it as a learning experience. This isn't mission critical so a few mistakes along the way won't hurt and will increase my knowledge 🙂

Well, it so happens that both Exim and Postfix come with a "sendmail" command as standard...

Oh! That's helpful information - thank you.

Given everything I now know, Postfix will be the MTA of choice.

Replies are listed 'Best First'.
Re^3: MTA for Perl
by NERDVANA (Curate) on Mar 20, 2024 at 21:59 UTC
    Adding a bit to that, the real question is how you want the mail to flow. An MTA like Postfix will manage its own queue, so your program writes out a mail message and gets "success" that it has been delivered to Postfix. If Postfix has a problem delivering it, you'll need separate monitoring to find out about that, and meanwhile the messages will pile up in the queue on the raspberry Pi. The other way is to deliver mail directly from your app to some external SMTP host, like a relay service from your internet provider, or SendGrid, or something like that. If you can't push the message to them, the error can be handled and reported in the application. This also saves you the hassle of setting up an MTA, which is nice, unless your whole goal was to learn about MTAs.

      I think you need some secondary part monitoring the send status, bounces etc. anyway, at least if you are serious about sending mail and not having it marked as spam. Sisimai does the analysis (I have not used it). But you have to go beyond "mail was handed off to MTA" anyway.

      An MTA like Postfix will manage its own queue, so your program writes out a mail message and gets "success" that it has been delivered to Postfix.

      Nullmailer does exactly that, and ONLY that. The really great part about nullmailer is that it needs very little configuration compared to huge packages like postfix or exim, and it is harder to get the configuration wrong. The Debian wiki explains the configuration quite well, and so does the Arch-Linux wiki.

      If Postfix has a problem delivering it, you'll need separate monitoring to find out about that, and meanwhile the messages will pile up in the queue on the raspberry Pi.

      I usually have some cron jobs running on all machines, at least some kind of backup, a disk full check, or SMART and RAID integrity checks. So I get one cron-job mail per day per machine. If I don't get that mail, something is wrong. No extra monitoring needed.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      unless your whole goal was to learn about MTAs

      That is a big part of it...it's the reason I'm not just pushing them out to SendGrid or Brevo which we already use.