Dovecot Server Logo

Dovecot Server: open-source and secure IMAP4 / POP3 Mail Server

Dovecot is an open source IMAP4 and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. It is an excellent choice for both small and large installations. It's fast, simple to set up, requires no special administration and it uses very little memory. Supports both: the standard mbox and Maildir formats.
Written in: C

Download Dovecot: Source Code

License: OpenSource LGPL (Version 2.0)

Project Website: dovecot.org

Documentation: doc.dovecot.org

Project Goals
  • To provide a reliable IMAP4/POP3 server for Linux/UNIX-like systems
  • To be fast, secure, flexible, and has a rich feature set that makes it compatible with most existing IMAP systems
  • Supports both MBOX and MAILDIR formats
  • Supports Virtual Domains and a wide variety of Virtual User Configurations so you can support multiple domains using a variety of methods
Project Features
  • Protocols: IMAP (including TLS/STARTTLS), IMAP+SSL ("imaps"), POP3 (including TLS/STLS), POP3+SSL ("pops"), LMTP
  • Authentication: plain , digest-md5, cram-md5, apop (only for POP3), anonymous
  • Password mechanisms: PAM , passwd and shadow files, Password Executable, database (MySQL, PostgreSQL, SQLite, LDAP), vpopmail, Linuxconf
  • Sieve for mail filtering, auto replies, etc
  • IMAP & POP3 session proxying capability
Project Design and Security
  • Dovecot was written with security primarily in mind
  • Control of ports and IP addresses to listen
  • Runs in chrooted environment
  • User level restrictions

Sample Configuration
## Sample Configuration for Dovecot @ /etc/dovecot/dovecot.conf

## listen on both IPV4 / IPV6
#listen = *, [::]
listen = *

## If this is set too low can throw error: cannot map anonymous memory
login_process_size = 256

## dirs
base_dir = /var/dovecot-imap/
login_dir = /var/dovecot-imap/login

## logs
log_path = /var/log/dovecot/dovecot.log
info_log_path = /var/log/dovecot/dovecot-info.log

## procs
protocols = imap imaps pop3 pop3s
protocol imap {
    login_executable = /usr/local/libexec/dovecot/imap-login
    mail_executable = /usr/local/libexec/dovecot/imap
}
protocol pop3 {
    login_executable = /usr/local/libexec/dovecot/pop3-login
    mail_executable = /usr/local/libexec/dovecot/pop3
}

## Misc
mail_cache_fields = Envelope MessagePart
mailbox_idle_check_interval = 30
maildir_stat_dirs = no
maildir_copy_with_hardlinks = no

## SSL
verbose_ssl = no
ssl_cipher_list = HIGH
ssl_cert_file = /etc/dovecot/server.cert
ssl_key_file = /var/dovecot/server.key

## User and Group
first_valid_uid = 1001
first_valid_gid = 1001
mail_uid = 1001
mail_gid = 1001

## MailDir and Auth Settings
mail_location = maildir:/var/vmail/domains/%d/%n/Maildir
disable_plaintext_auth = no
auth default {
    mechanisms = plain apop digest-md5 cram-md5
    passdb passwd-file {
		args = /var/dovecot-imap/dovecotusers.tab
    }
    userdb static {
		args = uid=1001 gid=1001 home=/var/vmail/domains/%d/%n/Maildir
    }
}

## END