VMM/cli/subcommands: Small improvement in domain_add().
Inform the admin, when the postmaster account will be auto-created.
--- a/VirtualMailManager/cli/subcommands.py Sat Nov 05 15:43:23 2011 +0000
+++ b/VirtualMailManager/cli/subcommands.py Sat Nov 05 16:41:19 2011 +0000
@@ -214,12 +214,12 @@
ctx.hdlr.domain_add(ctx.args[2].lower())
else:
ctx.hdlr.domain_add(ctx.args[2].lower(), ctx.args[3])
- if not ctx.cget('domain.auto_postmaster'):
- return
- ctx.scmd = 'useradd'
- ctx.args = [prog, ctx.scmd, u'postmaster@' + ctx.args[2].lower()]
- ctx.argc = 3
- user_add(ctx)
+ if ctx.cget('domain.auto_postmaster'):
+ w_std(_(u'Creating account for postmaster@%s') % ctx.args[2].lower())
+ ctx.scmd = 'useradd'
+ ctx.args = [prog, ctx.scmd, u'postmaster@' + ctx.args[2].lower()]
+ ctx.argc = 3
+ user_add(ctx)
def domain_delete(ctx):