Scroll to navigation

VMM(1) vmm VMM(1)

NAME

vmm - command line tool to manage email domains/accounts/aliases

SYNOPSIS

vmm-h|-v|--help|--version
vmm subcommand -h|--help
vmm subcommandarguments [options]

DESCRIPTION

vmm(a virtual mail manager) is the easy to use command line tool foradministrators and postmasters to manage (alias) domains, accounts, aliasesand relocated users.It allows you to simply and quickly administer your mail server.
It's designed for Dovecot and Postfix with a PostgreSQL backend.

Eachsubcommandhas both a long and a short form.The short form is shown enclosed in parentheses.Both forms are case sensitive.

Most of thesubcommandstake one or morearguments.

OPTIONS

The following options are recognized byvmm.

show a list of available subcommands and exit.
showvmm'sversion and copyright information and exit.

ARGUMENTS

The complete e-mail address(local-part@fqdn)of an user account, alias address or relocated user.
Is either an e-mailaddresswhen used withALIAS SUBCOMMANDS.Or afqdnwhen used withALIASDOMAIN SUBCOMMANDS.
The fully qualified domain name - without the trailing dot - of a domainor alias domain.
An integer value which specifies a quota limit in number of messages.0(zero) means unlimited - no quota limit for the number of messages.
is the name of a configuration option, prefixed with the section name and adot.For example:misc.transport
All configuration options are described invmm.cfg(5).
The name of a service, commonly used with Dovecot.Supported services are:imap, pop3, sieve and smtp.
Specifies a quota limit in bytes.One of the following prefixes can be appended to the integer value:b (bytes), k (kilobytes), M (megabytes) or G(gigabytes).0(zero) means unlimited - no quota limit in bytes.
A transport for Postfix, written as:transport:ortransport:nexthop.Seetransport(5)for more details.

GENERALSUBCOMMANDS

configget(cg)

vmm configget option

This subcommand is used to display the actual value of the givenconfigurationoption.

Example:

vmm configget misc.crypt_sha512_rounds
misc.crypt_sha512_rounds = 5000

configset(cs)

vmm configsetoption value

Use this subcommand to set or update a single configuration option's value.optionis the configuration option,valueis theoption'snew value.

This subcommand will create a newvmm.cfgwithout any comments.Your current configuration file will be backed asvmm.cfg.bak.

Example:

vmm configget domain.transport
domain.transport = dovecot:
vmm configset domain.transport lmtp:unix:private/dovecot-lmtp
vmm cg domain.transport
domain.transport = lmtp:unix:private/dovecot-lmtp

configure(cf)

vmm configure[-ssection]

Starts the interactive configuration for all configuration sections.

In this process the currently set value of each option will be displayed insquare brackets.If no value is configured, the default value of each option will bedisplayed in square brackets.Press the return key, to accept the displayed value.

If the optional argumentsectionis given, only the configuration options from the given section will bedisplayed and will be configurable.The following sections are available:

Account settings
Paths to external binaries
Database settings
Domain settings
Mailbox settings
Miscellaneous settings

All configuration options are described invmm.cfg(5).

This subcommand will create a newvmm.cfgwithout any comments.Your current configuration file will be backed asvmm.cfg.bak.

Example:

vmm configure -s mailbox
Using configuration file: /usr/local/etc/vmm.cfg
* Configuration section: `mailbox'
Enter new value for option folders [Drafts:Sent:Templates:Trash]:
Enter new value for option format [maildir]: mdbox
Enter new value for option subscribe [True]:
Enter new value for option root [Maildir]: mdbox

getuser(gu)

vmm getuser uid

If only theuidis available, for example from process list, the subcommandgetuserwill show the user's address.

Example:

vmm getuser 79876
Account information
-------------------

UID............: 79876
GID............: 70704
Address........: a.user@example.com

listdomains(ld)

vmm listdomains[-ppattern]

This subcommand lists all available domains.All domain names will be prefixed either with `[+]', if the domain is aprimary domain, or with `[-]', if it is an alias domain name.The output can be limited with an optionalpattern.

To perform a wild card search, the % character can be used at the startand/or the end of thepattern.

Example:

vmm listdomains -p %example%
Matching domains
----------------

[+] example.com
[-] e.g.example.com
[-] example.name
[+] example.net
[+] example.org

listaddresses(ll)

vmm listaddresses[-ppattern]

