Roundcube 无法检索电子邮件,但 Maildir 中可以找到电子邮件

Roundcube 无法检索电子邮件,但 Maildir 中可以找到电子邮件

我有一个 Postix + Dovecot 电子邮件服务器,但遇到了一些小问题。我可以从 roundcube 发送电子邮件(或使用终端中的 mail-utils),也可以接收电子邮件(我可以在我的 Maildir/cur 目录中看到它们),但我的 roundcube 邮件界面总是显示空的收件箱邮件。

每封收到的电子邮件在 roundcube 界面上都不可用,但它们在我的 Maildir 目录中。这将是一个路径问题,但我找不到在哪里。

这是我的 Postfix main.cf 文件配置:

# TLS parameters
smtpd_tls_cert_file = /path/to/my/folder
smtpd_tls_key_file = /path/to/my/folder
smtpd_tls_CAfile = /path/to/my/folder
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_protocols = !SSLv2, !SSLv3, TLSv1.1, TLSv1.2
smtpd_tls_ciphers = high
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, TLSv1.1, TLSv1.2
smtpd_tls_mandatory_ciphers = high
smtpd_tls_auth_only = yes

#######
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, TLSv1.1, TLSv1.2
smtp_tls_mandatory_ciphers = high
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, TLSv1.1, TLSv1.2
smtp_tls_mandatory_ciphers = high
smtp_tls_security_level = may
smtp_tls_CApath = /path/to/my/folder

#######
tls_high_cipherlist = HIGH:!aNULL:!MD5:!ADH:!RC4:!DH

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = myhostname
masquerade_domains = $mydomain
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
home_mailbox = Maildir/
mydomain = mydomain.com
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
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_security_level = may
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
virtual_alias_domains = $mydomain
virtual_alias_maps = mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf, mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf, mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_non_fqdn_helo_hostname,reject_invalid_helo_hostname,reject_unknown_helo_hostname
disable_vrfy_command = yes
smtpd_delay_reject = yes
virtual_mailbox_domains = mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf, mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp
milter_protocol = 6
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
milter_default_action = accept
smtpd_milters = inet:127.0.0.1:11332
non_smtpd_milters = inet:127.0.0.1:11332

这是我的 Dovecot 10-mail.conf 文件配置:

mail_location = maildir:/var/mail/vmail/%d/%n
mail_location = mbox:~/mail:INBOX=/var/mail/%u
namespace inbox {
inbox = yes
}

mail_uid = vmail
mail_gid = vmail
mail_privileged_group = vmail

first_valid_uid = 2222
last_valid_uid = 2222
mail_plugins = quota

protocol !indexer-worker {
}

以下是接收电子邮件时 mail.log 的日志:

Aug 20 10:23:21 mx01 postfix/smtpd[19642]: connect from mail-oln040092066066.outbound.protection.outlook.com[40.92.66.66]
Aug 20 10:23:21 mx01 postfix/smtpd[19642]: Anonymous TLS connection established from mail-oln040092066066.outbound.protection.outlook.com[40.92.66.66]: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)
Aug 20 10:23:21 mx01 postfix/trivial-rewrite[19648]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_alias_domains
Aug 20 10:23:21 mx01 postfix/trivial-rewrite[19648]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_mailbox_domains
Aug 20 10:23:21 mx01 postfix/smtpd[19642]: 7302821751: client=mail-oln040092066066.outbound.protection.outlook.com[40.92.66.66]
Aug 20 10:23:21 mx01 postfix/cleanup[19649]: 7302821751: message-id=<PR2PR03MB51467D300790BA8A85B1635F93AB0@PR2PR03MB5146.eurprd03.prod.outlook.com>
Aug 20 10:23:21 mx01 postfix/qmgr[14704]: 7302821751: from=<[email protected]>, size=5685, nrcpt=1 (queue active)
Aug 20 10:23:21 mx01 postfix/trivial-rewrite[19648]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_alias_domains
Aug 20 10:23:21 mx01 postfix/trivial-rewrite[19648]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_mailbox_domains
Aug 20 10:23:21 mx01 postfix/trivial-rewrite[19648]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_alias_domains
Aug 20 10:23:21 mx01 postfix/trivial-rewrite[19648]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_mailbox_domains
Aug 20 10:23:21 mx01 postfix/local[19651]: 7302821751: to=<[email protected]>, relay=local, delay=0.48, delays=0.45/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
Aug 20 10:23:21 mx01 postfix/qmgr[14704]: 7302821751: removed
Aug 20 10:23:21 mx01 postfix/smtpd[19642]: disconnect from mail-oln040092066066.outbound.protection.outlook.com[40.92.66.66] ehlo=2 starttls=1 mail=1 rcpt=1 bdat=1 quit=1 commands=7

连接到我的 roundcube 帐户时的 Mail.log 文件:

Aug 20 11:25:22 mx01 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20772, secured, session=<IIApCYmQzKV/AAAB>
Aug 20 11:25:22 mx01 dovecot: imap([email protected])<20772><IIApCYmQzKV/AAAB>: Logged out in=82 out=676 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Aug 20 11:25:22 mx01 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20774, secured, session=<ghcrCYmQ0KV/AAAB>
Aug 20 11:25:22 mx01 dovecot: imap([email protected])<20774><ghcrCYmQ0KV/AAAB>: Logged out in=70 out=697 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Aug 20 11:25:22 mx01 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20780, secured, session=<PxQxCYmQ1KV/AAAB>
Aug 20 11:25:22 mx01 dovecot: imap([email protected])<20780><PxQxCYmQ1KV/AAAB>: Logged out in=156 out=819 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Aug 20 11:25:22 mx01 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20781, secured, session=<8WAxCYmQ1qV/AAAB>
Aug 20 11:25:22 mx01 dovecot: imap([email protected])<20781><8WAxCYmQ1qV/AAAB>: Logged out in=76 out=667 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0

如果您需要更多配置,请随时询问!

相关内容