Submitted by izoox on Mon, 06/03/2013 - 17:41
Is there a way to create an alias with it's own mail from the api? I can't seem to find it or figure it out.
Status:
Closed (fixed)
Is there a way to create an alias with it's own mail from the api? I can't seem to find it or figure it out.
Comments
Submitted by izoox on Mon, 06/03/2013 - 17:41 Comment #1
Never mind, I looked at the help from the command line and found it easily.
Submitted by izoox on Mon, 06/03/2013 - 17:44 Comment #2
I do keep getting this now: Mail for the domain cannot be enabled unless an administration user is created
Submitted by JamieCameron on Mon, 06/03/2013 - 18:12 Comment #3
You should just use the --alias-with-mail parameter, instead of --alias
Submitted by izoox on Mon, 06/03/2013 - 18:21 Comment #4
When I did that, it did not create the domain so that I could add users like it did when I created it from the user interface.
Submitted by JamieCameron on Mon, 06/03/2013 - 23:23 Comment #5
Could you post the full command you are using to create the domain? It should be something like :
virtualmin create-domain --domain aliasdomain.com --alias-with-mail originaldomain.com --dir --mail
Submitted by izoox on Tue, 06/04/2013 - 00:09 Comment #6
virtualmin create-domain --domain aliasdomain.com --alias-with-mail originaldomain.com --dir --mail --web --dns --spam --virus
Now I'm getting:
Unknown plan name
Submitted by izoox on Tue, 06/04/2013 - 00:27 Comment #7
When I set the plan I get the error about "Mail for the domain cannot be enabled unless an administration user is created"
Submitted by JamieCameron on Tue, 06/04/2013 - 12:20 Comment #8
You don't need to set the
--plan
parameter at all, because plans only apply to top-level virtual servers. Aliases inherit all limits from their parent.Submitted by izoox on Tue, 06/04/2013 - 12:22 Comment #9
When I don't set plan it asks me for a plan though.
Submitted by izoox on Tue, 06/04/2013 - 12:22 Comment #10
This is also an alias of a sub-server if it matters.
Submitted by JamieCameron on Tue, 06/04/2013 - 13:18 Comment #11
Which VIrtualmin version are you using there? From looking at the code for
create-domain
, it only outputs that "Unknown plan name" message if the--plan
parameter is given.Submitted by izoox on Tue, 06/04/2013 - 13:34 Comment #12
I figured the plan issue out. But I am still getting the error:
Mail for the domain cannot be enabled unless an administration user is created
Does it matter that I am trying to make this an alias with it's own mail of a sub-server?
Submitted by JamieCameron on Tue, 06/04/2013 - 17:43 Comment #13
Does the sub-server you are trying to create an alias of have email enabled?
Submitted by izoox on Tue, 06/04/2013 - 19:47 Comment #14
It wasn't turned on before, but I just turned it on and I am still getting the same message:
Mail for the domain cannot be enabled unless an administration user is created
Submitted by izoox on Tue, 06/04/2013 - 19:50 Comment #15
I made the alias from the user interface and it worked properly, that is why it's so baffling that it is not working.
Submitted by JamieCameron on Tue, 06/04/2013 - 22:46 Comment #16
Ok, I see the bug now. The work-around is to add the flag
--parent xxx.com
, where xxx.com is the top-level virtual server for the sub-server.This will be fixed properly in the next Virtualmin release.
Submitted by izoox on Wed, 06/05/2013 - 12:13 Comment #17
I still can't get it to add the server by putting the parent domain. It returns the same error.
Submitted by izoox on Wed, 06/05/2013 - 12:48 Comment #18
Can you send me a patch or something? I need this working on one server in particular as soon as possible.
Submitted by JamieCameron on Wed, 06/05/2013 - 15:48 Comment #19
I have attached a replacement for the file /usr/{share,libexec}/webmin/virtual-server/create-domain.pl to this bug report.
Submitted by izoox on Wed, 06/05/2013 - 15:56 Comment #20
Should it go to both folders or does only one of them exist? ({share,libexec})
Submitted by JamieCameron on Wed, 06/05/2013 - 16:10 Comment #21
On debian/ubuntu it should go under /usr/share
On redhat/centos/fedora it should go under /usr/libexec
Submitted by izoox on Wed, 06/05/2013 - 16:14 Comment #22
The error didn't show up but when I browse the the domain in the gui, I don't see Edit Users, I see Edit Mail Aliases.
Submitted by JamieCameron on Wed, 06/05/2013 - 16:34 Comment #23
Did you supply the
--dir
flag tocreate-domain
?Submitted by izoox on Thu, 06/06/2013 - 09:24 Comment #24
It worked like a charm. I had it in there before, I must have accidentally deleted it while testing different combinations. Thanks!
Submitted by JamieCameron on Fri, 06/07/2013 - 00:17 Comment #25
Great!
Submitted by Issues on Fri, 06/21/2013 - 00:41 Comment #26
Automatically closed -- issue fixed for 2 weeks with no activity.