在继续之前,我在网上查看了大量关于协议未设置的帖子,并尝试了他们提供的内容,但所有这些都没有帮助,并且似乎无法解决问题。
我在设置鸽舍时遇到一些问题。我一直在遵循这个指南:http://www.krizna.com/ubuntu/setup-mail-server-ubuntu-14-04/设置邮件服务器,一切正常。 Postfix 已正确安装和配置。当我进行 Dovecot 安装时,它询问我有关使用 telnet 进行连接并验证连接是否正常工作(在指南中)以及端口是否:110,995,993,143工作。但仅限端口995和993允许我连接,但它们没有显示任何类型的信息:“+OK Dovecot (Ubuntu) 准备就绪。”在他们。
我在 /var/log/mail.log 中看到:
Jun 26 09:05:07 master: Info: Dovecot v2.2.9 starting up (core dumps disabled)
Jun 26 09:05:07 config: Warning: service auth { client_limit=1000 } is lower than required under max. load (6000)
Jun 26 09:05:07 config: Warning: service anvil { client_limit=1000 } is lower than required under max. load (6003)
即使当我连接到993和995端口。当我尝试其他的时候,我只是得到:
telnet: Unable to connect to remote host: Connection refused
该过程正在运行,我看不到任何错误。这是的输出鸽舍-n
# 2.2.9: /etc/dovecot/dovecot.conf
doveconf: Warning: service auth { client_limit=1000 } is lower than required under max. load (6000)
doveconf: Warning: service anvil { client_limit=1000 } is lower than required under max. load (6003)
# OS: Linux 3.14.32-xxxx-grs-ipv6-64 x86_64 Ubuntu 14.04.5 LTS
auth_mechanisms = plain login
default_process_limit = 2000
first_valid_uid = 0
imap_idle_notify_interval = 4 mins
listen = * ::
log_path = /var/log/mail.log
mail_access_groups = spampd
mail_location = maildir:~/Maildir
mail_privileged_group = mail
namespace inbox {
inbox = yes
location =
mailbox Archive {
auto = subscribe
special_use = \Archive
}
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox INBOX {
auto = subscribe
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Spam {
auto = subscribe
special_use = \Junk
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
prefix =
}
passdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
plugin {
antispam_allow_append_to_spam = yes
antispam_backend = pipe
antispam_pipe_program = /bin/bash
antispam_pipe_program_notspam_args = /usr/local/bin/sa-learn-pipe.sh;--ham
antispam_pipe_program_spam_args = /usr/local/bin/sa-learn-pipe.sh;--spam
antispam_spam_pattern_ignorecase = SPAM
antispam_trash_pattern_ignorecase = trash;Deleted *
fts = lucene
fts_lucene = whitespace_chars=@.
sieve = /home/user-data/mail/sieve/%d/%n.sieve
sieve_after = /home/user-data/mail/sieve/global_after
sieve_before = /etc/dovecot/sieve-spam.sieve
sieve_before2 = /home/user-data/mail/sieve/global_before
sieve_dir = /home/user-data/mail/sieve/%d/%n
}
postmaster_address = [email protected]
protocols = imap pop3 imap pop3
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
}
service imap-login {
inet_listener imap {
port = 0
}
}
service lmtp {
inet_listener lmtp {
address = 127.0.0.1
port = 10026
}
}
service pop3-login {
inet_listener pop3 {
port = 0
}
}
ssl = required
ssl_cert = </home/user-data/ssl/ssl_certificate.pem
ssl_cipher_list = TLSv1+HIGH !SSLv2 !RC4 !aNULL !eNULL !3DES @STRENGTH
ssl_key = </home/user-data/ssl/ssl_private_key.pem
ssl_protocols = !SSLv3 !SSLv2
userdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
protocol lmtp {
mail_plugins = " sieve"
}
protocol imap {
mail_max_userip_connections = 20
mail_plugins = " antispam"
}
protocol pop3 {
mail_plugins = " antispam"
}
如果您需要更多信息,请直接说,我们将不胜感激。因为我已经尝试配置这个东西了。
提前致谢。
答案1
端口 993 和 995 需要 SSL/TLS,您不能简单地远程登录到它们并期望以明文形式打印内容。使用类似
openssl s_client -quiet -connect youdomain.tld:993
或openssl s_client -quiet -connect youdomain.tld:995
protocols = imap pop3 imap pop3
<- 为什么你列出两次?inet_listener imap { port = 0 }
<- 您在端口 143 上禁用了 IMAP,这就是您无法远程登录到该端口的原因。不要禁用 IMAP,disable_plaintext_authentication=yes
如果您想要 TLS 安全登录,只需使用即可。inet_listener pop3 { port = 0 }
<- 您在端口 110 上禁用了 POP3,这就是您无法远程登录到该端口的原因。不要禁用 POP3,disable_plaintext_authentication=yes
如果您想要 TLS 安全登录,只需使用即可。
顺便说一句,您启用了 imap 和 pop3 协议,并对 lmtp 进行了一些配置,但没有启用 lmtp 协议。
答案2
就我而言,当我从 Ubuntu 19.04 升级到 19.10 时,它以某种方式删除了 2 个必要的软件包。
这些是我升级后的软件包:
> dpkg -l | grep dovecot
ii dovecot-core 1:2.3.4.1-5ubuntu3 amd64 secure POP3/IMAP server - core files
ii dovecot-sieve 1:2.3.4.1-5ubuntu3 amd64 secure POP3/IMAP server - Sieve filters support
所以我运行了这些命令:
> sudo apt-get install dovecot-imapd dovecot-pop3d
> sudo service dovecot restart
现在,当我运行时,netstat -lntp
我可以看到我期望看到的所有端口的侦听器。