Stockton Web & Cloud Services Company Articles Get Started 801-360-8331
We are an 🇺🇸American🇺🇸 small business! Help us grow! Share with a friend. We have fast response times and very reasonable prices.
Vultr Cloud for your next cloud project!
Why OpenSMTPD Matters

Why OpenSMTPD Matters

Today I want to explain why the email server program opensmptd matters. If you haven't encountered OpenSMTPD yet, you can find more info here.

OpenSMTPD feels like a relatively newer mail server. You might think that introducing a newer email server program is futile in today's world. Despite the heavy usage of text messaging and instant messengers, along with video calling, email is still a big deal today. If anything, an email address provides somewhat of an ID out there on the web, so someone can reach back to you.

Many many people still rely on email for newletters, two-factor authentication, marketing, etc. Alsao, email is a great way to send messages that you don't expect to be read and replied to right away. It's easy to store emails for a long time sa well, providing a central place for messages and images that you might want later.

But what about the backbone to this email service? Well, we all know the big names in email providers today, Google and Microsoft. It seems that almost every business on earth relies on them. However, for those outside of those two giants, there are open source programs to help give a normal person access to this great big web. Mainly you will see email server programs such as Exim, Sendmail, and Postfix. Each of these have been reliant work horses for years. So why OpenSMTPD?

Well, I have one response to that: configuration. If you have ever had to deal with configuring any of those mail server programs, you probably know what I mean. Now I know there is going to be some person out there who will say, "no no, Exim is easy." Or "Sendmail is so simple." But we're not all geniuses, okay?

As I progressed through my career, I found that the Postfix mail server seemed to be the most sensible. It still seemed complex, but less so than others. I felt I was able to get it up and running easier than the others.

And this where OpenSMTPD comes in.

On an OpenBSD system, OpenSMTPD is the default, with a default config. It looks roughly akin to this (comments removed):

table aliases file:/etc/mail/aliases

listen on localhost

action "local" maildir alias <aliases>
action "relay" relay

match for local action "local"
match from local for any action "relay"

That's it. This does a couple simple things, as explained in the man page:

     The default smtpd.conf file which ships with OpenBSD listens on the
     loopback network interface (lo0) and allows for mail from users and
     daemons on the local machine, as well as permitting email to remote
     servers...

You can gather from this simple pattern a couple things:

  1. This is a simple and short syntax that provides powerful results
  2. The "match" rules at the bottom relate to an action
  3. The "action" rules perform some action
  4. You could easily change what address or interface the server listens on

Now, obviously things get more complex than this, once you start needing to authenticate users and require spam filtering. But this is a promising starting point!

And that is the whole point. You don't have to look too far than the manual to get a good sense of what to do next for whatever you need.

And for that reason, I say, OpenSMTPD matters today.

As an added bonus, on an OpenBSD system, OpenSMTPD comes as part of the base system. So there is no dependencies! I like not having additional dependencies (unless you're needing something like dovecot, but that's another story for another day :-)

OpenSMTPD

Share X.com Truth Social

Written by Jon

Author Profile Picture

Hi, I'm Jon. I live in Utah with my awesome wife and children, where we enjoy hockey, basketball, soccer, and raising chickens! I have a bachelors degree in Software Development, various computer & project management certifications, and I've worked for web hosting and other dev/online companies for over a decade.