Files for quota, login permissions, and email enabled? (Restoring a user from backup.)

On a Virtualmin-as-a-mail-server install I restored a missing user from /etc/passwd- and /etc/shadow- and then used backup software to restore their /home/[domain.com]/homes/[username] directory (from off box).

In virtualmin I see the user but the settings had “None” for permissions (or if I set “Email and FTP” then “FTP only”) so I set that by checking the “Primary email address enabled”. The quota was set to “None” so I set that as well.

What files affect those settings? I am looking for what I might be sure to backup, and how I might restore them without using the web interface (for example if there were 50 of them)… ideally having such settings reappear, rather than resetting them, especially via the web.

Background:

A mail user report that their account stopped working 10 days ago. I noticed that in /etc/passwd- and /etc/shadow- the account was still there. There were a bunch of others from his domain which also did not appear in passwd/shadow and those have no recent mail.log use so I think someone cleaned-up unused accounts and inadvertently got that one too (though I cannot find evidence of that).

Thanks.

SYSTEM INFORMATION
OS type and version Ubuntu 24.04.4
Virtualmin version 8.1.0 GPL