This command lists all defined addresses. Addresses belonging toalias-domains are prefixed with a '-', addresses of regular domains witha '+'. Additionally, the letters 'u', 'a', and 'r' indicate the type ofeach address: user, alias and relocated respectively.The output can be limited with an optionalpattern.

To perform a wild card search, the % character can be used at the startand/or the end of thepattern.

If you do not include an '@'-character in your pattern, the command willonly match your pattern agains thefqdnof the addresses.A pattern like %user%@%example% will match against any address thatcontains the term 'user' in itslocal-partAND 'example' in itsfqdn.

Example:

vmm listaddresses -p example.com
vmm listaddresses -p %master@%

listaliases(la)

vmm listaliases[-ppattern]

This command lists all defined aliases. Aliases belonging toalias-domains are prefixed with a '-', addresses of regular domains witha '+'.The output can be limited with an optionalpattern.

To perform a wild card search, the % character can be used at the startand/or the end of thepattern.

If you do not include an '@'-character in your pattern, the command willonly match your pattern agains thefqdnof the addresses.A pattern like %user%@%example% will match against any address thatcontains the term 'user' in itslocal-partAND 'example' in itsfqdn.

Example:

vmm listaliases -p example.com
vmm listaliases -p %master@%

listrelocated(lr)

vmm listrelocated[-ppattern]

This command lists all defined relocated addresses. Relocated entriesbelonging to alias-domains are prefixed with a '-', addresses of regulardomains witha '+'.The output can be limited with an optionalpattern.

To perform a wild card search, the % character can be used at the startand/or the end of thepattern.

If you do not include an '@'-character in your pattern, the command willonly match your pattern agains thefqdnof the addresses.A pattern like %user%@%example% will match against any address thatcontains the term 'user' in itslocal-partAND 'example' in itsfqdn.

Example:

vmm listrelocated -p example.com
vmm listrelocated -p %master@%

listusers(lu)

vmm listusers[-ppattern]

This command lists all user accounts. User accounts belonging toalias-domains are prefixed with a '-', addresses of regulardomains witha '+'.The output can be limited with an optionalpattern.

To perform a wild card search, the % character can be used at the startand/or the end of thepattern.

If you do not include an '@'-character in your pattern, the command willonly match your pattern agains thefqdnof the addresses.A pattern like %user%@%example% will match against any address thatcontains the term 'user' in itslocal-partAND 'example' in itsfqdn.

Example:

vmm listusers -p example.com
vmm listusers -p %master@%

listpwschemes(lp)

vmm listpwschemes

This subcommand lists all password schemes which could be used in thevmm.cfgas value of themisc.password_schemeoption.The output varies, depending on the used Dovecot version and the system'slibc.
Additionally a few usable encoding suffixes will be displayed.One of them can be appended to the password scheme.

Example:

vmm listpwschemes
Usable password schemes
-----------------------

CLEARTEXT CRAM-MD5 CRYPT DIGEST-MD5 HMAC-MD5 LANMAN LDAP-MD5 MD5
MD5-CRYPT NTLM OTP PLAIN PLAIN-MD4 PLAIN-MD5 RPA SHA SHA1 SHA256
SHA256-CRYPT SHA512 SHA512-CRYPT SKEY SMD5 SSHA SSHA256 SSHA512 Usable encoding suffixes ------------------------
.B64 .BASE64 .HEX

DOMAINSUBCOMMANDS

domainadd(da)

vmm domainaddfqdn[-nnote][-ttransport]

the note that should be set.
a Postfix transport (transport: or transport:nexthop).

Adds the new domain into the database and creates the domain directory.

If the optional argumenttransportis given, it will override the default transport(domain.transport) from vmm.cfg.The specifiedtransportwill be the default transport for all new accounts in this domain.

Configuration-related behavior:

When that option is set totrue (default) vmmwill automatically create the postmaster account for the new domain andprompt forpostmaster@fqdn's password.
When the value of that option is also set totrue, vmmwill automatically create the postmaster account for the new domain andprint the generated postmaster password to stdout.

Examples:

vmm domainadd support.example.com -t smtp:[mx1.example.com]:2025
Creating account for postmaster@support.example.com
Enter new password:
Retype new password:
vmm cs account.random_password true
vmm domainadd sales.example.com
Creating account for postmaster@sales.example.com
Generated password: pLJUQ6Xg_z

