Dovecot

From Edgar BV Wiki
Revision as of 14:43, 17 January 2013 by Red (talk | contribs) (Created page with "= v1 = Check the following is set, or dovecot won't let people POP / IMAP in <pre> protocols = imap imaps pop3 pop3s </pre> We need to set it to listen on all interfaces, so ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

v1

Check the following is set, or dovecot won't let people POP / IMAP in

protocols = imap imaps pop3 pop3s

We need to set it to listen on all interfaces, so uncomment

listen = *

Because we're allowing plaintext auth we need to change

disable_plaintext_auth = no

To set Dovecot to save files in Maildir format and then also use directories to store folders (instead of foldername.mail in one big folder), set NB the documentation says you should use an extra :layout=fs but that breaks just about everything and this way everything is put into subfolders starting with .

mail_location = maildir:~/Maildir

Ensure the following is set for performance

maildir_copy_with_hardlinks = yes

Because we're using NFS for mail storage we need to check:

mmap_disable = yes
dotlock_use_excl = yes # MUST CHECK THIS ONE
mail_nfs_storage = yes
mail_nfs_index = yes

v2

apt-get -t squeeze-backports --no-install-recommends install dovecot-common dovecot-core dovecot-imapd dovecot-pop3d


in /etc/dovecot/dovecot.conf

listen = *, ::
base_dir = /var/run/dovecot/

in /etc/dovecot/conf.d/

10-auth.conf

disable_plaintext_auth = no

10-logging.conf

log_path = /var/log/mail/dovecot.err
info_log_path = /var/log/mail/dovecot.info

10-mail.conf

mail_location = maildir:~/Maildir
mmap_disable = yes
dotlock_use_excl = yes
mail_fsync = always
mail_nfs_storage = yes
mail_nfs_index = yes
maildir_copy_with_hardlinks = yes

authenticating using an external server

auth-system-conf.ext

This allows you to authenticate a user from a remote IMAP server

passdb {
  driver = imap
  args = host=192.168.0.112
}

But you still need the UID / GID etc, so you need to find a way to get it to read the userdb, so also add

userdb {
  driver = passwd-file
  args = /etc/dovecotauth/passwd
}

and link /etc/dovecotauth/passwd from the other server using NFS

You need at lease one passdb and one userdb. If you have more than each, dovecot runs through them in that order.

Use the doveadm command to administer and test. Useful are:

user / userdb queries

auth / passdb queries