VirtualMailManager/cli/subcommands.py
branchv0.7.x
changeset 685 c6024bc1de0f
parent 681 4cab983479db
child 686 5f4abdab738e
equal deleted inserted replaced
684:083d36f53297 685:c6024bc1de0f
   164 
   164 
   165 
   165 
   166 def domain_add(ctx):
   166 def domain_add(ctx):
   167     """create a new domain"""
   167     """create a new domain"""
   168     fqdn = ctx.args.fqdn.lower()
   168     fqdn = ctx.args.fqdn.lower()
   169     transport = ctx.args.transport.lower if ctx.args.transport else None
   169     transport = ctx.args.transport.lower() if ctx.args.transport else None
   170     ctx.hdlr.domain_add(fqdn, transport)
   170     ctx.hdlr.domain_add(fqdn, transport)
   171     if ctx.cget('domain.auto_postmaster'):
   171     if ctx.cget('domain.auto_postmaster'):
   172         w_std(_('Creating account for postmaster@%s') % fqdn)
   172         w_std(_('Creating account for postmaster@%s') % fqdn)
   173         ctx.args.scmd = 'useradd'
   173         ctx.args.scmd = 'useradd'
   174         ctx.args.address = 'postmaster@%s' % fqdn
   174         ctx.args.address = 'postmaster@%s' % fqdn