Sending Email from your Server using an MTA or Null Mailer (Mail Transport Agent)

Content Error or Suggest an Edit

Notice a grammatical error or technical inaccuracy? Let us know; we will give you credit!

Draft Warning

You’ve reached a draft πŸ€·β€β™‚οΈ and unfortunately, it’s a work in progress.

Introduction

I created this article because someone asked, “How do I monitor my software raid and the associated drives? smartctl needs to be able to send email?

What is an MTA?

MTA stands for Mail Transfer Agent. It is a software application responsible for sending and receiving email messages between different servers on the internet. When you send an email, your email client communicates with the MTA on your email server, which then sends the message to the MTA on the recipient’s email server. The MTA ensures that the message is delivered to the correct destination and handles any errors or problems that may occur during transmission.

What is Nullmailer?

Nullmailer, on the other hand, is a lightweight MTA designed for use on systems where a full-featured MTA like Sendmail or Postfix is not necessary or desirable. Nullmailer is a “null” MTA in that it does not have the ability to receive messages or act as a full mail server. Instead, it is designed to simply forward outgoing messages to a more capable MTA, such as Gmail’s SMTP server or your hosting provider’s email server. This can be useful in situations where you do not have full control over the server you are using, or where you do not want to install and configure a full-featured MTA.

The following page is a great resource

nullmailers
linuxmafia.com

Summary of MTA vs Nullmailer

In summary, an MTA is responsible for sending and receiving email messages between servers, while Nullmailer is a lightweight MTA designed for forwarding outgoing messages to a more capable MTA.

Option 1 – Install an MTA (Mail Transport Agent)

You can install any of the popular MTA’s out there; I prefer Exim but Postfix or sendmail are perfectly fine. But are sometimes overkill.

7 Best Mail Transfer Agents (MTA’s) for Linux
In this article, we have looked a slight understanding of how MTA’s (Mail Transfer Agents) work and a list of the best and most used MTA’s on Linux systems.
www.tecmint.com

Option 2 – Install a Nullmailer (ssmtp)

I’ve always enjoyed using ssmtp with Postmark, Sendgrid or Mailgun as a quick and easy setup for an MTA on a Linux server.

sSMTP – ArchWiki
wiki.archlinux.org

ssmtp is No Longer Maintained

Unfortunately, ssmtp is no longer maintained. Below is the original Github repository, from what I can tell, but it might be a mirror.

GitHub – davecb/ssmtp: Send mail via smtp, for people who don’t like sendfail(8) on simple machines
Send mail via smtp, for people who don’t like sendfail(8) on simple machines – GitHub – davecb/ssmtp: Send mail via smtp, for people who don’t like sendfail(8) on simple machines
github.com

There is another Github repository that has patches for ssmtp.

GitHub – ajwans/sSMTP: patches to sSMTP
patches to sSMTP. Contribute to ajwans/sSMTP development by creating an account on GitHub.
github.com

Option 3 – msmtp an alternative to ssmtp

I was recommended msmtp by someone who read this article, I haven’t used it yet so I don’t have instructions right now.

msmtp – download
marlam.de

Changelog

  • 04-04-2023 – Updated page to reflect MTA and nullmailer
0 Shares:

You May Also Like
Read More

Testing an Email Address

If you’re looking to verify if an email address is functioning properly there are a couple of methods…