Hi Leo, Would you mind sharing your full configuration file? Without this, I am stuck on how to help you. I have done a lot with virtual users and domains so I think I can help. You could also see Gilles Chehade's article, https://poolp.org/posts/2019-09-14/setting-up-a-mail-server-with-opensmtpd-dovecot-and-rspamd/. It's very well written.
Best, Matt On Sun, Apr 5, 2020 at 8:25 AM Leo Unglaub <[email protected]> wrote: > Hey, > first of all i want to thank you all for your work on OpenSMTPD over all > those years. It has powered my one domain very well over all those > years. But now i have a problem with setting up virtual domains and users. > > My goal is the following. I have the following domains: > > > foo.com > > bar.com > > With those domains i have the following email addresses: > > > [email protected] > > [email protected] > > [email protected] > > [email protected] > > But all those users dont exist on my machine as real users. I just want > to recieve emails for those accounts and process them via lmtp to > dovecot. So my action basically looks like that: > > > action "local_lmtp_deliver" lmtp "/var/dovecot/lmtp" > > But when i trace the lookup from the smtpd i get the following: > > > b4e62ea90ed6c91d smtp connected address=local host=foo.com > > lookup: match "local" as NETADDR in table static:<anyhost> -> true > > lookup: match "foo.com" as DOMAIN in table static:<anydestination> -> > true > > rule #1 matched: match from any for any action local_lmtp_deliver > > lookup: lookup "user1" as USERINFO in table getpwnam:<getpwnam> -> none > > b4e62ea90ed6c91d smtp failed-command command="RCPT TO:<[email protected]> " > result="550 Invalid recipient: <[email protected]>" > > b4e62ea90ed6c91d smtp disconnected reason=disconnect > > debug: control -> client: pipe closed > > debug: clearing p=client, fd=11, pid=0 > > For some reason the user1 part is still getting resolved as a real user > on the system. I read on the man page and found the "user username" > option for the action. I did the following: > > > action "local_lmtp_deliver" lmtp "/var/dovecot/lmtp" rcpt-to user > "dovecot-worker" > dovecot-worker is the account used by dovecot to handle all the email > storage in /var/vmail. But i get the same error. > > So i guess i am doing it all wrong. Could someone please be so kind and > give me a hint in the right direction how the virtual user stuff is > working in OpenSMTPD. Because i think i am lost here. I am doing > something completely wrong. > > I am on the latest OpenBSD release (including all syspatch). > > Thanks so much! > Greetings > Leo > >
