# HG changeset patch # User Pascal Volk # Date 1209528313 0 # Node ID 668951708f2f28f49da94479a89c40ab8c8a9b01 # Parent 985cee77da5f3319768368365b8979d17e454a7e * 'vmm.cfg.5' * 'vmm.1' - Reworded some parts. * 'vmm' - Added function _getOrder() for a (hopefully) better structured output from the domaininfo, userinfo and getuser subcommands. diff -r 985cee77da5f -r 668951708f2f ChangeLog --- a/ChangeLog Tue Apr 29 00:13:50 2008 +0000 +++ b/ChangeLog Wed Apr 30 04:05:13 2008 +0000 @@ -1,4 +1,11 @@ === 0.4 === +2008-04-30 Pascal Volk + * vmm.1, vmm.cfg.5: + Reworded some parts. + * vmm: + Added function _getOrder() for a (hopefully) better structured output + from the domaininfo, userinfo and getuser subcommands. + 2008-04-28 Pascal Volk * vmm.cfg: diff -r 985cee77da5f -r 668951708f2f vmm --- a/vmm Tue Apr 29 00:13:50 2008 +0000 +++ b/vmm Wed Apr 30 04:05:13 2008 +0000 @@ -92,11 +92,34 @@ sys.stderr.write('Sorry, passwords do not match\n') return clear0 +def _getOrder(): + global argc + order = () + if sys.argv[1] in ['di', 'domaininfo']: + order = (('domainname', 0), ('gid', 1), ('transport', 0), + ('domaindir', 0), ('accounts', 0), ('aliases', 0)) + elif sys.argv[1] in ['ui', 'userinfo']: + if argc == 3: + order = (('address', 0), ('name', 0), ('uid', 1), ('gid', 1), + ('transport', 0), ('maildir', 0), ('smtp', 1), ('pop3', 1), + ('imap', 1), ('managesieve', 1)) + else: + order = (('address', 0), ('name', 0), ('uid', 1), ('gid', 1), + ('transport', 0), ('maildir', 0), ('disk usage', 0), + ('smtp', 1), ('pop3', 1), ('imap', 1), ('managesieve', 1)) + elif sys.argv[1] in ['gu', 'getuser']: + order = (('uid', 1), ('gid', 1), ('address', 0)) + return order + + def _printInfo(info, title): msg = title+' information' print '%s\n%s' % (msg, '-'*len(msg)) - for k,v in info.items(): - print '\t%s: %s' % (k.title().ljust(15, '.'), v) + for k,u in _getOrder(): + if u: + print '\t%s: %s' % (k.upper().ljust(15, '.'), info[k]) + else: + print '\t%s: %s' % (k.title().ljust(15, '.'), info[k]) print def _printUsers(users, title): diff -r 985cee77da5f -r 668951708f2f vmm.1 --- a/vmm.1 Tue Apr 29 00:13:50 2008 +0000 +++ b/vmm.1 Wed Apr 30 04:05:13 2008 +0000 @@ -1,7 +1,7 @@ .\" $Id$ -.TH "VMM" "1" "26. April 2008" "Pascal Volk" "Virtual Mail Manager" +.TH "VMM" "1" "30. April 2008" "Pascal Volk" .SH NAME -vmm \- commandline tool to manage email domains/accounts/aliases +vmm \- command line tool to manage email domains/accounts/aliases .SH SYNOPSIS .B vmm \fIsubcommand\fP \fIobject\fP [ \fIargs\fP ] @@ -17,7 +17,7 @@ Starts the interactive configuration for all configuration sections. .br If the optional argument \fIsection\fP is given, only the configuration options -from the given section will be displayed and be configurable. The following +from the given section will be displayed and will be configurable. The following sections are available: .RS .PD 0 @@ -120,7 +120,7 @@ .fi .TP \fBdomaintransport\fP (\fBdt\fP) \fIdomain\fP \fItransport\fP [ \fIforce\fP ] -A new transport for the given domain can be set with this subcommand. +A new transport for the indicated domain can be set with this subcommand. .br If the additional keyword '\fBforce\fP' is given all account specific transport settings will be overwritten. @@ -170,7 +170,7 @@ be summarized and displayed too. .TP \fBusername\fP (\fBun\fP) \fIaddress\fP \fI'Users Name'\fP -The users real name can be set/updated with this subcommand. +The user's real name can be set/updated with this subcommand. .PP .nf Example: @@ -204,7 +204,7 @@ If a user shouldn't have access to one or all services you can restrict the access with this subcommand. .br -If no service or the keyword '\fIall\fP' is given all services ('smtp', 'pop3', 'imap', and 'managesieve') will be disabled for the account with the specified +If neither a service nor the keyword '\fIall\fP' is given all services ('smtp', 'pop3', 'imap', and 'managesieve') will be disabled for the account with the specified \fIaddress\fP. Otherwise only the specified service will be restricted. .PP .nf @@ -218,7 +218,7 @@ \fIimap\fP | \fImanagesieve\fP | \fIall\fP ] To allow access to one or all restricted services use this subcommand. .br -If no service or the keyword '\fIall\fP' is given all services ('smtp', 'pop3', 'imap', and 'managesieve') will be enabled for the account with the specified +If neither a service nor the keyword '\fIall\fP' is given all services ('smtp', 'pop3', 'imap', and 'managesieve') will be enabled for the account with the specified \fIaddress\fP. Otherwise only the specified service will be enabled. .TP \fBuserdelete\fP (\fBud\fP) \fIaddress\fP diff -r 985cee77da5f -r 668951708f2f vmm.cfg.5 --- a/vmm.cfg.5 Tue Apr 29 00:13:50 2008 +0000 +++ b/vmm.cfg.5 Wed Apr 30 04:05:13 2008 +0000 @@ -1,13 +1,13 @@ .\" $Id$ -.TH vmm.cfg 5 "28. April 2008" "Pascal Volk" +.TH vmm.cfg 5 "30. April 2008" "Pascal Volk" .SH NAME vmm.cfg \- configuration file for vmm .SH SYNOPSIS /usr/local/etc/vmm.cfg .SH DESCRIPTION -\fBvmm\fR(1) reads configuration data form \fI/usr/local/etc/vmm.cfg\fP. +\fBvmm\fR(1) reads configuration data from \fI/usr/local/etc/vmm.cfg\fP. .br -The configuration file is split in multiple sections. Sections begins with the +The configuration file is split in multiple sections. A section starts with the section name, enclosed in square brackets '[' and ']' (e.g. \fB[database]\fP), followed by \'option=value' pairs (e.g. \fBhost = 127.0.0.1\fP). .br @@ -19,7 +19,9 @@ .IP \(bu .I Boolean to indicate if something is enabled/activated (true) or disabled/deactivated -(false). Accepted values for \fBtrue\fP are: \fB1\fP, \fByes\fP, \fBtrue\fP and +(false). +.br +Accepted values for \fBtrue\fP are: \fB1\fP, \fByes\fP, \fBtrue\fP and \fBon\fP. .br Accepted values for \fBfalse\fP are: \fB0\fP, \fBno\fP, \fBfalse\fP and @@ -34,7 +36,8 @@ world\fP', or '\fB/usr/bin/strings\fP' .\" ----- .SH DATABASE SECTION -This section contains options required for the database connection. +The \fBdatabase\fP section is used to specify some options required to +connect to the database. .TP \fBhost\fP (\fIString\fP) Hostname or IP address of the database server. @@ -60,7 +63,7 @@ name = mailsys .\" ----- .SH MAILDIR SECTION -This section defines some options for the Maildirs. +The \fBmaildir\fP section is used to specify some options for the Maildirs. .TP \fBfolder\fP (\fIString\fP) Default name of the maildir folder in users home directory. @@ -88,7 +91,8 @@ delete = false .\" ----- .SH SERVICES SECTION -This section specifies the default restrictions for each account. +The \fBservices\fP section is used to specify the default restrictions for +all accounts. .TP \fBsmtp\fP (\fIBoolean\fP) Decides if users can login via smtp by default. @@ -114,7 +118,8 @@ managesieve = false .\" ----- .SH DOMDIR SECTION -This section defines some options for the directories of the domains. +The \fBdomdir\fP section is used to specify options for the directories of the +domains. .TP \fBbase\fP (\fIString\fP) All domain directories will be created inside this directory. @@ -137,7 +142,8 @@ delete = false .\" ----- .SH BIN SECTION -This section contains some paths to some binaries. +The \fBbin\fP section is used to specify some paths to some binaries required +by \fBvmm\fP. .TP \fBdovecotpw\fP (\fIString\fP) The absolute path to the dovecotpw binary. This binary is used to generate a @@ -156,7 +162,7 @@ du = /usr/bin/du .\" ----- .SH MISC SECTION -This sections defines miscellaneous settings. +The \fBmisc\fP section is used to define miscellaneous settings. .TP \fBpasswdscheme\fP (\fIString\fP) Password scheme to use (see also: dovecotpw -l) @@ -182,7 +188,7 @@ transport = dovecot: .\" ----- .SH CONFIG SECTION -This section is a internal control section. +The \fBconfig\fP section is a internal used control section. .TP \fBdone\fP (\fIBoolean\fP) This option is set to \fIfalse\fP when \fBvmm\fP is installed for the first @@ -201,7 +207,7 @@ .SH FILES /usr/local/etc/vmm.cfg .SH SEE ALSO -vmm(1), commandline tool to manage email domains/accounts/aliases +vmm(1), command line tool to manage email domains/accounts/aliases .SH AUTHOR \fBvmm\fP and its man pages were written by Pascal Volk <\fIp.volk@veb-it.de\fP> and are licensed under the terms of the BSD License.