domaindelete(dd)

vmm domaindelete fqdn[--delete-directory][--force]

When this option is given,vmmwill delete the directory of the given domain.This overrides thedomain.delete_directorysetting ofvmm.cfg.
Use this option in oder to force the deletion of the domain, even if thereare accounts, aliases, catch-all accounts and/or relocated users.

This subcommand deletes the domain specified byfqdn.

If there are accounts, aliases and/or relocated users assigned to the givendomain,vmmwill abort the requested operation and show an error message.If you know, what you are doing, you can specify the optional argument--force.

If you really always know what you are doing, edit yourvmm.cfgand set the optiondomain.force_deletiontotrue.

domaininfo(di)

vmm domaininfofqdn[-ddetails]

This subcommand shows some information about the given domain.

For a more detailed information about the domain the optional argumentdetailscan be specified.A possibledetailsvalue can be one of the following six keywords:

to list the e-mail addresses of all existing user accounts
to list all assigned alias domain names
to list all available alias e-mail addresses
to list all catch-all destinations
to list the e-mail addresses of all relocated users
to list all information mentioned above

Example:

vmm domaininfo sales.example.com
Domain information
------------------

Domain Name......: sales.example.com
GID..............: 70708
Domain Directory.: /srv/mail/c/70708
Quota Limit/User.: Storage: 500.00 MiB; Messages: 10,000
Active Services..: IMAP SIEVE
Transport........: lmtp:unix:private/dovecot-lmtp
Alias Domains....: 0
Accounts.........: 1
Aliases..........: 0
Relocated........: 0
Catch-All Dests..: 1

domainquota(dq)

vmm domainquotafqdn storage[-mmessages][--force]

This subcommand is used to configure a new quota limit for the accounts ofthe domain - not for the domain itself.

The default quota limit for accounts is defined in thevmm.cfg (domain.quota_bytes and domain.quota_messages).

The new quota limit will affect only those accounts for which the limithas not been overridden. If you want to restore the default to all accounts,you may pass the optional argument--force.
When the argumentmessageswas omitted the default number of messages0(zero) will be applied.

Example:

vmm domainquota example.com 1g --force

domainservices(ds)

vmm domainservicesfqdn(-eservice ...|-dservice ...)[--force]

To define which services could be used by the users of the domain — withthe givenfqdn— use this subcommand.

If you pass them after -e, each suppliedservicewill be enabled/usable. If you pass them after -d,they will become deactivated/unusable.Possible service names are:imap, pop3, sieve and smtp.
The new service set will affect only those accounts for which the set has notbeen overridden. If you want to restore the default to all accounts, you maypass the option--force.

domaintransport(dt)

vmm domaintransport fqdn transport[--force]

A new transport for the indicated domain can be set with this subcommand.

The new transport will affect only those accounts for which the transport hasnot been overridden. If you want to restore the default to all accounts, youmay give the option--force.

Example:

vmm domaintransport support.example.com dovecot:

domainnote(do)

vmm domainnote fqdn-d|-nnote

delete the domain's note.
the note that should be set.

With this subcommand, it is possible to attach a note to the specifieddomain.In order to delete an existing note, pass the-d option.

Example:

