Score:0

Minimal Postfix with Dovecot passwd-file fails with unknown user

pl flag
Dax

I have done a few Postfix / Dovecot / MySQL installations all working without issue. I'm trying to build a minimal Postfix Dovecot server without a DB. Currently I have Auth working with Dovecot passwd-file. I can connect with IMAP and all folders are created on the server, so I know my IMAP setup id correct.

Postfix

smtpd_sasl_type = dovecot
virtual_transport = dovecot

Dovecot

doveadm user [email protected]
field   value
uid     4900
gid     4900
home    /home/vmail/example.com/user/
mail    maildir:/home/vmail/example.com/user/

When is try to send mail from [email protected] to [email protected], the mail client tells me it is delivered, but Postfix logs show

Mar 12 10:35:52 mail-01 postfix/local[6016]: 4C1247E94DC: to=<[email protected]>, relay=local, delay=0, delays=0/0/0/0, dsn=5.1.1, status=bounced (unknown user: "user")

So. My questions.

  • Shouldn't Dovecot deliver the mail?
  • Unknown user only shows the username and not the domain as well.

Any idea how to fix this issue?

anx avatar
fr flag
anx
`relay=local` does not sound like its using your `virtual` dovecot transport. I suspect you have a domain in `mydestination` that you meant to (only) mention via `virtual_mailbox_domains` or `virtual_mailbox_maps` configuration.
Dax avatar
pl flag
Dax
@anx Thank you. Added the domain to `virtual_mailbox_domains` and got the error `do not list domain exmaple.com in BOTH mydestination and virtual_mailbox_domains`. So, after I removed it from mydestination, it worked as expected. Now I want to see if it is possible to just add a user to the dovecot passwd-file and have postfix dynamically use that like with mysql stores. Is that even possible?
Score:0
pl flag
Dax

To make virtual_mailbox_maps work with Dovecot accounts, use the passwd type.

virtual_mailbox_maps = passwd:/path/to/dovecot/passwd-file

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.