Using vmm
Contents
vmm is the easy to use command-line tool of the Virtual Mail Manager. It allows you to simply and quickly administer your mail server. The general command syntax looks like:
vmm subcommand object [ argument ]
Each subcommand has both a long and a short form. Both forms are case sensitive. The subcommands are categorized by their functionality:
- general subcommands, see below
An object, depending on the context, is one of:
- domain name
- e-mail address
But there are no rules without exceptions. The general subcommands does not require an object.
Configuring vmm
Syntax:
vmm configure [section]
vmm cf [section]
The subcommand configure starts the interactive configuration for all configuration sections. If the optional argument section is given, only the configuration options from the given section will be displayed and will be configurable. All configuration options are described in VmmConfig.
The following sections are available:
- database
- maildir
- services
- domdir
- bin
- misc
The following example shows the reconfiguration of the database section:
hostname ~ # vmm configure database Using configuration file: /usr/local/etc/vmm.cfg * Config section: “database” Enter new value for option host [10.11.12.246]: 10.11.12.13 Enter new value for option pass [2w41r65qba15rf4ucr]: Enter new value for option user [dbu0815]: usr_4711 Enter new value for option name [mailsys]: hostname ~ #
Find e-mail address by UID
Syntax:
vmm getuser userid
vmm gu userid
If only the userid is available, for example from process list, the subcommand getuser will show the user's address.
Example:
hostname ~ # vmm getuser 79801
Account information
-------------------
UID............: 79801
GID............: 70312
Address........: john.doe@example.com
hostname ~ #
List/search domains
Syntax:
vmm listdomains [pattern]
vmm ld [pattern]
This subcommand lists all available domains. All domain names will be prefixed either with '[+]', if the domain is a primary domain, or with '[-]', if it is an alias domain name. The output can be limited with an optional pattern.
To perform a wild card search, the % character can be used at the start and/or the end of the pattern.
Example listing all domains which starts with 'example.':
hostname ~ # vmm listdomains example.%
Matching domains
----------------
[+] example.com
[-] example.net
[+] example.org
hostname ~ #
Subcommand overview
Syntax:
vmm help
vmm h
Use this subcommand to display all subcommands.
Versions information
Syntax:
vmm version
vmm v
Prints the version information from vmm.
Example:
hostname ~ # vmm version vmm, version 0.5.2 (from 09/09/2009) Python 2.5.4 on Linux vmm is free software and comes with ABSOLUTELY NO WARRANTY. hostname ~ #
