LoginSignup
0
0

More than 5 years have passed since last update.

dovecot notes

Last updated at Posted at 2015-10-18

Centos6 (2.x)

/etc/dovecot/dovecot.conf

dovecot.conf
#use minimal protocols
#protocols = imap pop3 lmtp
protocols = imap pop3

#only ipv4 :: mean all ipv6 ip's
#listen = *, ::
listen = *

/etc/dovecot/conf.d .. 10-auth.conf

10-auth.conf
# dovecot 1.x default is "no"
disable_plaintext_auth = no

# use username h-imaoka@example.jp  = <h-imaoka>
auth_username_format = %n

#keep it
auth_mechanisms = plain

auth-system.conf.ext

auth-system.conf.ext
passdb {
  driver = pam
  # [session=yes] [setcred=yes] [failure_show_msg=yes] [max_requests=<n>]
  # [cache_key=<key>] [<service name>]
  #args = dovecot
  args = login
}

args = login means /etc/pam.d/login

10-mail.conf

10-mail.conf
# 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 doc/wiki/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

mail_location = mbox:~/mail:INBOX=/var/mail/%u

mail_access_groups = mail

10-ssl.conf (optional)

10-ssl.conf
# SSL/TLS support: yes, no, required. <doc/wiki/SSL.txt>
ssl = no

trouble shooting

can not start daemon (protocol error)

set listen port = * (ipv4 only)

pam auth failure (locked account)

use login pam auth.

clear failure count
pam_tally2 --user=<user name> --reset
corrent failure count
pam_tally2 --user=<user name>

login succeeded but disconnected from server

confirm mail_location setting

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0