VirtualMailManager/cli/subcommands.py
branchv0.6.x
changeset 362 c2e8eab2616d
parent 361 971577b89d26
child 366 d6573da35b5f
equal deleted inserted replaced
361:971577b89d26 362:c2e8eab2616d
   205         usage(EX_MISSING_ARGS, _(u'Missing domain name.'), ctx.scmd)
   205         usage(EX_MISSING_ARGS, _(u'Missing domain name.'), ctx.scmd)
   206     elif ctx.argc < 4:
   206     elif ctx.argc < 4:
   207         ctx.hdlr.domain_add(ctx.args[2].lower())
   207         ctx.hdlr.domain_add(ctx.args[2].lower())
   208     else:
   208     else:
   209         ctx.hdlr.domain_add(ctx.args[2].lower(), ctx.args[3])
   209         ctx.hdlr.domain_add(ctx.args[2].lower(), ctx.args[3])
       
   210     if not ctx.cget('domain.auto_postmaster'):
       
   211         return
       
   212     ctx.scmd = 'useradd'
       
   213     ctx.args = [prog, ctx.scmd, u'postmaster@' + ctx.args[2].lower()]
       
   214     ctx.argc = 3
       
   215     user_add(ctx)
   210 
   216 
   211 
   217 
   212 def domain_delete(ctx):
   218 def domain_delete(ctx):
   213     """delete the given domain and all its alias domains"""
   219     """delete the given domain and all its alias domains"""
   214     if ctx.argc < 3:
   220     if ctx.argc < 3: