##
##  dovecot.conf -- Dovecot server configuration
##

protocols                  = imap

protocol imap {
    listen                 = 127.0.0.1:143
    ssl_listen             = 127.0.0.1:993
    log_path               = @l_prefix@/var/dovecot/log/imap-error.log
    info_log_path          = @l_prefix@/var/dovecot/log/imap-info.log
    login_executable       = @l_prefix@/libexec/dovecot/imap-login
    mail_executable        = @l_prefix@/libexec/dovecot/rawlog @l_prefix@/libexec/dovecot/imap
}

ssl                        = yes
ssl_cert_file              = @l_prefix@/etc/x509/example-server.crt.pem
ssl_key_file               = @l_prefix@/etc/x509/example-server.key.pem

log_path                   = @l_prefix@/var/dovecot/log/dovecot-error.log
info_log_path              = @l_prefix@/var/dovecot/log/dovecot-info.log
log_timestamp              = '%b %d %H:%M:%S '

login_user                 = @l_nusr@
login_processes_count      = 4
login_max_processes_count  = 128
login_max_connections      = 256

mail_location              = mbox:~/.mail:INBOX=~/.mail/inbox
mail_uid                   = @l_rusr@
mail_gid                   = @l_rusr@
mail_privileged_group      = @l_rusr@
mbox_read_locks            = fcntl
mbox_write_locks           = fcntl

auth_realms                = example.com
auth_default_realm         =
auth_verbose               = yes
disable_plaintext_auth     = no

auth_debug                 = no
auth_debug_passwords       = no
mail_debug                 = no
verbose_ssl                = no

protocol lda {
    postmaster_address     = postmaster
    log_path               = @l_prefix@/var/dovecot/log/deliver-error.log
    info_log_path          = @l_prefix@/var/dovecot/log/deliver-info.log
}

auth default {
    mechanisms             = plain login
    passdb passwd {
    }
    userdb passwd {
    }
    socket listen {
        master {
            path           = @l_prefix@/var/dovecot/run/auth-master
            mode           = 0600
            user           = @l_rusr@
            group          = @l_rugrp@
        }
        client {
            path           = @l_prefix@/var/dovecot/run/auth-client
            mode           = 0660
            user           = @l_musr@
            group          = @l_mgrp@
        }
    }
}

