Domain aliases allowing delivery though virtual mailbox does not exist

I’ve just noticed that I’ve got some new user mailboxes which I never created. When I look into the messages, I see that they were addressed to one of my secondary domains that I host on my box, for which I have a domain alias to the primary domain.

To be clear, I have in my aliases: @secondary-domain.com forwards to @primary-domain.com

But in the list of aliases in @primary-domain, I do not have an alias like joe@primary-domain.com. But the box is still letting mail through to joe and in fact it’s delivering it to a new mailbox with full dovecot folder structure that I never created. I’ve tested sending to joe@primary-domain.com and the mail is not delivered and I see “User unknown in virtual mailbox table” in the mail.log. But if I test send to joe@secondary-domain.com, it seems that due to the domain alias, it lets mail actually be delivered to joe@primary-domain.com.

In the past, I’ve seen the error “User unknown in virtual mailbox table” which is what I expected in this case. However, the behaviour seems to have changed at some point along the way.

I also now see a mailbox for root@box.primary-domain.com which I never recall seeing until very recently (0.18 upgrade?).

Any ideas?

Has anyone else noticed this type of behaviour? It keeps happening.

Yeah that’s weird. I just tried it myself. There’s a similar problem with catch-all’s and even regular aliases. Once an alias matches at all, no matter what address it eventually maps to it’s delivered - regardless of whether there’s a user account for that address or not.

Thanks for posting about this (twice!).

Let’s continue here:

1 Like

@JoshData

  • Provided patch seems that at least, kills the owncloud login for default admin user right after been manually applied…
  • Restoring to the earlier dovecot-sql.conf.ext file solves the mentioned owncloud login issue.

Can you reproduce the mentioned owncloud login issue at your end, too?

Please continue in the github issue.