安装了post fix和dovecot,本地能收到cron的报错邮件,但imap连不上。
systemctl绿灯,lsof-i也是正确。
# telnet 127.0.0.1 143
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Connection closed by foreign host.
各位能帮忙看看吗?
cat dovecot.conf
protocols = imap
mail_location = maildir:/var/vmail/%d/%n/Maildir
## uncomment this if you already have email from
## courier for instance.
#namespace private {
# separator = .
# prefix = INBOX.
# inbox = yes
#}
## change section "protocol lda" to:
protocol lda {
# Address to use when sending rejection mails.
postmaster_address = postmaster@example.com
log_path = /var/vmail/dovecot-deliver.log
# Hostname to use in various parts of sent mails, eg. in Message-Id.
# Default is the system's real hostname.
#hostname =
# Support for dynamically loadable plugins. mail_plugins is a space separated
# list of plugins to load.
#mail_plugins =
#mail_plugin_dir = /usr/lib/dovecot/modules/lda
# Binary to use for sending mails.
#sendmail_path = /usr/lib/sendmail
# UNIX socket path to master authentication server to find users.
auth_socket_path = /var/run/dovecot/auth-master
# Enabling Sieve plugin for server-side mail filtering
# handy for storing spam in their folders
mail_plugins = cmusieve
#global_script_path = /var/vmail/globalsieverc
}
## in section auth default
## change :
auth_mechanisms = plain
#mechanisms = plain login
## comment out "passdb pam"
## and make sure the following is in
## to look for users in the DB
# passdb sql {
# Path for SQL configuration file, see /etc/dovecot/dovecot-sql.conf for example
# args = /etc/dovecot/dovecot-sql.conf
#}
## and add this so dovecot does not deal with uid/gid
## we use uid and gid 5000 for everybody
#userdb static {
# args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
#}
## next make sure the section "socket listen" looks like this
## so dovecot and postfix work happily together
# socket listen {
# master {
# path = /var/run/dovecot/auth-master
# mode = 0600
# user = vmail # User running Dovecot LDA
#group = mail # Or alternatively mode 0660 + LDA user in this group
# }
# client {
# The client socket is generally safe to export to everyone. Typical use # is to export it to your SMTP server so it can do SMTP AUTH lookups
# using it.
#path = /var/spool/postfix/private/auth
#path = /var/run/dovecot/auth-client
# mode = 0660
# user = postfix
# group = postfix
# }
# }
passdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf
}