Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: MTA for Perl

by afoken (Chancellor)
on Mar 21, 2024 at 10:12 UTC ( [id://11158448]=note: print w/replies, xml ) Need Help??


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

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". ;-)

Replies are listed 'Best First'.
Re^5: MTA for Perl
by NERDVANA (Curate) on Mar 21, 2024 at 22:04 UTC
      Is there an advantage of Nullmailer vs. Email::Sender::Transport::SMTP::Persistent ?

      One very obvious: nullmailer works for the entire system, not just for perl scripts that happen to use E::S::T::S::P. So you will also get mails from cron when cron jobs aren't silent, smartd will complain about failing disks, mdadm will complain about failing RAIDs, sudo will complain about people trying to get root privileges, and so on. And of course, any application or user can simply invoke sendmail to send a mail.

      The other one is that you don't need to keep an SMTP connection open. E::S::T::S::P blocks server resources, which is not friendly. (You will probably don't mind if it is your local, bored server.)

      The last few times I manually fiddled with a telnet client connected to SMTP servers, they simply closed the connection after a a few seconds of idle time. Keeping an open SMTP connection is very typical for humans, but very untypical for SMTP clients. So the servers just kick you out. And I would guess the same happens with E::S::T::S::P. Probably nobody notices, as it seems to silently reconnect if needed. I don't know, I don't use Email::Sender, but if I would want to know, I would add some print statements to E::S::T::S::P::_smtp_client().

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11158448]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2024-09-10 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.