doc/web/source/howto/general_subcommands.rst
changeset 760 b678a1c43027
parent 748 659c4476c57c
child 761 e4e656f19771
equal deleted inserted replaced
748:659c4476c57c 760:b678a1c43027
     1 ===================
       
     2 General subcommands
       
     3 ===================
       
     4 
       
     5 configget
       
     6 ---------
       
     7 Syntax:
       
     8  | **vmm configget** *option*
       
     9  | **vmm cg** *option*
       
    10 
       
    11 This subcommand is used to display the actual value of the given
       
    12 configuration *option*.
       
    13 
       
    14 Example:
       
    15 
       
    16 .. code-block:: console
       
    17 
       
    18  root@host:~# vmm configget misc.crypt_sha512_rounds
       
    19  misc.crypt_sha512_rounds = 5000
       
    20 
       
    21 .. versionadded:: 0.6.0
       
    22 
       
    23 configset
       
    24 ---------
       
    25 Syntax:
       
    26  | **vmm configset** *option value*
       
    27  | **vmm cs** *option value*
       
    28 
       
    29 Use this subcommand to set or update a single configuration option's value.
       
    30 *option* is the configuration option, *value* is the *option*'s new value.
       
    31 
       
    32 .. note::
       
    33  This subcommand will create a new :file:`vmm.cfg` without any comments.
       
    34  Your current configuration file will be backed as :file:`vmm.cfg.bak`.
       
    35 
       
    36 Example:
       
    37 
       
    38 .. code-block:: console
       
    39 
       
    40  root@host:~# vmm configget domain.transport
       
    41  domain.transport = dovecot:
       
    42  root@host:~# vmm configset domain.transport lmtp:unix:private/dovecot-lmtp
       
    43  root@host:~# vmm cg domain.transport
       
    44  domain.transport = lmtp:unix:private/dovecot-lmtp
       
    45 
       
    46 .. versionadded:: 0.6.0
       
    47 
       
    48 configure
       
    49 ---------
       
    50 Syntax:
       
    51  | **vmm configure** [*section*]
       
    52  | **vmm cf** [*section*]
       
    53 
       
    54 Starts the interactive configuration for all configuration sections.
       
    55 
       
    56 In this process the currently set value of each option will be displayed
       
    57 in square brackets.
       
    58 If no value is configured, the default value of each option will be
       
    59 displayed in square brackets.
       
    60 Press the return key, to accept the displayed value.
       
    61 
       
    62 If the optional argument *section* is given, only the configuration options
       
    63 from the given section will be displayed and will be configurable.
       
    64 The following sections are available:
       
    65 
       
    66 ======== ==========================
       
    67 section  description
       
    68 ======== ==========================
       
    69 account  Account settings
       
    70 bin      Paths to external binaries
       
    71 database Database settings
       
    72 domain   Domain settings
       
    73 mailbox  Mailbox settings
       
    74 misc     Miscellaneous settings
       
    75 ======== ==========================
       
    76 
       
    77 All configuration options are described in :manpage:`vmm.cfg(5)`.
       
    78 
       
    79 .. note::
       
    80  This subcommand will create a new :file:`vmm.cfg` without any comments.
       
    81  Your current configuration file will be backed as :file:`vmm.cfg.bak`.
       
    82 
       
    83 Example:
       
    84 
       
    85 .. code-block:: console
       
    86 
       
    87  root@host:~# vmm configure mailbox
       
    88  Using configuration file: /usr/local/etc/vmm.cfg
       
    89 
       
    90  * Configuration section: `mailbox'
       
    91  Enter new value for option folders [Drafts:Sent:Templates:Trash]:
       
    92  Enter new value for option format [maildir]: mdbox
       
    93  Enter new value for option subscribe [True]:
       
    94  Enter new value for option root [Maildir]: mdbox
       
    95 
       
    96 getuser
       
    97 -------
       
    98 Syntax:
       
    99  | **vmm getuser** *uid*
       
   100  | **vmm gu** *ui*
       
   101 
       
   102 If only the *uid* is available, for example from process list, the
       
   103 subcommand **getuser** will show the user's address.
       
   104 
       
   105 Example:
       
   106 
       
   107 .. code-block:: console
       
   108 
       
   109  root@host:~# vmm getuser 79876
       
   110  Account information
       
   111  -------------------
       
   112          UID............: 79876
       
   113          GID............: 70704
       
   114          Address........: a.user@example.com
       
   115 
       
   116 help
       
   117 ----
       
   118 Syntax:
       
   119  | **vmm help** [*subcommand*]
       
   120  | **vmm h** [*subcommand*]
       
   121 
       
   122 Prints a list of available subcommands with a short description to stdout.
       
   123 When a *subcommand* was given, help for that *subcommand* will be displayed.
       
   124 After this :command:`vmm` exits.
       
   125 
       
   126 listaddresses
       
   127 -------------
       
   128 Syntax:
       
   129  | **vmm listaddresses** [*pattern*]
       
   130  | **vmm ll** [*pattern*]
       
   131 
       
   132 This command lists all defined addresses. Addresses belonging to
       
   133 alias-domains are prefixed with a '-', addresses of regular domains with
       
   134 a '+'.
       
   135 Additionally, the letters 'u', 'a', and 'r' indicate the type of each
       
   136 address: user, alias and relocated respectively. The output can be limited
       
   137 with an optional *pattern*.
       
   138 
       
   139 To perform a wild card search, the **%** character can be used at the start
       
   140 and/or the end of the *pattern*.
       
   141 
       
   142 Example:
       
   143 
       
   144 .. code-block:: console
       
   145 
       
   146  root@host:~# vmm ll example.com
       
   147  Matching addresses
       
   148  ------------------
       
   149          [u+] a.user@example.com
       
   150          [r+] b.user@example.com
       
   151          [u+] d.user@example.com
       
   152          [u+] john.doe@example.com
       
   153          [u+] postmaster@example.com
       
   154          [a+] support@example.com
       
   155 
       
   156 .. versionadded:: 0.6.0
       
   157 
       
   158 listaliases
       
   159 -----------
       
   160 Syntax:
       
   161  | **vmm listaliases** [*pattern*]
       
   162  | **vmm la** [*pattern*]
       
   163 
       
   164 This command lists all defined aliases. Aliases belonging to alias-domains
       
   165 are prefixed with a '-', addresses of regular domains with a '+'.
       
   166 The output can be limited with an optional *pattern*.
       
   167 
       
   168 To perform a wild card search, the **%** character can be used at the start
       
   169 and/or the end of the *pattern*.
       
   170 
       
   171 Example:
       
   172 
       
   173 .. code-block:: console
       
   174 
       
   175  root@host:~# vmm listaliases example.com
       
   176  Matching aliases
       
   177  ----------------
       
   178          [+] support@example.com
       
   179 
       
   180 .. versionadded:: 0.6.0
       
   181 
       
   182 listdomains
       
   183 -----------
       
   184 Syntax:
       
   185  | **vmm listdomains** [*pattern*]
       
   186  | **vmm ld** [*pattern*]
       
   187 
       
   188 This subcommand lists all available domains.
       
   189 All domain names will be prefixed either with '[+]', if the domain is
       
   190 a primary domain, or with '[-]', if it is an alias domain name.
       
   191 The output can be limited with an optional pattern.
       
   192 
       
   193 To perform a wild card search, the **%** character can be used at the start
       
   194 and/or the end of the *pattern*.
       
   195 
       
   196 Example:
       
   197 
       
   198 .. code-block:: console
       
   199 
       
   200  root@host:~# vmm listdomains %example%
       
   201  Matching domains
       
   202  ----------------
       
   203          [+] example.com
       
   204          [-]     e.g.example.com
       
   205          [-]     example.name
       
   206          [+] example.net
       
   207          [+] example.org
       
   208 
       
   209 listpwschemes
       
   210 -------------
       
   211 Syntax:
       
   212  | **vmm listpwschemes**
       
   213  | **vmm lp**
       
   214 
       
   215 This subcommand lists all password schemes which could be used in the
       
   216 :file:`vmm.cfg` as value of the *misc.password_scheme* option.
       
   217 The output varies, depending on the used Dovecot version and the system's
       
   218 libc.
       
   219 
       
   220 When your Dovecot installation isn't too old, you will see additionally
       
   221 a few usable encoding suffixes.
       
   222 One of them can be appended to the password scheme.
       
   223 
       
   224 Example:
       
   225 
       
   226 .. code-block:: console
       
   227 
       
   228  root@host:~# vmm listpwschemes
       
   229  Usable password schemes
       
   230  -----------------------
       
   231          CRYPT SHA512-CRYPT LDAP-MD5 DIGEST-MD5 SHA256 SHA512 SSHA512
       
   232          SKEY SSHA NTLM RPA MD5-CRYPT HMAC-MD5 SHA1 PLAIN SHA CRAM-MD5
       
   233          SSHA256 MD5 LANMAN CLEARTEXT PLAIN-MD5 PLAIN-MD4 OTP SMD5
       
   234          SHA256-CRYPT
       
   235 
       
   236  Usable encoding suffixes
       
   237  ------------------------
       
   238          .B64 .BASE64 .HEX
       
   239 
       
   240 .. versionadded:: 0.6.0
       
   241 
       
   242 listrelocated
       
   243 -------------
       
   244 Syntax:
       
   245  | **vmm listrelocated** [*pattern*]
       
   246  | **vmm lr** [*pattern*]
       
   247 
       
   248 This command lists all defined relocated addresses.
       
   249 Relocated entries belonging to alias-domains are prefixed with a '-',
       
   250 addresses of regular domains with a '+'.
       
   251 The output can be limited with an optional *pattern*.
       
   252 
       
   253 To perform a wild card search, the **%** character can be used at the start
       
   254 and/or the end of the *pattern*.
       
   255 
       
   256 Example:
       
   257 
       
   258 .. code-block:: console
       
   259 
       
   260  root@host:~# vmm listrelocated example.com
       
   261  Matching relocated users
       
   262  ------------------------
       
   263          [+] b.user@example.com
       
   264 
       
   265 .. versionadded:: 0.6.0
       
   266 
       
   267 listusers
       
   268 ---------
       
   269 Syntax:
       
   270  | **vmm listusers** [*pattern*]
       
   271  | **vmm lu** [*pattern*]
       
   272 
       
   273 This command lists all user accounts.
       
   274 User accounts belonging to alias-domains are prefixed with a '-', addresses
       
   275 of regular domains with a '+'.
       
   276 The output can be limited with an optional *pattern*.
       
   277 
       
   278 To perform a wild card search, the **%** character can be used at the start
       
   279 and/or the end of the *pattern*.
       
   280 
       
   281 Example:
       
   282 
       
   283 .. code-block:: console
       
   284 
       
   285  root@host:~# vmm listusers example.com
       
   286  Matching user accounts
       
   287  ----------------------
       
   288          [+] a.user@example.com
       
   289          [+] d.user@example.com
       
   290          [+] john.doe@example.com
       
   291          [+] postmaster@example.com
       
   292 
       
   293 .. versionadded:: 0.6.0
       
   294 
       
   295 version
       
   296 -------
       
   297 Syntax:
       
   298  | **vmm version**
       
   299  | **vmm v**
       
   300 
       
   301 Prints :command:`vmm`'s version and copyright information to stdout.
       
   302 After this :command:`vmm` exits.