我在远程机器上安装了 Postfix,可以成功发送电子邮件和接收邮件。为了通过电子邮件客户端 (Thunderbird) 连接到该远程服务器,我安装了 Dovecot。现在我可以通过 Thunderbird 连接到远程服务器,甚至可以发送邮件,但无法接收任何邮件。当我检查 Dovecot 目录中的虚拟电子邮件用户时,他们的 cur 和 new 目录都是空的。你知道为什么吗?
Dovecot 配置:
/etc/dovecot/dovecot.conf:
# Enable installed protocols
!include_try /usr/share/dovecot/protocols.d/*.protocol
/etc/dovecot/conf.d/10-master.conf:
service imap-login {
inet_listener imap {
#port = 143
}
inet_listener imaps {
port = 993
ssl = yes
}
}
service pop3-login {
inet_listener pop3 {
#port = 110
}
inet_listener pop3s {
port = 995
ssl = yes
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
mode = 0666
user = postfix
group = postfix
}
}
service auth {
# Postfix smtp-auth
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user=postfix
group=postfix
}
}
/etc/dovecot/conf.d/10-auth.conf:
disable_plaintext_auth = yes
auth_mechanisms = plain login
#!include auth-system.conf.ext
#!include auth-sql.conf.ext
#!include auth-ldap.conf.ext
!include auth-passwdfile.conf.ext
#!include auth-checkpassword.conf.ext
#!include auth-vpopmail.conf.ext
#!include auth-static.conf.ext
/etc/dovecot/conf.d/auth-passwdfile.conf.ext:
passdb {
driver = passwd-file
args = scheme=PLAIN username_format=%u /etc/dovecot/dovecot-users
}
userdb {
driver = static
# args = username_format=%u /etc/dovecot/dovecot-users
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
# Default fields that can be overridden by passwd-file
#default_fields = quota_rule=*:storage=1G
# Override fields from passwd-file
#override_fields = home=/home/virtual/%u
}
/etc/dovecot/conf.d/10-ssl.conf:
# SSL/TLS support: yes, no, required. <doc/wiki/SSL.txt>
ssl = required
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
postconf-n:
postconf: warning: /etc/postfix/main.cf, line 23: overriding earlier entry: smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
postconf: warning: /etc/postfix/main.cf, line 24: overriding earlier entry: smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
alias_database = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = theresults.ru, 31143.simplecloud.club, localhost.simplecloud.club, localhost
myhostname = mail.theresults.ru
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/dovecot.pem
smtpd_tls_key_file = /etc/ssl/private/dovecot.pem
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_mailbox_domains = /etc/postfix/virtual_mailbox_domains
virtual_transport = lmtp:unix:private/dovecot-lmtp