VMM/cli/subcommands: Added 'auto postmaster' to domain_add(). v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Tue, 10 Aug 2010 04:10:54 +0000
branchv0.6.x
changeset 362 c2e8eab2616d
parent 361 971577b89d26
child 363 502d59f4bb34
VMM/cli/subcommands: Added 'auto postmaster' to domain_add().
VirtualMailManager/cli/subcommands.py
man/de/man1/vmm.1.rst
man/man1/vmm.1.rst
man/substitute_links_1.rst
--- a/VirtualMailManager/cli/subcommands.py	Tue Aug 10 01:02:21 2010 +0000
+++ b/VirtualMailManager/cli/subcommands.py	Tue Aug 10 04:10:54 2010 +0000
@@ -207,6 +207,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)
 
 
 def domain_delete(ctx):
--- a/man/de/man1/vmm.1.rst	Tue Aug 10 01:02:21 2010 +0000
+++ b/man/de/man1/vmm.1.rst	Tue Aug 10 04:10:54 2010 +0000
@@ -158,6 +158,9 @@
   *Transport* ist gleichzeitig der Vorgabe-Transport für alle neuen Konten,
   die unter dieser Domain eingerichtet werden.
 
+  Wenn der Wert der Konfigurations-Option |domain.auto_postmaster|_ **true**
+  ist, wird **vmm** auch ein Konto für **postmaster@**\ *Domain* erstellen.
+
   Beispiele::
 
     vmm domainadd support.example.com smtp:mx1.example.com
--- a/man/man1/vmm.1.rst	Tue Aug 10 01:02:21 2010 +0000
+++ b/man/man1/vmm.1.rst	Tue Aug 10 04:10:54 2010 +0000
@@ -150,6 +150,9 @@
   *transport* will be the default transport for all new accounts in this
   domain.
 
+  When |domain.auto_postmaster|_ is set to **true**, **vmm** will also create
+  an account for **postmaster@**\ *domain*.
+
   Examples::
 
     vmm domainadd support.example.com smtp:mx1.example.com
--- a/man/substitute_links_1.rst	Tue Aug 10 01:02:21 2010 +0000
+++ b/man/substitute_links_1.rst	Tue Aug 10 04:10:54 2010 +0000
@@ -5,6 +5,8 @@
 .. |account.random_password| replace:: `account.random_password`
 .. _account.random_password: vmm.cfg.5#account-random-password
 
+.. |domain.auto_postmaster| replace:: `domain.auto_postmaster`
+.. _domain.auto_postmaster: vmm.cfg.5#domain-auto-postmaster
 .. |domain.force_deletion| replace:: `domain.force_deletion`
 .. _domain.force_deletion: vmm.cfg.5#domain-force-deletion