0

So I have setup an OpenSMTPD server on my OpenBSD VPS. I have specified the aliases file path and configured action "local_mail" to forward the mails to specific users based on their corresponding aliases in /etc/mail/smtpd.conf. (I am using ... to refer to lines that I haven't specified in the following code blocks.)

...
table aliases file:/etc/mail/aliases
...
action "local_mail" mbox alias <aliases>
...

The /etc/mail/aliases file currently looks like this

# Basic system aliases -- these MUST be present
MAILER-DAEMON: postmaster
postmaster: root

# General redirections for important pseudo accounts
daemon: root
ftp-bugs: root
operator: root
www:    root

...

mail: qwerty

Where qwerty is my username.

Issue: All mails sent to postmaster should be found in the root user's mbox. But instead it pops up in qwerty user's mbox.

2
  • 1
    Did you reload smtpd after changing the aliases file? Also, /var/log/maillog might give some hints. You an also run smtpd on the foreground and print the trace of the address expansion (smtpd -d -T expand) and then send an email to postmaster and see what is going on.
    – Zé Loff
    Jul 26, 2023 at 11:04
  • Also: are you aliasing root to some other address, e.g. root: mail or root: qwerty?
    – Zé Loff
    Jul 26, 2023 at 11:11

1 Answer 1

0

Since quite some releases ago, /root/.forward file is created during install when one opts for creation of a user (besides root).

Rad more about it in forward(5).

1
  • @prmethus This is definitely worth a look.
    – Jim L.
    Apr 4 at 16:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .