man/man1/vmm.1.rst
branchv0.6.x
changeset 179 3d09c657e9e5
child 332 352ca7f1b332
equal deleted inserted replaced
178:9480f2b15129 179:3d09c657e9e5
       
     1 =====
       
     2  vmm
       
     3 =====
       
     4 
       
     5 ----------------------------------------------------------
       
     6 command line tool to manage email domains/accounts/aliases
       
     7 ----------------------------------------------------------
       
     8 
       
     9 :Author:         Pascal Volk <neverseen@users.sourceforge.net>
       
    10 :Date:           2010-01-30
       
    11 :Version:        vmm-0.6.0
       
    12 :Manual group:   vmm Manual
       
    13 :Manual section: 1
       
    14 
       
    15 .. contents::
       
    16   :backlinks: top
       
    17   :class: htmlout
       
    18 
       
    19 SYNOPSIS
       
    20 ========
       
    21 **vmm** *subcommand* *object* [ *arguments* ]
       
    22 
       
    23 
       
    24 DESCRIPTION
       
    25 ===========
       
    26 **vmm** (a virtual mail manager) is a command line tool for
       
    27 administrators/postmasters to manage (alias) domains, accounts and alias
       
    28 addresses. It's designed for Dovecot and Postfix with a PostgreSQL backend.
       
    29 
       
    30 
       
    31 SUBCOMMANDS
       
    32 ===========
       
    33 Each subcommand has both a long and a short form. The short form is shown
       
    34 enclosed in parentheses. Both forms are case sensitive.
       
    35 
       
    36 
       
    37 GENERAL SUBCOMMANDS
       
    38 -------------------
       
    39 .. _configure:
       
    40 
       
    41 ``configure (cf) [ section ]``
       
    42   Starts the interactive configuration for all configuration sections.
       
    43 
       
    44   In this process the currently set value of each option will be shown in
       
    45   square brackets. If no value is configured, the default value of each
       
    46   option will be displayed in square brackets. Pres the enter key, to accept
       
    47   the displayed value.
       
    48 
       
    49   If the optional argument *section* is given, only the configuration
       
    50   options from the given section will be displayed and will be
       
    51   configurable. The following sections are available:
       
    52 
       
    53   | - **account**
       
    54   | - **bin**
       
    55   | - **database**
       
    56   | - **domain**
       
    57   | - **maildir**
       
    58   | - **misc**
       
    59 
       
    60   Example::
       
    61 
       
    62     vmm configure domain
       
    63     Using configuration file: /usr/local/etc/vmm.cfg
       
    64 
       
    65     * Configuration section: “domain”
       
    66     Enter new value for option directory_mode [504]:
       
    67     Enter new value for option delete_directory [True]: no
       
    68     Enter new value for option auto_postmaster [True]:
       
    69     Enter new value for option force_deletion [True]: off
       
    70 
       
    71 .. _getuser:
       
    72 
       
    73 ``getuser (gu) userid``
       
    74   If only the *userid* is available, for example from process list, the
       
    75   subcommand **getuser** will show the user's address.
       
    76 
       
    77   Example::
       
    78 
       
    79     vmm getuser 70004
       
    80     Account information
       
    81     -------------------
       
    82             UID............: 70004
       
    83             GID............: 70000
       
    84             Address........: c.user@example.com
       
    85 
       
    86 .. _listdomains:
       
    87 
       
    88 ``listdomains (ld) [ pattern ]``
       
    89   This subcommand lists all available domains. All domain names will be
       
    90   prefixed either with '[+]', if the domain is a primary domain, or with
       
    91   '[-]', if it is an alias domain name. The output can be limited with an
       
    92   optional *pattern*.
       
    93 
       
    94   To perform a wild card search, the **%** character can be used at the
       
    95   start and/or the end of the *pattern*.
       
    96 
       
    97   Example::
       
    98 
       
    99     vmm listdomains %example%
       
   100     Matching domains
       
   101     ----------------
       
   102             [+] example.com
       
   103             [-]     e.g.example.com
       
   104             [-]     example.name
       
   105             [+] example.net
       
   106             [+] example.org
       
   107 
       
   108 .. _help:
       
   109 
       
   110 ``help (h)``
       
   111   Prints all available subcommands to stdout. After this **vmm** exits.
       
   112 
       
   113 .. _version:
       
   114 
       
   115 ``version (v)``
       
   116   Prints the version information from **vmm**.
       
   117 
       
   118 
       
   119 DOMAIN SUBCOMMANDS
       
   120 ------------------
       
   121 .. _domainadd:
       
   122 
       
   123 ``domainadd (da) domain [ transport ]``
       
   124   Adds the new *domain* into the database and creates the domain directory.
       
   125 
       
   126   If the optional argument *transport* is given, it will overwrite the
       
   127   default transport (|misc.transport|_) from |vmm.cfg(5)|_. The specified
       
   128   *transport* will be the default transport for all new accounts in this
       
   129   domain.
       
   130 
       
   131   Examples::
       
   132 
       
   133     vmm domainadd support.example.com smtp:mx1.example.com
       
   134     vmm domainadd sales.example.com
       
   135 
       
   136 .. _domaininfo:
       
   137 
       
   138 ``domaininfo (di) domain [ details ]``
       
   139   This subcommand shows some information about the given *domain*.
       
   140 
       
   141   For a more detailed information about the *domain* the optional argument
       
   142   *details* can be specified. A possible *details* value may be one of the
       
   143   following five keywords:
       
   144 
       
   145   ``accounts``
       
   146     to list all existing accounts
       
   147   ``aliasdomains``
       
   148     to list all assigned alias domains
       
   149   ``aliases``
       
   150     to list all available aliases addresses
       
   151   ``relocated``
       
   152     to list all relocated users
       
   153   ``full``
       
   154     to list all information mentioned above
       
   155 
       
   156   Example::
       
   157 
       
   158     vmm domaininfo sales.example.com
       
   159     Domain information
       
   160     ------------------
       
   161             Domainname.....: sales.example.com
       
   162             GID............: 70002
       
   163             Transport......: dovecot:
       
   164             Domaindir......: /home/mail/5/70002
       
   165             Aliasdomains...: 0
       
   166             Accounts.......: 0
       
   167             Aliases........: 0
       
   168             Relocated......: 0
       
   169 
       
   170 .. _domaintransport:
       
   171 
       
   172 ``domaintransport (dt) domain transport [ force ]``
       
   173   A new *transport* for the indicated *domain* can be set with this
       
   174   subcommand.
       
   175 
       
   176   If the additional keyword **force** is given all account specific
       
   177   transport settings will be overwritten. Otherwise this setting will affect
       
   178   only new created accounts.
       
   179 
       
   180   Example::
       
   181 
       
   182     vmm domaintransport support.example.com dovecot:
       
   183 
       
   184 .. _domaindelete:
       
   185 
       
   186 ``domaindelete (dd) domain [ delalias | deluser | delall ]``
       
   187   This subcommand deletes the specified *domain*.
       
   188 
       
   189   If there are accounts and/or aliases assigned to the given domain, **vmm**
       
   190   will abort the requested operation and show an error message. If you know,
       
   191   what you are doing, you can specify one of the following keywords:
       
   192   **delalias**, **deluser** or **delall**.
       
   193 
       
   194   If you really always know what you are doing, edit your *vmm.cfg* and set
       
   195   the option |domain.force_deletion|_ to true.
       
   196 
       
   197 
       
   198 ALIAS DOMAIN SUBCOMMANDS
       
   199 ------------------------
       
   200 .. _aliasdomainadd:
       
   201 
       
   202 ``aliasdomainadd (ada) aliasdomain targetdomain``
       
   203   This subcommand adds the new *aliasdomain* to the *targetdomain* that
       
   204   should be aliased.
       
   205 
       
   206   Example::
       
   207 
       
   208     vmm aliasdomainadd example.name example.com
       
   209 
       
   210 .. _aliasdomaininfo:
       
   211 
       
   212 ``aliasdomaininfo (adi) aliasdomain``
       
   213   This subcommand shows to which domain the *aliasdomain* is assigned to.
       
   214 
       
   215   Example::
       
   216 
       
   217     vmm aliasdomaininfo example.name
       
   218     Alias domain information
       
   219     ------------------------
       
   220             The alias domain example.name belongs to:
       
   221                 * example.com
       
   222 
       
   223 .. _aliasdomainswitch:
       
   224 
       
   225 ``aliasdomainswitch (ads) aliasdomain targetdomain``
       
   226   If the target of the existing *aliasdomain* should be switched to another
       
   227   *targetdomain* use this subcommand.
       
   228 
       
   229   Example::
       
   230 
       
   231     vmm aliasdomainswitch example.name example.org
       
   232 
       
   233 .. _aliasdomaindelete:
       
   234 
       
   235 ``aliasdomaindelete (add) aliasdomain``
       
   236   Use this subcommand if the alias domain *aliasdomain* should be removed.
       
   237 
       
   238   Example::
       
   239 
       
   240     vmm aliasdomaindelete e.g.example.com
       
   241 
       
   242 
       
   243 ACCOUNT SUBCOMMANDS
       
   244 -------------------
       
   245 .. _useradd:
       
   246 
       
   247 ``useradd (ua) address [ password ]``
       
   248   Use this subcommand to create a new email account for the given *address*.
       
   249 
       
   250   If the *password* is not provided, **vmm** will prompt for it
       
   251   interactively.
       
   252 
       
   253   Examples::
       
   254 
       
   255     vmm ua d.user@example.com 'A 5ecR3t P4s5\\/\\/0rd'
       
   256     vmm ua e.user@example.com
       
   257     Enter new password:
       
   258     Retype new password:
       
   259 
       
   260 .. _userinfo:
       
   261 
       
   262 ``userinfo (ui) address [ details ]``
       
   263   This subcommand displays some information about the account specified by
       
   264   *address*.
       
   265 
       
   266   If the optional argument *details* is given some more information will be
       
   267   displayed. Possible values for *details* are:
       
   268 
       
   269   ``aliases``
       
   270     to list all alias addresses with the destination *address*
       
   271   ``du``
       
   272     to display the disk usage of a user's Maildir. In order to summarize the
       
   273     disk usage each time the this subcommand is executed automatically, set
       
   274     |account.disk_usage|_ in the *vmm.cfg* to true.
       
   275   ``full``
       
   276     to list all information mentioned above
       
   277 
       
   278 .. _username:
       
   279 
       
   280 ``username (un) address "User's Name"``
       
   281   The user's real name can be set/updated with this subcommand.
       
   282 
       
   283   Example::
       
   284 
       
   285     vmm un d.user@example.com 'John Doe'
       
   286 
       
   287 .. _userpassword:
       
   288 
       
   289 ``userpassword (up) address [ password ]``
       
   290   The *password* from an account can be updated with this subcommand.
       
   291 
       
   292   If the *password* is not provided, **vmm** will prompt for it
       
   293   interactively.
       
   294 
       
   295   Example::
       
   296 
       
   297     vmm up d.user@example.com 'A |\\/|0r3 5ecur3 P4s5\\/\\/0rd?'
       
   298 
       
   299 .. _usertransport:
       
   300 
       
   301 ``usertransport (ut) address transport``
       
   302   A different *transport* for an account can be specified with this
       
   303   subcommand.
       
   304 
       
   305   Example::
       
   306 
       
   307     vmm ut d.user@example.com smtp:pc105.it.example.com
       
   308 
       
   309 .. _userdisable:
       
   310 
       
   311 ``userdisable (u0) address [ service ]``
       
   312   If a user shouldn't have access to one or all services you can restrict
       
   313   the access with this subcommand.
       
   314 
       
   315   If neither a *service* nor the keyword **all** is given all services
       
   316   (**smtp**, **pop3**, **imap**, and **sieve**) will be disabled for the
       
   317   account with the specified *address*. Otherwise only the specified
       
   318   *service* will be restricted.
       
   319 
       
   320   Examples::
       
   321 
       
   322     vmm u0 b.user@example.com imap
       
   323     vmm userdisable c.user@example.com
       
   324 
       
   325 .. _userenable:
       
   326 
       
   327 ``userenable (u1) address [ service ]``
       
   328   To allow access to one or all restricted services use this subcommand.
       
   329 
       
   330   If neither a *service* nor the keyword **all** is given all services
       
   331   (**smtp**, **pop3**, **imap**, and **sieve**) will be enabled for the
       
   332   account with the specified *address*. Otherwise only the specified
       
   333   *service* will be enabled.
       
   334 
       
   335 .. _userdelete:
       
   336 
       
   337 ``userdelete (ud) address [ delalias ]``
       
   338   Use this subcommand to delete the account with the given *address*.
       
   339 
       
   340   If there are one or more aliases with an identical destination *address*,
       
   341   **vmm** will abort the requested operation and show an error message. To
       
   342   prevent this, specify the optional keyword **delalias**.
       
   343 
       
   344 
       
   345 ALIAS SUBCOMMANDS
       
   346 -----------------
       
   347 .. _aliasadd:
       
   348 
       
   349 ``aliasadd (aa) alias target``
       
   350   This subcommand is used to create a new alias.
       
   351 
       
   352   Examples::
       
   353 
       
   354     vmm aliasadd john.doe@example.com d.user@example.com
       
   355     vmm aa support@example.com d.user@example.com
       
   356     vmm aa support@example.com e.user@example.com
       
   357 
       
   358 .. _aliasinfo:
       
   359 
       
   360 ``aliasinfo (ai) alias``
       
   361   Information about an alias can be displayed with this subcommand.
       
   362 
       
   363   Example::
       
   364 
       
   365     vmm aliasinfo support@example.com
       
   366     Alias information
       
   367     -----------------
       
   368             Mail for support@example.com will be redirected to:
       
   369                  * d.user@example.com
       
   370                  * e.user@example.com
       
   371 
       
   372 .. _aliasdelete:
       
   373 
       
   374 ``aliasdelete (ad) alias [ target ]``
       
   375   Use this subcommand to delete the *alias*.
       
   376 
       
   377   If the optional destination address *target* is given, only this
       
   378   destination will be removed from the *alias*.
       
   379 
       
   380   Example::
       
   381 
       
   382     vmm ad support@example.com d.user@example.com
       
   383 
       
   384 
       
   385 RELOCATED SUBCOMMANDS
       
   386 ---------------------
       
   387 .. _relocatedadd:
       
   388 
       
   389 ``relocatedadd (ra) old_address new_address``
       
   390   A new relocated user can be created with this subcommand.
       
   391 
       
   392   *old_address* is the users ex-email address, for example
       
   393   b.user@example.com, and *new_address* points to the new email address
       
   394   where the user can be reached.
       
   395 
       
   396   Example::
       
   397 
       
   398     vmm relocatedadd b.user@example.com b-user@company.tld
       
   399 
       
   400 .. _relocatedinfo:
       
   401 
       
   402 ``relocatedinfo (ri) old_address``
       
   403   This subcommand shows the new address of the relocated user with the
       
   404   *old_address*.
       
   405 
       
   406   Example::
       
   407 
       
   408     vmm relocatedinfo b.user@example.com
       
   409     Relocated information
       
   410     ---------------------
       
   411             User “b.user@example.com” has moved to “b-user@company.tld”
       
   412 
       
   413 .. _relocateddelete:
       
   414 
       
   415 ``relocateddelete (rd) old_address``
       
   416   Use this subcommand in order to delete the relocated user with the
       
   417   *old_address*.
       
   418 
       
   419   Example::
       
   420 
       
   421     vmm relocateddelete b.user@example.com
       
   422 
       
   423 
       
   424 FILES
       
   425 =====
       
   426 */root/vmm.cfg*
       
   427   | will be used when found.
       
   428 */usr/local/etc/vmm.cfg*
       
   429   | will be used when the above file doesn't exist.
       
   430 */etc/vmm.cfg*
       
   431   | will be used when none of the both above mentioned files exists.
       
   432 
       
   433 
       
   434 SEE ALSO
       
   435 ========
       
   436 |vmm.cfg(5)|_
       
   437 
       
   438 
       
   439 COPYING
       
   440 =======
       
   441 vmm and its manual pages were written by Pascal Volk and are licensed under
       
   442 the terms of the BSD License.
       
   443 
       
   444 .. include:: ../substitute_links.rst
       
   445 .. include:: ../substitute_links_1.rst