vmm do example.com -n `Belongs to Robert'

ALIASDOMAINSUBCOMMANDS

An alias domain is an alias for a domain that was previously added with thesubcommanddomainadd.All accounts, aliases and relocated users from the domain will be alsoavailable in the alias domain.
In the following is to be assumed that example.net is an alias forexample.com.

Postfix will not accept erroneously e-mails for unknown.user@example.netand bounce them back later to the mostly faked sender.Postfix will immediately reject all e-mails addressed to nonexistentusers.
This behavior is ensured as long as you use the recommended databasequeries in your$config_directory/pgsql-*.cfconfiguration files.

aliasdomainadd(ada)

vmm aliasdomainadd fqdn destination

This subcommand adds the new alias domain(fqdn)to thedestinationdomain that should be aliased.

Example:

vmm aliasdomainadd example.net example.com

aliasdomaindelete(add)

vmm aliasdomaindelete fqdn

Use this subcommand if the alias domainfqdnshould be removed.

Example:

vmm aliasdomaindelete e.g.example.com

aliasdomaininfo(adi)

vmm aliasdomaininfo fqdn

This subcommand shows to which domain the alias domainfqdnis assigned to.

Example:

vmm adi example.net
Alias domain information
------------------------

The alias domain example.net belongs to:
* example.com

aliasdomainswitch(ads)

vmm aliasdomainswitch fqdn destination

If the destination of the existing alias domainfqdnshould be switched to anotherdestinationuse this subcommand.

Example:
vmm aliasdomainswitch example.name example.org

ACCOUNTSUBCOMMANDS

useradd(ua)

vmm useraddaddress[-nnote][-ppassword]

the note that should be set.
the new user's password.

Use this subcommand to create a new e-mail account for the givenaddress.

If thepasswordis not provided,vmmwill prompt for it interactively.When nopasswordis provided andaccount.random_passwordis set totrue, vmmwill generate a random password and print it to stdout after the accounthas been created.

Examples:

vmm ua d.user@example.com -p "A 5ecR3t P4s5\/\/0rd"
vmm useradd e.user@example.com
Enter new password:
Retype new password:

userdelete(ud)

vmm userdelete address[--delete-directory][--force]

When this option is present,vmmwill also delete the account's home directory.This overrides theaccount.delete_directorysetting ofvmm.cfg.
When this option is given,vmmwill delete the account, even if there are aliases with the account'saddress as their destination.Those aliases will be deleted too.

Use this subcommand to delete the account with the givenaddress.

If there are one or more aliases with an identical destination address,vmmwill abort the requested operation and show an error message.To prevent this, give the optional argument--force.

userinfo(ui)

vmm userinfoaddress[-ddetails]

This subcommand displays some information about the account specified byaddress.

If the optional argumentdetailsis given some more information will be displayed.Possible values fordetailsare:

to list all alias addresses with the destinationaddress
to display the disk usage of the user's mail directory.In order to summarize the disk usage each time this subcommand isexecuted automatically, setaccount.disk_usagein yourvmm.cfgtotrue.
to list all information mentioned above

Example:

vmm ui d.user@example.com
Account information
-------------------

Address..........: d.user@example.com
Name.............: None
UID..............: 79881
GID..............: 70704
Home.............: /srv/mail/2/70704/79881
Mail_Location....: mdbox:~/mdbox
Quota Storage....: [ 0.00%] 0/500.00 MiB
Quota Messages...: [ 0.00%] 0/10,000
Transport........: lmtp:unix:private/dovecot-lmtp
SMTP.............: disabled
POP3.............: disabled
IMAP.............: enabled
SIEVE............: enabled

username(un)

vmm username address-d|-nname

delete the user's name.
a user's real name.

The user's realnamecan be set/updated with this subcommand.

In order to delete the value stored for the account, pass the-d option.

Example:

vmm un d.user@example.com -n "John Doe"

userpassword(up)

vmm userpassword address([-ppassword][-sscheme] |--hashpwhash])

The user's new password.
When aschemewas specified, it overrides themisc.password_schemesetting, configured in thevmm.cfgfile.
A hashed password, prefixed with{SCHEME};as generated bydoveadm pw.You should enclose the hashed password in single quotes, if it containsone ore more dollar signs($).

The password of an account can be updated with this subcommand.

If nopassword or pwhashwas provided,vmmwill prompt for a password interactively.

When passing a hashed password,vmmchecks only if the includedSCHEMEis supported by your Dovecot installation. No further checks are done.

Example:

vmm up d.user@example.com -p "A |\/|0r3 5ecur3 P4s5\/\/0rd?"

usernote(uo)

vmm usernote address-d|-nnote

delete the user's note.
the note that should be set.

With this subcommand, it is possible to attach a note to the specifiedaccount.In order to delete an existing note, pass the-d option.

Example:

vmm uo d.user@example.com -n `Only needed until end of May 2013'

userquota(uq)

vmm userquota address storage[-mmessages]

This subcommand is used to set a new quota limit for the given account.

When the argumentmessageswas omitted the default number of messages0(zero) will be applied.

Instead ofstoragelimit pass the keyworddomainto remove the account-specific override, causing the domain's value to bein effect.

Example:

vmm userquota d.user@example.com 750m

userservices(us)

vmm userservicesaddress(-eservice ...|-dservice ...|-r)

To grant a user access to the specified services, use this command.

If you pass services after -e, each service will be enabled/usable. If you passthem after -d they will be disabled/unusable. in order to restore the domaindefaults on theaddress,pass -r without any more parameters.

