This documentation is for Dovecot v1.x, see wiki2 for v2.x documentation.

Simple Virtual User Installation

System configuration


Below is a fully working dovecot.conf file. You can use it directly, but it might be better to instead use dovecot-example.conf as the base and make the same modifications to it.

If you want to configure SSL, see SSL.

# Remove pop3 things if you don't want them
protocols = imap imaps pop3 pop3s

# It's nice to have separate log files for Dovecot. You could do this
# by changing syslog configuration also, but this is easier.
log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot-info.log

# Disable SSL for now.
ssl = no # v1.2+, for older versions use: ssl_disable = yes
disable_plaintext_auth = no

# We're using Maildir format
mail_location = maildir:~/Maildir

# If you're using POP3, you'll need this:
pop3_uidl_format = %08Xu%08Xv

# Authentication configuration:
auth_verbose = yes

auth default {
  mechanisms = plain
  passdb passwd-file {
    args = /etc/dovecot/passwd
  userdb static {
    args = uid=vmail gid=vmail home=/home/vmail/%u


See AuthDatabase/PasswdFile for the full file format. Here we're interested only having usernames and passwords in it. Below's an example file:


As you can see, you can use multiple domains in the file, or no domains at all. Dovecot doesn't care about domains.

Users can be added by editing this file. Dovecot automatically notices the new users immediately after they're added. It also creates their home directories when the user logs in.


The passwords in the example passwd file are listed using plaintext scheme. It's possible to use other password schemes as well. For example SSHA would be a pretty strong scheme. You can create them using dovecotpw utility, for example:

dovecotpw -s ssha
Enter new password: foo
Retype new password: foo

Note that you won't get the same output after {SSHA} as above, because Dovecot uses random salts when creating the SSHA hash. This means that even if multiple users have the same password, you won't know that because their hashes are different.

The passwd file entry would be:


Joe would now have "foo" as his password.

SMTP server configuration

Delivering mails

You can configure the SMTP server to deliver mails internally, or you can use Dovecot's deliver. Using deliver gives you better performance because it updates Dovecot's index files while saving the mails. See LDA for how to configure this. In config you should have:

protocol lda {
  postmaster_address =


If you're using Postfix v2.3+ or Exim v4.64+ you can use Dovecot SASL instead of Cyrus SASL.


If you need to have quota, add this to dovecot.conf (v1.1+ configuration):

protocol imap {
  mail_plugins = quota imap_quota
protocol pop3 {
  mail_plugins = quota
protocol lda {
  # .. other required lda settings ..
  mail_plugins = quota
plugin {
  quota = maildir

Then configure quota by adding userdb_quota_rule extra field to /etc/dovecot/passwd, for example:


Joe has now 100MB quota and Jane has 200MB quota. See Quota for more information about quota settings.

HowTo/SimpleVirtualInstall (last edited 2012-02-16 22:19:06 by TimoSirainen)