VMM/handler: Avoid unnecessary method calls.
.TH "VMM" "1" "2014-06-09" "vmm 0.7" "vmm"
.SH NAME
vmm \- command line tool to manage email domains/accounts/aliases
.\" -----------------------------------------------------------------------
.SH SYNOPSIS
.B vmm
.BR \-h | \-v | \-\-help | \-\-version
.\" --------------------------
.br
.BI vmm " subcommand " \-h \c
.RB | \-\-help
.\" --------------------------
.br
.BI vmm " subcommand"
.IR arguments " [" options ]
.\" -----------------------------------------------------------------------
.SH DESCRIPTION
.B vmm
(a virtual mail manager) is the easy to use command line tool for
administrators and postmasters to manage (alias) domains, accounts, aliases
and relocated users.
It allows you to simply and quickly administer your mail server.
.br
It's designed for Dovecot and Postfix with a PostgreSQL backend.
.PP
Each
.I subcommand
has both a long and a short form.
The short form is shown enclosed in parentheses.
Both forms are case sensitive.
.PP
Most of the
.IR subcommand s
take one or more
.IR argument s.
.\" -----------------------------------------------------------------------
.SH OPTIONS
The following options are recognized by
.BR vmm .
.TP
.BR \-h ", " \-\-help
show a list of available subcommands and exit.
.\" --------------------------
.TP
.BR \-v ", " \-\-version
show
.BR vmm \(aqs
version and copyright information and exit.
.\" -----------------------------------------------------------------------
.SH ARGUMENTS
.TP 12
.I address
The complete e\-mail address
.RI ( local\-part @ fqdn )
of an user account, alias address or relocated user.
.\" --------------------------
.TP
.I destination
Is either an e\-mail
.I address
when used with
.IR "ALIAS SUBCOMMANDS" .
Or a
.I fqdn
when used with
.IR "ALIASDOMAIN SUBCOMMANDS" .
.\" --------------------------
.TP
.I fqdn
The fully qualified domain name \- without the trailing dot \- of a domain
or alias domain.
.\" --------------------------
.TP
.I messages
An integer value which specifies a quota limit in number of messages.
.B 0
(zero) means unlimited \- no quota limit for the number of messages.
.\" --------------------------
.TP
.I option
is the name of a configuration option, prefixed with the section name and a
dot.
For example:
.IB misc . transport
.br
All configuration options are described in
.BR vmm.cfg (5).
.\" --------------------------
.TP
.I service
The name of a service, commonly used with Dovecot.
Supported services are:
.BR imap ", " pop3 ", " sieve " and " smtp .
.\" --------------------------
.TP
.I storage
Specifies a quota limit in bytes.
One of the following prefixes can be appended to the integer value:
.BR b " (bytes), " k " (kilobytes), " M " (megabytes) or " G
(gigabytes).
.B 0
(zero) means unlimited \- no quota limit in bytes.
.\" --------------------------
.TP
.I transport
A transport for Postfix, written as:
.IB transport :
or
.IB transport :\c
.IR nexthop .
See
.BR transport (5)
for more details.
.\" -----------------------------------------------------------------------
.SH GENERAL SUBCOMMANDS
.SS configget (cg)
.BI "vmm configget" " option"
.PP
This subcommand is used to display the actual value of the given
configuration
.IR option .
.PP
Example:
.PP
.nf
.B vmm configget misc.crypt_sha512_rounds
misc.crypt_sha512_rounds = 5000
.fi
.\" ------------------------------------
.SS configset (cs)
.B vmm configset
.I option value
.PP
Use this subcommand to set or update a single configuration option's value.
.I option
is the configuration option,
.I value
is the
.IR option 's
new value.
.IP Note:
This subcommand will create a new
.I vmm.cfg
without any comments.
Your current configuration file will be backed as
.IR vmm.cfg.bak .
.PP
Example:
.PP
.nf
.B vmm configget domain.transport
domain.transport = dovecot:
.B vmm configset domain.transport lmtp:unix:private/dovecot\-lmtp
.B vmm cg domain.transport
domain.transport = lmtp:unix:private/dovecot\-lmtp
.fi
.\" ------------------------------------
.SS configure (cf)
.B vmm configure
.RB [ \-s
.IR section ]
.PP
Starts the interactive configuration for all configuration sections.
.PP
In this process the currently set value of each option will be displayed in
square brackets.
If no value is configured, the default value of each option will be
displayed in square brackets.
Press the return key, to accept the displayed value.
.PP
If the optional argument
.I section
is given, only the configuration options from the given section will be
displayed and will be configurable.
The following sections are available:
.RS
.TP 10
.B account
Account settings
.TP
.B bin
Paths to external binaries
.TP
.B database
Database settings
.TP
.B domain
Domain settings
.TP
.B mailbox
Mailbox settings
.TP
.B misc
Miscellaneous settings
.RE
.PP
All configuration options are described in
.BR vmm.cfg (5).
.IP Note:
This subcommand will create a new
.I vmm.cfg
without any comments.
Your current configuration file will be backed as
.IR vmm.cfg.bak .
.PP
Example:
.PP
.nf
.B 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
.fi
.\" ------------------------------------
.SS getuser (gu)
.BI "vmm getuser" " uid"
.PP
If only the
.I uid
is available, for example from process list, the subcommand
.B getuser
will show the user's address.
.PP
Example:
.PP
.nf
.B vmm getuser 79876
Account information
-------------------
UID............: 79876
GID............: 70704
Address........: a.user@example.com
.fi
.\" ------------------------------------
.SS listdomains (ld)
.B vmm listdomains
.RB [ \-p
.IR pattern ]
.PP
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
.IR pattern .
.PP
To perform a wild card search, the % character can be used at the start
and/or the end of the
.IR pattern .
.PP
Example:
.PP
.nf
.B vmm listdomains \-p %example%
Matching domains
----------------
[+] example.com
[\-] e.g.example.com
[\-] example.name
[+] example.net
[+] example.org
.fi
.\" ------------------------------------
.SS listaddresses (ll)
.B vmm listaddresses
.RB [ \-p
.IR pattern ]
.PP
This command lists all defined addresses. Addresses belonging to
alias-domains are prefixed with a '-', addresses of regular domains with
a '+'. Additionally, the letters 'u', 'a', and 'r' indicate the type of
each address: user, alias and relocated respectively.
The output can be limited with an optional
.IR pattern .
.PP
To perform a wild card search, the % character can be used at the start
and/or the end of the
.IR pattern .
.PP
Example:
.PP
.nf
.B vmm listaddresses \-p example.com
.B vmm listaddresses \-p %master@%
.\" ------------------------------------
.SS listaliases (la)
.B vmm listaliases
.RB [ \-p
.IR pattern ]
.PP
This command lists all defined aliases. Aliases belonging to
alias-domains are prefixed with a '-', addresses of regular domains with
a '+'.
The output can be limited with an optional
.IR pattern .
.PP
To perform a wild card search, the % character can be used at the start
and/or the end of the
.IR pattern .
.PP
Example:
.PP
.nf
.B vmm listaliases \-p example.com
.B vmm listaliases \-p %master@%
.\" ------------------------------------
.SS listrelocated (lr)
.B vmm listrelocated
.RB [ \-p
.IR pattern ]
.PP
This command lists all defined relocated addresses. Relocated entries
belonging to alias-domains are prefixed with a '-', addresses of regular
domains with
a '+'.
The output can be limited with an optional
.IR pattern .
.PP
To perform a wild card search, the % character can be used at the start
and/or the end of the
.IR pattern .
.PP
Example:
.PP
.nf
.B vmm listrelocated \-p example.com
.B vmm listrelocated \-p %master@%
.\" ------------------------------------
.SS listusers (lu)
.B vmm listusers
.RB [ \-p
.IR pattern ]
.PP
This command lists all user accounts. User accounts belonging to
alias-domains are prefixed with a '-', addresses of regular
domains with
a '+'.
The output can be limited with an optional
.IR pattern .
.PP
To perform a wild card search, the % character can be used at the start
and/or the end of the
.IR pattern .
.PP
Example:
.PP
.nf
.B vmm listusers \-p example.com
.B vmm listusers \-p %master@%
.\" ------------------------------------
.SS listpwschemes (lp)
.B vmm listpwschemes
.PP
This subcommand lists all password schemes which could be used in the
.I vmm.cfg
as value of the
.I misc.password_scheme
option.
The output varies, depending on the used Dovecot version and the system's
libc.
.br
Additionally a few usable encoding suffixes will be displayed.
One of them can be appended to the password scheme.
.PP
Example:
.PP
.nf
.B 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
.fi
.\" -----------------------------------------------------------------------
.SH DOMAIN SUBCOMMANDS
.SS domainadd (da)
.B vmm domainadd
.I fqdn
.RB [ \-n
.IR note ]
.RB [ \-t
.IR transport ]
.PP
.\" ------------------------------------
.TP
.BI "\-n " note
the note that should be set.
.\" ------------------------------------
.TP
.BI "\-t " transport
a Postfix transport (transport: or transport:nexthop).
.\" ------------------------------------
.PP
Adds the new domain into the database and creates the domain directory.
.PP
If the optional argument
.I transport
is given, it will override the default transport
.RI ( domain.transport ") from " vmm.cfg .
The specified
.I transport
will be the default transport for all new accounts in this domain.
.PP
Configuration\-related behavior:
.RS
.TP
.I domain.auto_postmaster
When that option is set to
.BR true " (default) " vmm
will automatically create the postmaster account for the new domain and
prompt for
.BI postmaster@ fqdn\c
\(aqs password.
.TP
.I account.random_password
When the value of that option is also set to
.BR true ", " vmm
will automatically create the postmaster account for the new domain and
print the generated postmaster password to stdout.
.RE
.PP
Examples:
.PP
.nf
.B vmm domainadd support.example.com \-t smtp:[mx1.example.com]:2025
Creating account for postmaster@support.example.com
Enter new password:
Retype new password:
.B vmm cs account.random_password true
.B vmm domainadd sales.example.com
Creating account for postmaster@sales.example.com
Generated password: pLJUQ6Xg_z
.fi
.\" ------------------------------------
.SS domaindelete (dd)
.BI "vmm domaindelete " fqdn
.RB [ \-\-delete\-directory ]
.RB [ \-\-force ]
.PP
.\" ------------------------------------
.TP
.B \-\-delete\-directory
When this option is given,
.B vmm
will delete the directory of the given domain.
This overrides the
.I domain.delete_directory
setting of
.IR vmm.cfg .
.\" ------------------------------------
.TP
.B \-\-force
Use this option in oder to force the deletion of the domain, even if there
are accounts, aliases, catch-all accounts and/or relocated users.
.\" ------------------------------------
.PP
This subcommand deletes the domain specified by
.IR fqdn .
.PP
If there are accounts, aliases and/or relocated users assigned to the given
domain,
.B vmm
will abort the requested operation and show an error message.
If you know, what you are doing, you can specify the optional argument
.BR \-\-force .
.PP
If you really always know what you are doing, edit your
.I vmm.cfg
and set the option
.I domain.force_deletion
to
.BR true .
.\" ------------------------------------
.SS domaininfo (di)
.B vmm domaininfo
.I fqdn
.RB [ \-d
.IR details ]
.PP
This subcommand shows some information about the given domain.
.PP
For a more detailed information about the domain the optional argument
.I details
can be specified.
A possible
.I details
value can be one of the following six keywords:
.RS
.TP 14
.B accounts
to list the e\-mail addresses of all existing user accounts
.TP
.B aliasdomains
to list all assigned alias domain names
.TP
.B aliases
to list all available alias e\-mail addresses
.TP
.B catchall
to list all catch\-all destinations
.TP
.B relocated
to list the e\-mail addresses of all relocated users
.TP
.B full
to list all information mentioned above
.RE
.PP
Example:
.PP
.nf
.B 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
.fi
.\" ------------------------------------
.SS domainquota (dq)
.B vmm domainquota
.I fqdn storage
.RB [ \-m
.IR messages ]
.RB [ --force ]
.PP
This subcommand is used to configure a new quota limit for the accounts of
the domain - not for the domain itself.
.PP
The default quota limit for accounts is defined in the
.IR vmm.cfg " (" domain.quota_bytes " and " domain.quota_messages ).
.PP
The new quota limit will affect only those accounts for which the limit
has not been overridden. If you want to restore the default to all accounts,
you may pass the optional argument
.BR \-\-force .
.br
When the argument
.I messages
was omitted the default number of messages
.B 0
(zero) will be applied.
.PP
Example:
.PP
.nf
.B vmm domainquota example.com 1g \-\-force
.fi
.\" ------------------------------------
.SS domainservices (ds)
.B vmm domainservices
.I fqdn
.RB [ \-s
.IR "service ..." ]
.RB [ \-\-force ]
.PP
To define which services could be used by the users of the domain \(em with
the given
.I fqdn
\(em use this subcommand.
.PP
Each specified
.I service
will be enabled/usable.
All other services will be deactivated/unusable.
Possible service names are:
.BR imap ", " pop3 ", " sieve " and " smtp .
.br
The new service set will affect only those accounts for which the set has not
been overridden. If you want to restore the default to all accounts, you may
pass the option
.BR \-\-force .
.\" ------------------------------------
.SS domaintransport (dt)
.BI "vmm domaintransport" " fqdn transport"
.RB [ --force ]
.PP
A new transport for the indicated domain can be set with this subcommand.
.PP
The new transport will affect only those accounts for which the transport has
not been overridden. If you want to restore the default to all accounts, you
may give the option
.BR \-\-force .
.PP
Example:
.PP
.nf
.B vmm domaintransport support.example.com dovecot:
.fi
.\" ------------------------------------
.SS domainnote (do)
.BI "vmm domainnote" " fqdn"
.BR \-d | \-n
.I note
.PP
.\" ------------------------------------
.TP
.B \-d
delete the domain\(aqs note.
.\" ------------------------------------
.TP
.BI "\-n " note
the note that should be set.
.\" ------------------------------------
.PP
With this subcommand, it is possible to attach a note to the specified
domain.
In order to delete an existing note, pass the
.BR \-d " option."
.PP
Example:
.PP
.nf
.B vmm do example.com \-n `Belongs to Robert'
.fi
.\" -----------------------------------------------------------------------
.SH ALIAS DOMAIN SUBCOMMANDS
An alias domain is an alias for a domain that was previously added with the
subcommand
.BR domainadd .
All accounts, aliases and relocated users from the domain will be also
available in the alias domain.
.br
In the following is to be assumed that example.net is an alias for
example.com.
.PP
Postfix will not accept erroneously e\-mails for unknown.user@example.net
and bounce them back later to the mostly faked sender.
Postfix will immediately reject all e\-mails addressed to nonexistent
users.
.br
This behavior is ensured as long as you use the recommended database
queries in your
.I $config_directory/pgsql\-*.cf
configuration files.
.\" ------------------------------------
.SS aliasdomainadd (ada)
.BI "vmm aliasdomainadd" " fqdn destination"
.PP
This subcommand adds the new alias domain
.RI ( fqdn )
to the
.I destination
domain that should be aliased.
.PP
Example:
.PP
.nf
.B vmm aliasdomainadd example.net example.com
.fi
.\" ------------------------------------
.SS aliasdomaindelete (add)
.BI "vmm aliasdomaindelete" " fqdn"
.PP
Use this subcommand if the alias domain
.I fqdn
should be removed.
.PP
Example:
.PP
.nf
.B vmm aliasdomaindelete e.g.example.com
.fi
.\" ------------------------------------
.SS aliasdomaininfo (adi)
.BI "vmm aliasdomaininfo" " fqdn"
.PP
This subcommand shows to which domain the alias domain
.I fqdn
is assigned to.
.PP
Example:
.PP
.nf
.B vmm adi example.net
Alias domain information
------------------------
The alias domain example.net belongs to:
* example.com
.fi
.\" ------------------------------------
.SS aliasdomainswitch (ads)
.BI "vmm aliasdomainswitch" " fqdn destination"
.PP
If the destination of the existing alias domain
.I fqdn
should be switched to another
.I destination
use this subcommand.
.nf
.PP
Example:
.PP
.B vmm aliasdomainswitch example.name example.org
.fi
.\" -----------------------------------------------------------------------
.SH ACCOUNT SUBCOMMANDS
.SS useradd (ua)
.B vmm useradd
.I address
.RB [ \-n
.IR note ]
.RB [ \-p
.IR password ]
.PP
.\" ------------------------------------
.TP
.BI "\-n " note
the note that should be set.
.\" ------------------------------------
.TP
.BI "\-p " password
the new user\(aqs password.
.\" ------------------------------------
.PP
Use this subcommand to create a new e\-mail account for the given
.IR address .
.PP
If the
.I password
is not provided,
.B vmm
will prompt for it interactively.
When no
.I password
is provided and
.I account.random_password
is set to
.BR true ", " vmm
will generate a random password and print it to stdout after the account
has been created.
.PP
Examples:
.PP
.nf
.B vmm ua d.user@example.com \-p \(dqA 5ecR3t P4s5\(rs/\(rs/0rd\(dq
.B vmm useradd e.user@example.com
Enter new password:
Retype new password:
.fi
.\" ------------------------------------
.SS userdelete (ud)
.BI "vmm userdelete" " address"
.RB [ \-\-delete\-directory ]
.RB [ \-\-force ]
.PP
.\" ------------------------------------
.TP
.B \-\-delete\-directory
When this option is present,
.B vmm
will also delete the account\(aqs home directory.
This overrides the
.I account.delete_directory
setting of
.IR vmm.cfg .
.\" ------------------------------------
.TP
.B \-\-force
When this option is given,
.B vmm
will delete the account, even if there are aliases with the account\(aqs
address as their destination.
Those aliases will be deleted too.
.\" ------------------------------------
.PP
Use this subcommand to delete the account with the given
.IR address .
.PP
If there are one or more aliases with an identical destination address,
.B vmm
will abort the requested operation and show an error message.
To prevent this, give the optional argument
.BR \-\-force .
.\" ------------------------------------
.SS userinfo (ui)
.B "vmm userinfo"
.I address
.RB [ \-d
.IR details ]
.PP
This subcommand displays some information about the account specified by
.IR address .
.PP
If the optional argument
.I details
is given some more information will be displayed.
Possible values for
.I details
are:
.RS
.TP 8
.B aliases
to list all alias addresses with the destination
.I address
.TP
.B du
to display the disk usage of the user's mail directory.
In order to summarize the disk usage each time this subcommand is
executed automatically, set
.I account.disk_usage
in your
.I vmm.cfg
to
.BR true .
.TP
.B full
to list all information mentioned above
.RE
.PP
Example:
.PP
.nf
.B 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
.fi
.\" ------------------------------------
.SS username (un)
.BI "vmm username" " address"
.BR \-d | \-n
.IR name
.PP
.\" ------------------------------------
.TP
.B \-d
delete the user\(aqs name.
.\" ------------------------------------
.TP
.BI "\-n " name
a user\(aqs real name.
.\" ------------------------------------
.PP
The user's real
.I name
can be set/updated with this subcommand.
.PP
In order to delete the value stored for the account, pass the
.BR \-d " option."
.PP
Example:
.PP
.nf
.B vmm un d.user@example.com \-n \(dqJohn Doe\(dq
.fi
.\" ------------------------------------
.SS userpassword (up)
.BI "vmm userpassword" " address"
.RB ([ \-p
.IR password ]
.RB [ \-s
.IR scheme "] |"
.B \-\-hash
.IR pwhash ])
.PP
.TP
.BI "\-p " password
The user\(aqs new password.
.\" ------------------------------------
.TP
.BI "\-s " scheme
When a
.I scheme
was specified, it overrides the
.I misc.password_scheme
setting, configured in the
.I vmm.cfg
file.
.\" ------------------------------------
.TP
.BI "\-\-hash " pwhash
A hashed password, prefixed with
.BI { SCHEME };
as generated by
.BR "doveadm pw" .
You should enclose the hashed password in single quotes, if it contains
one ore more dollar signs
.RB ( $ ).
.\" ------------------------------------
.PP
The password of an account can be updated with this subcommand.
.PP
If no
.IR password " or " pwhash
was provided,
.B vmm
will prompt for a password interactively.
.IP Note:
When passing a hashed password,
.B vmm
checks only if the included
.I SCHEME
is supported by your Dovecot installation. No further checks are done.
.PP
Example:
.PP
.nf
.B vmm up d.user@example.com \-p \(dqA |\(rs/|0r3 5ecur3 P4s5\(rs/\(rs/0rd?\(dq
.fi
.\" ------------------------------------
.SS usernote (uo)
.BI "vmm usernote" " address"
.BR \-d | \-n
.IR note
.PP
.\" ------------------------------------
.TP
.B \-d
delete the user\(aqs note.
.\" ------------------------------------
.TP
.BI "\-n " note
the note that should be set.
.\" ------------------------------------
.PP
With this subcommand, it is possible to attach a note to the specified
account.
In order to delete an existing note, pass the
.BR \-d " option."
.PP
Example:
.PP
.nf
.B vmm uo d.user@example.com -n `Only needed until end of May 2013'
.fi
.\" ------------------------------------
.SS userquota (uq)
.BI "vmm userquota" " address storage"
.RB [ \-m
.IR messages ]
.PP
This subcommand is used to set a new quota limit for the given account.
.PP
When the argument
.I messages
was omitted the default number of messages
.B 0
(zero) will be applied.
.PP
Instead of
.I storage
limit pass the keyword
.B domain
to remove the account\-specific override, causing the domain's value to be
in effect.
.PP
Example:
.PP
.nf
.B vmm userquota d.user@example.com 750m
.fi
.\" ------------------------------------
.SS userservices (us)
.B vmm userservices
.I address
.RB [ \-s
.IR "service ..." ]
.PP
To grant a user access to the specified services, use this command.
.PP
All omitted services will be deactivated/unusable for the user with the
given
.IR address .
.PP
Instead of any
.I service
pass the keyword
.B domain
to remove the account\-specific override, causing the domain's value to be
in effect.
.PP
Example:
.PP
.nf
.B vmm userservices d.user@example.com \-s smtp imap
.\" ------------------------------------
.SS usertransport (ut)
.BI "vmm usertransport" " address transport"
.PP
A different
.I transport
for an account can be specified with this subcommand.
.PP
Instead of
.I transport
pass 'domain' to remove the account\-specific override, causing the
domain's value to be in effect.
.PP
Example:
.br
Assumed you want to use Dovecot's
.BR dsync (1)
to convert a user's mailbox from Maildir format to mdbox format, you
can tell Postfix to retry later.
.PP
.nf
.B vmm ut d.user@example.com \(dqretry:4.0.0 Mailbox being migrated\(dq
# convert the mailbox ... then set the transport to Dovecot's lmtp
.B vmm ut d.user@example.com lmtp:unix:private/dovecot\-lmtp
.fi
.\" -----------------------------------------------------------------------
.SH ALIAS SUBCOMMANDS
.SS aliasadd (aa)
.BI "vmm aliasadd" " address destination ..."
.PP
This subcommand is used to create a new alias
.I address
with one or more
.I destination
addresses.
.PP
Within the destination address, the placeholders
.IR %n ,
.IR %d ,
and
.IR %=
will be replaced by the local part, the domain, or the email address with '@'
replaced by '=' respectively. In combination with alias domains, this enables
domain\-specific destinations.
.PP
Examples:
.PP
.nf
.B vmm aliasadd john.doe@example.com d.user@example.com
.B vmm aa support@example.com d.user@example.com e.user@example.com
.B vmm aa postmaster@example.com postmaster+%d@example.org
.fi
.\" ------------------------------------
.SS aliasdelete (ad)
.BI "vmm aliasdelete" " address"
.RI [ destination " ...]"
.PP
This subcommand is used to delete one or multiple
.IR destination s
from the alias with the given
.IR address .
.PP
When no
.I destination
address was specified the alias with all its destinations will be deleted.
.PP
Example:
.PP
.nf
.B vmm ad support@example.com d.user@example.com
.fi
.\" ------------------------------------
.SS aliasinfo (ai)
.BI "vmm aliasinfo" " address"
.PP
Information about the alias with the given
.I address
can be displayed with this subcommand.
.PP
Example:
.PP
.nf
.B vmm aliasinfo support@example.com
Alias information
-----------------
Mail for support@example.com will be redirected to:
* e.user@example.com
.fi
.\" -----------------------------------------------------------------------
.SH RELOCATED SUBCOMMANDS
.SS relocatedadd (ra)
.BI "vmm relocatedadd" " address newaddress"
.PP
A new relocated user can be created with this subcommand.
.PP
.I address
is the user's ex\-email address, for example b.user@example.com, and
.I newaddress
points to the new email address where the user can be reached.
.PP
Example:
.PP
.nf
.B vmm relocatedadd b.user@example.com b\-user@company.tld
.fi
.\" ------------------------------------
.SS relocatedinfo (ri)
.BI "vmm relocatedinfo " address
.PP
This subcommand shows the new address of the relocated user with the given
.IR address .
.PP
Example:
.PP
.nf
.B vmm relocatedinfo b.user@example.com
Relocated information
---------------------
User `b.user@example.com' has moved to `b\-user@company.tld'
.fi
.\" ------------------------------------
.SS relocateddelete (rd)
.BI "vmm relocateddelete " address
.PP
Use this subcommand in order to delete the relocated user with the given
.IR address .
.PP
Example:
.PP
.nf
.B vmm relocateddelete b.user@example.com
.fi
.\" -----------------------------------------------------------------------
.SH CATCH\-ALL SUBCOMMANDS
.SS catchalladd (caa)
.BI "vmm catchalladd" " fqdn destination ..."
.PP
This subcommand allows to specify destination addresses for a domain, which
shall receive mail addressed to unknown local parts within that domain.
Those catch\-all aliases hence \(dqcatch all\(dq mail to any address in the
domain (unless a more specific alias, mailbox or relocated entry exists).
.PP
WARNING: Catch\-all addresses can cause mail server flooding because
spammers like to deliver mail to all possible combinations of names, e.g.
to all addresses between abba@example.org and zztop@example.org.
.PP
Example:
.PP
.nf
.B vmm catchalladd example.com user@example.org
.fi
.\" ------------------------------------
.SS catchallinfo (cai)
.BI "vmm catchallinfo " fqdn
.PP
This subcommand displays information about catch\-all aliases defined for
a domain.
.PP
Example:
.PP
.nf
.B vmm catchallinfo example.com
Catch-all information
---------------------
Mail to unknown local\-parts in domain example.com will be sent to:
* user@example.org
.fi
.\" ------------------------------------
.SS catchalldelete (cad)
.BI "vmm catchalldelete " fqdn
.RI [ destination " ...]"
.PP
With this subcommand, catch\-all aliases defined for a domain can be
removed, either all of them, or those
.IR destination s
which were specified explicitly.
.PP
Example:
.PP
.nf
.B vmm catchalldelete example.com user@example.com
.fi
.\" -----------------------------------------------------------------------
.SH FILES
.TP
.I /root/vmm.cfg
will be used when found.
.TP
.I /usr/local/etc/vmm.cfg
will be used when the above file doesn't exist.
.TP
.I /etc/vmm.cfg
will be used when none of the both above mentioned files exists.
.\" -----------------------------------------------------------------------
.SH SEE ALSO
.BR doveadm\-pw (1),
.BR dsync (1),
.BR transport (5),
.BR vmm.cfg (5)
.\" -----------------------------------------------------------------------
.SH INTERNET RESOURCES
.TP
Homepage
http://vmm.localdomain.org/
.TP
Project site
http://sf.net/projects/vmm/
.TP
Bug tracker
https://bitbucket.org/pvo/vmm/issues
.\" -----------------------------------------------------------------------
.SH COPYING
vmm and its manual pages were written by Pascal Volk <user+vmm AT
localhost.localdomain.org> and are licensed under the terms of the BSD
License.