Submitted by isdahlc on Sun, 07/06/2014 - 17:30 Pro Licensee
Guys,
I know this may sound like a silly question but does virtualmin command line allow me to get the domain fo the user if I have the username?
I'm trying to take into account multiple top level domains (domain.com.au, domain.com, etc). I can easily script something to grab the domain assuming all domains are the same top level (.com, .net) but if it ends in .com.au I can't figure out how to grab it.
Was hoping there was a lookup using virtualmin that would display the domain of a user (user.domain.com.au, user.domain.net, etc).
Thanks!
-- Craig
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Sun, 07/06/2014 - 21:45 Comment #1
Sure, you can do this using the API with a command like :
virtualmin list-domains --user bob --name-only
or to get just the top-level domain, use
virtualmin list-domains --user bob --name-only --toplevel
Submitted by isdahlc on Sun, 07/06/2014 - 21:52 Pro Licensee Comment #2
I thought there might be... unfortunately neither of those commands works for me...
[root@mail05 ~]# virtualmin list-domains --user cindy --name-only
No top-level domain owned by cindy exists
Submitted by andreychek on Sun, 07/06/2014 - 22:03 Comment #3
In this case, do you happen to know the domain that the user "cindy" owns?
If so, I'm curious what output this command produces:
virtualmin list-domains --domain cindysdomain.tld
The output of that command will show the user that Virtualmin thinks owns that domain, and we can use that to try and sort out why that's not working for you.
Submitted by isdahlc on Sun, 07/06/2014 - 23:46 Pro Licensee Comment #4
Re-read my first message except replace the last sentence with the following:
Was hoping there was a lookup using virtualmin that would display the domain of an EMAIL user (user.domain.com.au, user.domain.net, etc). Not the domain owner.
Submitted by JamieCameron on Mon, 07/07/2014 - 00:38 Comment #5
Sorry, that isn't possible in the current release.
However, since this is a pretty good idea I will add a
--mail-user
flag to thelist-domains
API command in the next release, to allow searching by mail user.Submitted by isdahlc on Tue, 07/08/2014 - 19:21 Pro Licensee Comment #6
Do you have an estimated release for this feature? Not pushing just planning. Thanks!
Submitted by JamieCameron on Tue, 07/08/2014 - 19:29 Comment #7
Probably a couple of weeks away.
Submitted by Issues on Tue, 07/22/2014 - 19:31 Comment #8
Automatically closed -- issue fixed for 2 weeks with no activity.