Dovecot:只有普通登录有效,如何启用 starttls

Dovecot:只有普通登录有效,如何启用 starttls

我正在配置一个全新的 postfix/dovecot 服务器,但我的脑细胞快要融化了,我记不清该怎么做了。一切正常,postfix 已启用 starttls(我在 thunderbird 配置中看到它),但 dovecot 没有。我尝试更改disable_plaintext_authyes,Thunderbird 告诉我必须将身份验证方法更改为,STARTTLS但当我这样做时,它不再起作用了。
我没有错误,但无法接收或发送电子邮件(电子邮件已正确发送但未复制到已发送文件夹)。
每次我尝试访问 Thunderbird 文件夹时,我都会在日志中看到此信息
mail dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>

我认为这只是设置一个普通的变量但我找不到它。

鸽舍:

# 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.13 (7b14904)
# OS: Linux 4.4.0-47-generic x86_64 Ubuntu 16.04.1 LTS ext4
auth_mechanisms = plain login
disable_plaintext_auth = no
mail_location = mbox:/var/mail/%u
mail_privileged_group = mail
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  driver = pam
}
protocols = " imap pop3"
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
}
ssl = no
userdb {
  driver = passwd
}

main.cf 后缀

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
#smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_cert_file = /etc/ssl/certs/server.crt
smtpd_tls_key_file = /etc/ssl/private/server.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
#smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_protocols = !SSLv2, !SSLv3
smtpd_sasl_authenticated_header = yes

smtpd_relay_restrictions = permit_sasl_authenticated, defer_unauth_destination,permit_mynetworks
myhostname = mail.example.it
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname,example.it, mail.example.it, localhost.localdomain,localhost
#relayhost =
mynetworks = 127.0.0.0/8 192.168.100.0/24 xx.xx.211.70/32
#mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
mailbox_command = /usr/lib/dovecot/deliver
compatibility_level = 2
mail_spool_directory = /var/mail/

主配置文件

submission inet n       -       y       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=may
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING

dovecot\10-auth.conf

disable_plaintext_auth = no
auth_mechanisms = plain login

答案1

您需要配置 SSL/TLS。以下是我的配置选项:

ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
ssl_cipher_list = HIGH:!3DES:!EXP:!aNULL:!eNULL
ssl_dh_parameters_length = 2048
ssl_prefer_server_ciphers = 是
SSL 协议 = !SSLv3,!SSLv2

相关内容