Example:

vmm userservices d.user@example.com -d smtp imap

usertransport(ut)

vmm usertransport address transport

A differenttransportfor an account can be specified with this subcommand.

Instead oftransportpass 'domain' to remove the account-specific override, causing thedomain's value to be in effect.

Example:
Assumed you want to use Dovecot'sdsync(1)to convert a user's mailbox from Maildir format to mdbox format, youcan tell Postfix to retry later.

vmm ut d.user@example.com "retry:4.0.0 Mailbox being migrated"
# convert the mailbox ... then set the transport to Dovecot's lmtp
vmm ut d.user@example.com lmtp:unix:private/dovecot-lmtp

ALIASSUBCOMMANDS

aliasadd(aa)

vmm aliasadd address destination ...

This subcommand is used to create a new aliasaddresswith one or moredestinationaddresses.

Within the destination address, the placeholders%n,%d,and%=will be replaced by the local part, the domain, or the email address with '@'replaced by '=' respectively. In combination with alias domains, this enablesdomain-specific destinations.

Examples:

vmm aliasadd john.doe@example.com d.user@example.com
vmm aa support@example.com d.user@example.com e.user@example.com
vmm aa postmaster@example.com postmaster+%d@example.org

aliasdelete(ad)

vmm aliasdelete address[destination ...]

This subcommand is used to delete one or multipledestinationsfrom the alias with the givenaddress.

When nodestinationaddress was specified the alias with all its destinations will be deleted.

Example:

vmm ad support@example.com d.user@example.com

aliasinfo(ai)

vmm aliasinfo address

Information about the alias with the givenaddresscan be displayed with this subcommand.

Example:

vmm aliasinfo support@example.com
Alias information
-----------------

Mail for support@example.com will be redirected to:
* e.user@example.com

RELOCATEDSUBCOMMANDS

relocatedadd(ra)

vmm relocatedadd address newaddress

A new relocated user can be created with this subcommand.

addressis the user's ex-email address, for example b.user@example.com, andnewaddresspoints to the new email address where the user can be reached.

Example:

vmm relocatedadd b.user@example.com b-user@company.tld

relocatedinfo(ri)

vmm relocatedinfo address

This subcommand shows the new address of the relocated user with the givenaddress.

Example:

vmm relocatedinfo b.user@example.com
Relocated information
---------------------

User `b.user@example.com' has moved to `b-user@company.tld'

relocateddelete(rd)

vmm relocateddelete address

Use this subcommand in order to delete the relocated user with the givenaddress.

Example:

vmm relocateddelete b.user@example.com

CATCH-ALLSUBCOMMANDS

catchalladd(caa)

vmm catchalladd fqdn destination ...

This subcommand allows to specify destination addresses for a domain, whichshall receive mail addressed to unknown local parts within that domain.Those catch-all aliases hence "catch all" mail to any address in thedomain (unless a more specific alias, mailbox or relocated entry exists).

WARNING: Catch-all addresses can cause mail server flooding becausespammers like to deliver mail to all possible combinations of names, e.g.to all addresses between abba@example.org and zztop@example.org.

Example:

vmm catchalladd example.com user@example.org

catchallinfo(cai)

vmm catchallinfo fqdn

This subcommand displays information about catch-all aliases defined fora domain.

Example:

vmm catchallinfo example.com
Catch-all information
---------------------

Mail to unknown local-parts in domain example.com will be sent to:
* user@example.org

catchalldelete(cad)

vmm catchalldelete fqdn[destination ...]

With this subcommand, catch-all aliases defined for a domain can beremoved, either all of them, or thosedestinationswhich were specified explicitly.

Example:

vmm catchalldelete example.com user@example.com

FILES

/root/vmm.cfg
will be used when found.
/usr/local/etc/vmm.cfg
will be used when the above file doesn't exist.
/etc/vmm.cfg
will be used when none of the both above mentioned files exists.

SEEALSO

doveadm-pw(1),dsync(1),transport(5),vmm.cfg(5)

INTERNETRESOURCES

http://vmm.localdomain.org/
http://sf.net/projects/vmm/
https://bitbucket.org/pvo/vmm/issues

COPYING

vmm and its manual pages were written by Pascal Volk <user+vmm ATlocalhost.localdomain.org> and are licensed under the terms of the BSDLicense.

2014-06-09 vmm 0.7