We needed to send notifications to each domain's owner by iterating the following CLI command :
virtualmin notify-domains --domain $dom --body-file /path/file.txt --subject "subject line" from email@example.com
and it works fine for top-level domains, but when it comes to sub-domains it gives the error:
No top-level virtual servers selected
Sends email to some or all virtual server owners
virtualmin notify-domains [--domain name]
--body-file /path/to/file.txt | --body-stdin
--subject "subject line"
I understand that subdomains belong to main domain's user and so they do not have their own contact e-mails, but then the above command should automatically take the respective top level domain's owner e-mail. Otherwise, it simply doesn't make sense how this command works with subdomains.
We will change our script now to (1) find the top level of each subdomain and then to extract and use it's owner's e-mail, but hopefully this request will be accepted soon and the above command will start working correctly as it is half baked in the current state.