Historically I've had a local user account for each email user and everything has been fine. Recently I've moved from Procmail to dovecot-lda, with Dovecot using its own user database.
Dovecot is quite happy to deliver mail, and let users collect it, without needing local user accounts. As such I've looked at trying to remove the local users and instead set dovecot to use a generic
vmail user. TO test I've set the correct mail path for my test user in the Dovecot user database, but set the UID to be my vmail user and changed the ownership of the relevant mail folders to vmail.
This works fine for imap/pop connections, and manually running the dovecot-lda works fine. As far as I can see the entire delivery and collection process works fine as far as Dovecot is concerned.
However, If I try and deliver an email via Postfix, I get the following message:
status=bounced (unknown user: "test-user")
I thought this would be as simple as un-setting
local_recipient_maps to stop Postfix trying to validate local users, but I just can't seem to get past this error. Is there some simple option I'm missing to make Postfix ignore the fact that a local user doesn't exist and just pass the message to dovecot?
Applicable Postfix config
mailbox_command = /usr/local/libexec/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT" -d "$USER" local_recipient_maps = virtual_alias_domains = $config_directory/local-host-names virtual_alias_maps = hash:$config_directory/virtusertable
There's an entry in
virtusertable for my test email address with
test-user as the right hand side.