Dovecot 和 Postfix 不支持 STARTTLS

Dovecot 和 Postfix 不支持 STARTTLS

我进行了大量搜索,但并未找到解决方案。

我必须在我的电子邮件服务器上重新加载 Mageia 6。我正在使用dovecot-2.2.34-1.mga6postfix-3.1.6-1.mga6。Openssl 是openssl-1.0.2o-1.mga6

我可以使用Postbox密码(基于 Thunderbird)发送和接收电子邮件,并且没有加密,但是当尝试STARTTLS从 telnet 到 587 或 465 时,我得到:

454 4.7.0 TLS 因本地问题不可用

在文件系统损坏并且我不得不重新安装 Mageia 之前,它一直正常工作。旧的配置文件不适用于新安装。

从 telnet:

Escape character is '^]'.
220 robob.robob.com ESMTP Postfix (3.1.6) (Linux)
EHLO robob.robob.com
250-robob.robob.com
250-PIPELINING
250-SIZE 252400000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
STARTTLS
454 4.7.0 TLS not available due to local problem

Dovecot 应该负责进行身份验证。

# 2.2.34 (874deae): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.18 (29cc74d)
# OS: Linux 4.14.65-desktop-1.mga6 i686 Mageia 6 
# Hostname: robob.robob.com
auth_debug = yes
auth_mechanisms = plain login
disable_plaintext_auth = no
listen = *
mail_access_groups = mail
mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-              character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext
mbox_write_locks = fcntl
passdb {
driver = pam
}
protocols = imap pop3
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
 }
vsz_limit = 512 M
}
service imap-login {
process_min_avail = 10
service_count = 1
vsz_limit = 2 G
}
service imap {
vsz_limit = 640 M
}
service managesieve-login {
process_min_avail = 10
}
service managesieve {
vsz_limit = 640 M
}
service pop3-login {
process_min_avail = 10
}

    service pop3 {
    vsz_limit = 640 M
}

ssl_cert = </etc/pki/tls/certs/dovecot.pem
ssl_key =  # hidden, use -P to show it


userdb {
driver = passwd
}

protocol lda {
postmaster_address = [email protected]
}

非常感谢您的帮助,因为我已经为此工作了大约 30 个小时,几乎没有睡觉。我有几个用户,我不希望他们以不安全的方式连接。

谢谢,罗伯特


        # Please be sure to read the /usr/share/doc/postfix/README.MDK file
# to learn about differences from stock postfix to Mandriva package.
# This file contains only the parameters changed from a default install
# see /etc/postfix/main.cf.dist for a commented, fuller version of this file.

# These are changed by postfix install script
readme_directory = /usr/share/doc/postfix/README_FILES
html_directory = /usr/share/doc/postfix/html
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/share/man
daemon_directory = /usr/libexec/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix

# User configurable parameters

mydomain = robob.com
mydestination = $myhostname, localhost.$mydomain, $mydomain, eoberjr.com
#inet_interfaces = localhost
#mynetworks_style = host
#delay_warning_time = 4h
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Linux)
unknown_local_recipient_reject_code = 450
smtp-filter_destination_concurrency_limit = 2
lmtp-filter_destination_concurrency_limit = 2
data_directory = /var/lib/postfix
mailbox_size_limit = 2000000000
message_size_limit = 252400000
#mailbox_command = /usr/bin/procmail  -a "$EXTENSION"
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
mail_spool_directory = /var/spool/mail
relay_domains = $mydestination /etc/postfix/relay_domains
mynetworks = 75.148.212.32/29, 127.0.0.1
canonical_maps = hash:/etc/postfix/canonical
virtual_maps = hash:/etc/postfix/virtual
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
maps_rbl_domains = blackholes.mail-abuse.org
smtpd_sasl_auth_enable = yes
ssl_cert = /etc/pki/tls/certs/dovecot.pem
ssl_key = /etc/pki/tls/private/dovecot.pem
smtp_tls_cert_file = /etc/pki/tls/certs/dovecot.pem
ssl_key = /etc/pki/tls/private/dovecot.pem
smtpd_sasl_type = dovecot
#smtpd_sasl_path = smtpd
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain = robob.com
smtpd_sasl_security_options = noanonymous
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, reject_rbl_client 2.0.0.127.b.barracudacentral.org
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_relay_domains, reject_unauth_destinationa, reject_rbl_client bl.spamcop.net
broken_sasl_auth_clients = yes
inet_protocols = ipv4

我尝试了很多方法。当前配置应该让 Dovecot 进行身份验证。感谢您的澄清。那么,Dovecot 进行身份验证,然后 Postfix 协商加密?我之前尝试过 cyrus sasl,但也没有用,所以我删除了它。

谢谢

答案1

您的 Postfix 配置中似乎有一个拼写错误。

smtp_tls_cert_file = /etc/pki/tls/certs/dovecot.pem

smtp_Postfix 使用以 开头的指令来执行传出与其他服务器的 SMTP 连接。具体来说,此指令仅当 Postfix 需要使用客户端证书向另一台 SMTP 服务器进行身份验证时才使用。这种情况极其罕见,您目前所处的情况并非如此。

您可能想要输入smtpd_tls_cert_file。以 开头的指令smtpd_适用于传入的 SMTP 连接。

您还需要在指令中提供与证书相对应的私钥smtpd_tls_key_file

您可能还需要进行其他配置更改。阅读相关的 Postfix 文档小心。

相关内容