0

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 user@example.com
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 user@example.com to user@example.com, the mail client tells me it is delivered, but Postfix logs show

Mar 12 10:35:52 mail-01 postfix/local[6016]: 4C1247E94DC: to=<user@example.com>, 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?

Dax
  • 294
  • 2
  • 11
  • `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. – anx Mar 12 '23 at 09:13
  • @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? – Dax Mar 12 '23 at 09:28

1 Answers1

0

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

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

Dax
  • 294
  • 2
  • 11