Date: 2025-03-15
Spartan email client in Perl
----------------------------
Those who wish some comfort while sending emails without a
conventional SMTP server and don't want to use directly raw netcat
may create own shell script or Perl program to make some simple email
client, also known as MUA. Morena just made one.
/bin/mail.pl Simple email client in Perl
The client ask for the recipient email, subject, then throw you into your
text editor where you type your message. After like :wq your email is
sent. This minimal Perl email client is better than any other
horseshit you ever used before. In the background, it finds MX record
for email address you entered, so it knows which mail server has to be
contacted. Then it opens connection using netcat and communicates with
destination SMTP server and feeds it with data you typed.
It is not really portable, as I adjusted it for my minimal Alpine
Linux setup. It uses nslookup in a format of Busybox. I did it to
avoid external Perl module just to get MX record. Some nonsense is
also around to getting SMTP compliant date format, but that is core
Perl, so that works everywhere like the rest of the program. In case
you want to try it, adjust nslookup command for your system.
As always this Spartan email client can have many other parts to be
more friendly, robust, reliable and safe. However it is enough for my
usage, so I don't see a reason to add there something, just for sake
of it.
This is the simplest and also the greatest email client ever created
in all of human history. Thank you.
----------------------------------------------------------------------
Everything is fine just as it is.