On Sat Apr 27, 2024 at 5:31 PM CEST, Nicolas Goy wrote:
>
> How can I make it work with a single vmail unix user? Without losing the
> catchall?

Ok, I finally figured it out with the answer I got.

I tried to use the rcpt-to flag in deliver in the smtpd.conf, but I always ended
with non existing users.

The thing is, in vusers, there must be alias to emails AND at the end, an alias
to the virtual user, like:

a...@example.com a...@example.com
@ m...@example.com
m...@example.com vmail
a...@example.com vmail

Then, rcpt-to must be added in the smtpd.conf, like so

  action deliver lmtp "/var/dovecot/lmtp" rcpt-to virtual <vusers>

Then dovecot will get emails with the full email address as username, but that
can easily be mapped to the correct folder with

  mail_home=/srv/mail/%Ln  # (%Ln insteand of %Lu)

Of course, the vusers table above will need to have different local part for all
users, but that's ok in my case.

-- 
Nicolas Goy
Developer and electronic engineer
Goyman SA

https://kuon.ch
https://goyman.com

Reply via email to