So there it is, your fresh installed system running OpenBSD. The sane default setting is to store the local mails in a local mbox. If you have set up a regular user during installation, this account is getting all the mails for root. So all the info mails from /etc/{daily|weekly|monthly} go to the local mbox. You can easily read these mails by running the following command:

$ mail

This basic mail client does enough to manage the local mbox of the user. If you, like me, prefer to use another mail client you can install the preferred one using packages(7) and configure it to access the local mbox.

So far so good. Reading mails on one box is ok, but it gets a real burden if you deploy more OpenBSD systems. Eventually you will wish to forward these mails to a central mailbox. Well, that is an easy one. You just have to edit two files on OpenBSD to make it forward the local mails to another mailbox. First, enter the SMTP address of the receiver as an alias for your local user account:

$ doas vi /etc/mail/aliases

...

user:    john.smith@example.com

Now you have to change the config file /etc/mail/smtpd.conf of OpenSMTPD. If you have a local SMTP server that handles all mails for your network, you can simply disable the part deliver to mbox by commenting it out:

accept for local alias <aliases> # deliver to mbox

If you want to send the mails to an external site, you should change the senders address. For this, you can add as jane.doe@example.com to the second rule:

accept from local for any relay as jane.doe@example.com

In most cases these settings will work.