1

I need to setup a mail server with a bit unusual requirements:

  1. OpenBSD is a must. Probably latest version, 7.2.
  2. All mails have to be stored in aa Mailbox file located in user's home directory.

Well, it does not look difficult, as I did it before using other systems. But I used Postfix for this task, as I'm quite familiar with it and I just like Postfix.

Taking OpenBSD's top security into account, I started to consider using default MTA (sendmail) instead of Postfix (and this is an opportunity to get familiar with OpenBSD too, as I have no previous experiences with it), but I didn't found a simple solution. I know I can setup mail.local to put mails into Mailbox files, but in /var/mail/user. I did not find any option to store mails in users' home directories.

Could you please tell me, do I miss something obvious? Assuming I do, is it reasonable to configure default MTA for this task, or using Postfix is acceptable/recommended? Or maybe any other MTA is generally better for such purposes and this particular operating system?

Thank you in advance!

AAA
  • 21
  • 2
  • The default MTA in OpenBSD is OpenSMTPD. It is configured in [`smtpd.conf`](https://man.openbsd.org/smtpd.conf). – Paul Nov 26 '22 at 13:34

1 Answers1

2

Sendmail - mailbox location

Sendmail does not deliver email to local mailboxes itself. Sendmail uses "local mailer" program/mailer. It is typically procmail program on Linux (or sensible-mda which means procmail when procmail is installed).

To check "local mailer" used by sendmail look for line starting with Mlocal in /etc/mail/sendmail.cf

You can configure default mailbox location used by procmail in ~/.procmailrc (or /etc/procmailrc).


Anyway: My current recommendation for sendmail use is "KEEP" - do not switch to sendmail if you do not have (a lot of) sendmail experience.

AnFi
  • 6,103
  • 1
  • 14
  • 27
  • Anyone interested in how OpenBSD uses `sendmail` I would encourage to read the [man page](https://man.openbsd.org/sendmail), which along with [`smtpd`](https://man.openbsd.org/smtpd) and [`smtpd.conf`](https://man.openbsd.org/smtpd.conf), demonstrates the above answer is not applicable to OpenBSD. – Paul Apr 21 '23 at 13:03