dovecot:pop 和 smtp 不起作用

dovecot:pop 和 smtp 不起作用

我只是关注这个关联尝试在我的 CentOS 7 服务器上配置 dovecot。
但我总是无法连接 pop 和 smtp。

当我在我的服务器上执行时ps aux | grep dovecot,我只能看到以下结果:

root     31229  0.0  0.1  15640  1516 ?        Ss   10:16   0:00 /usr/sbin/dovecot -F
dovecot  31231  0.0  0.1   9308  1016 ?        S    10:16   0:00 dovecot/anvil
root     31232  0.0  0.1   9436  1180 ?        S    10:16   0:00 dovecot/log
root     32255  0.0  0.0 112652   956 pts/0    S+   10:54   0:00 grep --color=auto dovecot

看起来 Dovecot 没有完成其工作,因为没有监听端口 110 和端口 143。

答案1

您提供的链接仅谈到启用 SASL 并确保防火墙允许 POP 和 IMAP - 它实际上并没有对它们进行配置。

您可能需要编辑 dovecot.conf 并添加/取消注释各种服务的相应行。例如,我的配置适用于 POP 和 IMAP,如下所示:

auth_default_realm = host.name
auth_mechanisms = plain login
auth_verbose = yes
disable_plaintext_auth = no
listen = *
log_timestamp = "%Y-%m-%d %H:%M:%S "
login_greeting = Server ready.

mail_max_userip_connections = 30

# mail_location = maildir:~/Maildir
# mail_location = maildir:/path/to/%u
mail_location = maildir:/path/to/%u/Maildir
mail_privileged_group = mail
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}

service lmtp {

        user=mailuser
        process_min_avail = 5

        inet_listener lmtp {
                address=127.0.0.1
                port = 24
                }

        unix_listener lmtp {
                # mode=666
                }
        }

protocols = imap pop3 sieve lmtp
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-master {
    mode = 0600
    user = mailuser
  }
}
service imap-login {
  chroot = login
  user = dovecot
}
service pop3-login {
  chroot = login
  user = dovecot
}

ssl_ca = </etc/ssl-keys/my-required-PositiveChain.crt
ssl_cert = </etc/ssl-keys/mail.networksavvy.org.crt
ssl_cipher_list = ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM
ssl_key = </etc/ssl-keys/my.host.key
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
verbose_ssl = no
protocol imap {
  disable_plaintext_auth = no
  imap_client_workarounds = delay-newmail
  mail_max_userip_connections = 50
}

protocol pop3 {
  disable_plaintext_auth = no
  mail_max_userip_connections = 50
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
  ssl_ca = </etc/ssl-keys/my-PositiveChain.crt
  ssl_cert = </etc/ssl-keys/my.host.crt
  ssl_key = </etc/ssl-keys/my.host.key
}

protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  deliver_log_format = msgid=%m: %$
  hostname = my.host.name
  postmaster_address = postmaster
  quota_full_tempfail = yes
  rejection_reason = Your message to <%t> was automatically rejected:%n%r
}

注意“协议”和“服务”行。

相关内容