OpenSMTPD 6.5: Mailing list

This post is about how to make maling lists in OpenBSD (opens in a new tab) (whose current version is 6.5 (opens in a new tab).)

With OpenSMTPD (opens in a new tab) (and Dovecot (opens in a new tab), optionally), this method is perhaps the simplest.

Add a line for the list to /etc/mail/users like:

diff
  os_user@some.fqdn      some_user
  ...
  noreply@some.fqdn      nobody
  ...
  some-name@some.fqdn    vmail
  ...
+ some@ml.address        to1@target.address, to2@target.address, ... 

where /etc/mail/smtpd.conf is:

config
table domains           file:/etc/mail/domains
table users             file:/etc/mail/users

listen on lo0
listen on egress \
        tls pki <pki> \
        auth-optional \
        tag MTA

action "local" maildir alias <aliases>
action "domains" lmtp "/var/dovecot/lmtp" rcpt-to virtual <users>

match tag MTA   from any                for domain <domains>    action "domains"
match           from local              for local               action "local"

and also /etc/mail/domains is like:

config
target.address
ml.address

Compliting the configuration, emails sent to “some@ml.address” are forwarded to “to1@target.address, to2@target.address, …” directly.

Without any additional servers, it has no functionality such as editing subjects or bodies, but is perhaps the simplest.

More on: Run web, mail and federated services

OBSD Solutions

OBSD Solutions: OpenBSD consulting and support by Scqr, Reflerd Inc. (opens in a new tab)

Comments and feedback are welcome.