Dovecot
1. Introduction
1.1 Install Dovecot
1.2 Configure Dovecot
Introduction
Requires that a server certificate signed by CACert.org has already been aquired.Install Dovecot
apt-get install dovecot-imapd dovecot-pop3d
Configure Dovecot
vi /etc/dovecot/dovecot.confTHE DOVECOT.CONF FILE IS BIG, I HAVE ONLY HIGHLIGHTED THE CHANGES THAT I MADE TO THE DEFAULT DOVECOT.CONF FILE AS PROVIDED IN THE DEBIAN PACKAGE.
# Protocols we want to be serving: imap imaps pop3 pop3s
# If you only want to use dovecot-auth, you can set this to "none".
#protocols = imap imaps
protocols = pop3 imap pop3s imaps
# Disable LOGIN command and all other plaintext authentications unless
# SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP
# matches the local IP (ie. you're connecting from the same computer), the
# connection is considered secure and plaintext authentication is allowed.
disable_plaintext_auth = no
# PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
# dropping root privileges, so keep the key file unreadable by anyone but
# root.
ssl_cert_file = /etc/ssl/private/flexion_certificate.pem
ssl_key_file = /etc/ssl/private/flexion_privatekey.pem
# chroot login process to the login_dir. Only reason not to do this is if you
# wish to run the whole Dovecot without roots.
# http://wiki.dovecot.org/Rootless
login_chroot = yes
##
## Mailbox locations and namespaces
##
# Location for users' mailboxes. This is the same as the old default_mail_env
# setting. The default is empty, which means that Dovecot tries to find the
# mailboxes automatically. This won't work if the user doesn't have any mail
# yet, so you should explicitly tell Dovecot the full location.
#
# If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
# isn't enough. You'll also need to tell Dovecot where the other mailboxes are
# and where Dovecot can place its index files. This is called the "root mail
# directory", and it must be the first path given in the mail_location setting.
#
# There are a few special variables you can use, eg.:
#
# %u - username
# %n - user part in user@domain, same as %u if there's no domain
# %d - domain part in user@domain, empty if there's no domain
# %h - home directory
#
# See /usr/share/doc/dovecot-common/variables.txt for full list. Some examples:
#
# mail_location = maildir:~/Maildir
# mail_location = mbox:~/mail:INBOX=/var/mail/%u
# mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
#
# http://wiki.dovecot.org/MailLocation
#
mail_location = maildir:/home/virtual/%d/var/spool/mail/%n
# Valid UID range for users, defaults to 500 and above. This is mostly
# to make sure that users can't log in as daemons or other system users.
# Note that denying root logins is hardcoded to dovecot binary and can't
# be done even if first_valid_uid is set to 0.
first_valid_uid = 150
#last_valid_uid = 0
auth default {
# Space separated list of wanted authentication mechanisms:
# plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi
mechanisms = plain login
# passwd-like file with specified location
# http://wiki.dovecot.org/AuthDatabase/PasswdFile
passdb passwd-file {
# Path for passwd-file
args = /etc/virtual_hostess/passwd-mail
}
# static settings generated from template
# http://wiki.dovecot.org/UserDatabase/Static
userdb static {
# Template for the fields. Can return anything a userdb could normally
# return. For example:
#
# args = uid=500 gid=500 home=/var/mail/%u
#
args = uid=150 gid=8 home=/home/virtual/%d/var/spool/mail/%n/
}
# User to use for the process. This user needs access to only user and
# password databases, nothing else. Only shadow and pam authentication
# requires roots, so use something else if possible. Note that passwd
# authentication with BSDs internally accesses shadow files, which also
# requires roots. Note that this user is NOT used to access mails.
# That user is specified by userdb above.
user = vmail
References
- http://adminspotting.net/building-a-messaging-server
- http://www.howtoforge.com/postfix_mysql_dovecot_dspam_clamav_postgrey_rbl_debian_etch
- http://johnny.chadda.se/2007/04/15/mail-server-howto-postfix-and-dovecot-with-mysql-and-tlsssl-postgrey-and-dspam/
- http://flakshack.com/anti-spam/wiki/index.php?page=Debian
- https://help.ubuntu.com/community/Dovecot
- http://www.cyberciti.biz/faq/unix-dovecot-ssl-tls-server-configuration/
$Id: DovecotSetup,v 1.13 2008/07/08 13:56:40 martin Exp $
Wiki Index All Recent Edit Top

