Diagnostic-Code: X-Postfix; User unknown in virtual alias table

SYSTEM INFORMATION
OS type and version Debian Linux 12
Usermin version 2.400
Virtualmin version 7.40.0
Theme version 25.01
Nginx version 1.22.1
Package updates All installed packages are up to date
possibly related to

doesnot make sense to me at it is/was a working user and has messages in usermin yet the client browser Thunderbird displays this Mail Delivery System Message:

Diagnostic-Code: X-Postfix; User unknown in virtual alias table

slightly different but related message returned:

    missing a valid Message-ID 550-5.7.1 header are not accepted. For more
    information, go to 550-5.7.1
    https://support.google.com/mail/?p=RfcMessageNonCompliant and review 550
    5.7.1 RFC 5322 specifications. af79cd13be357-820d12d8492si602018285a.1297 -
    gsmtp

on attempting to reply to a test message sent from an external gmail account

message is clear, check recipient address. could be a typo there, or wrong/disabled email address.

gmail response is that your reply doesn’t contain ‘Message-ID’ header, this is the issue..
Message-ID header should exist in any email message. so, you either have an email client issue, or doing some header rewritings in postfix(?)
which client did you use to reply?

sorry, but not very clear. the email address is correct! just that gmail does not understand/dislikes DKIM

and have not changed/altered Postfix

also user account receiving junk/spam already

same user sending to hotmail account worked! sort of confirming that it is a gmail outbound issue.

reply is from same client (Thunderbird) but also using (Usermin) and also tried using (Roundcube) so seems like a postfix error on the header as in original

gmail (as much as i hate it), understands DKIM very well. you have something wrong in your DKIM setup that is failing, that’s another story.. but that’s a problem for sending to gmail. not the other way round.

is hotmail → that account working?

yes.

it is back to the other linked problem then.

maybe not - now everone is complaining:

Final-Recipient: rfc822; admin@master.com
Original-Recipient: rfc822;user1@domain.me.uk
Action: failed
Status: 5.1.1
Diagnostic-Code: X-Postfix; User unknown in virtual alias table

I can’t seem to find this “virtual alias table” - it should not be exposing that domain or user to all and sundry. it never used to

It’s a postfix config file look in /etc/postfix

do these users/emails exist in virtualmin users for each domain?

virtual alias table in postfix is edited by virtualmin users, each time you add an email. if those don’t exist in virtualmin, they probably dont exist in postfix either.

yes, the

is the domain owner’s address (obscured here) and works in Usermin

yes, the

is a user added to the domain domain.me.uk which is “owned” by admin@master.com

I have never had the need to touch Postfix manually (it just worked until now)

this has all come about since the rebuild of this VM as a Debian 12 OS (something in most respects went without a hitch)

can this user login to usermin?

yes, and send to other domains (both on this VM and at least one other VM)

and a non Virtualmin domain (a Registrar)

sorry, can’t help more from here.
you need to check postfix aliases and virtual users to see which one of those 2 email addresses is not listed…
when you find which one is missing, then add it either as an alias to the domain.co.uk user, or as an email user in its own domain.
if you do see it there, make sure, there’s no typo in account address, either in the alias or virtual file or in the sending message.

btw, sending from local system, doesn’t mean it’s a working email account. receiving to that account is the proper test.

Tx for the help anyway.

It looks like I am goint to dig into Postfix afterall - a big unknown and something I was hoping to avoid.

I have just registered a new test domain with a separate mail provider and am going to adjust the MX record of the domain.me.uk to go that route.

The virtual alias table is the Postfix virtual map. It’s where Virtualmin adds virtual users (and all users in Virtualmin are virtual, because their for virtually hosted domains, and not the system hostname itself).

So, the user you are trying to send mail to does not exist in virtual.

Usermin logins have nothing to do with entries in the virtual map. The virtual map is not for authentication. Any system user with a password can log in to Usermin, unless explicitly prohibited from doing so, but they may not be able to receive mail within a given virtual domain. Usermin and any other authenticating client has nothing to do with the virtual map. The virtual map is not for authentication, it maps a virtual user (like joe@virtualmin.com to a “real” user, like joe@n1.virtualmin.com as that happens to be the name of the server virtualmin.com mail is hosted on). You’re mixing up two completely unrelated things. Your problem is not related to the existence of the user.

The domain owner user may or may not have email enabled (it sounds like it is not enabled), and is somewhat different from “Mail Users”, though they still need an entry in the virtual map to receive email (which is what enabling email does, you can’t stop a user with shell access from sending email one way or another).

You need to check to see if the user has email enabled. I assume it does not, since it doesn’t have an entry in the virtual map.

Note that it’s probably suboptimal to enable email for administrative user accounts, like the domain owner user. It leads to the password being pasted around into a bunch of different places…not just for administration, but for an email client, webmail clients, etc. which probably expands the attack surface.