我已经按照教程设置了一个测试服务器https://arstechnica.com/information-technology/2014/02/how-to-run-your-own-e-mail-server-with-your-own-domain-part-1/
问题在于尝试使用 Thunderbird(或任何客户端)登录。Thunderbird 抱怨它找不到我的电子邮件帐户的设置。这是启用调试的 dovecot 日志。
Mar 9 11:44:30 mydomain dovecot: auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth
Mar 9 11:44:30 mydomain dovecot: auth: Debug: Read auth token secret from /var/run/dovecot/auth-token-secret.dat
Mar 9 11:44:30 mydomain dovecot: auth: Debug: passwd-file /etc/dovecot/passwd.db: Read 3 users in 0 secs
Mar 9 11:44:30 mydomain dovecot: auth: Debug: auth client connected (pid=4148)
Mar 9 11:44:30 mydomain dovecot: auth: Debug: auth client connected (pid=4150)
Mar 9 11:44:30 mydomain dovecot: auth: Debug: auth client connected (pid=4151)
Mar 9 11:44:30 mydomain dovecot: auth: Debug: auth client connected (pid=4152)
Mar 9 11:44:30 mydomain dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=192.0.218.2, lip=172.31
这是我的鸽舍配置
# 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.13 (7b14904)
# OS: Linux 4.4.0-66-generic x86_64 Ubuntu 16.04.2 LTS ext4
auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
mail_home = /var/mail/vmail/%d/%n
mail_location = maildir:/var/mail/vmail/%d/%n/mail:LAYOUT=fs
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
namespace inbox {
inbox = yes
location =
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Junk {
auto = subscribe
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
auto = subscribe
special_use = \Sent
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
prefix =
}
passdb {
args = username_format=%u scheme=ssha512 /etc/dovecot/passwd.db
driver = passwd-file
}
plugin {
sieve = ~/.dovecot.sieve
sieve_after = /var/mail/vmail/sieve-after
sieve_before = /var/mail/vmail/sieve-before
sieve_dir = ~/sieve
}
protocols = imap sieve
service auth {
unix_listener /var/spool/postfix/private/dovecot-auth {
group = postfix
mode = 0660
user = postfix
}
}
ssl_cert = </etc/dovecot/dovecot.pem
ssl_cipher_list = ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AES:RSA+3DES:!ADH:!AECDH:!MD5:!DSS
ssl_client_ca_dir = /etc/ssl/certs
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
args = uid=5000 gid=5000 home=/var/mail/vmail/%d/%n
driver = static
}
protocol lda {
deliver_log_format = msgid=%m: %$
mail_plugins = sieve
postmaster_address = [email protected]
quota_full_tempfail = yes
rejection_reason = Your message to <%t> was automatically rejected:%n%r
}
protocol imap {
imap_client_workarounds = tb-extra-mailbox-sep
mail_max_userip_connections = 10
}
我的证书之前出现了问题(我是自行签名的) - 但在我添加了例外之后,Thunderbird 很高兴地接受了它。
我能够通过 telnet 远程访问我的邮件服务器。
openssl s_client -connect mydomain.com:143 -starttls imap
CONNECTED(00000003)
从这里我可以登录我的帐户并查看收件箱。
我还可以连接到993端口并登录。
openssl s_client -showcerts -connect mail.mydomain.com:993
但 Thunderbird 一直告诉我“无法找到您的服务器设置”。从 gmail 发送到服务器的消息也失败了。
建议?