用Foxmail收不到邮件,但是本地已经收到邮件

用Foxmail收不到邮件,但是本地已经收到邮件

maillog 没有显示任何错误。我看到我的 /home/mail/domain/www3/new 中有一封新邮件。我只是无法使用客户端或 telnet 110/143 阅读邮件。Dovecot info 日志似乎没有显示任何错误。我不知道该怎么办。一切都表明似乎没有问题。/etc/postfix/main.cf 有一些配置:

ssqueue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_interfaces = all
inet_protocols = all
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.10.1/samples
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
virtual_uid_maps = static:200 
virtual_gid_maps = static:12
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_authenticated_header = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
virtual_alias_maps = pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf 
virtual_mailbox_domains = pgsql:/etc/postfix/pgsql/virtual_domains_maps.cf 
virtual_mailbox_maps = pgsql:/etc/postfix/pgsql/virtual_mailbox_maps.cf 
virtual_mailbox_base = /home/mail 
relay_domains = $mydestination, proxy:pgsql:/etc/postfix/pgsql/relay_domains.cf
virtual_mailbox_limit = 512000000 
virtual_minimum_uid = 8
virtual_transport = virtual 
local_transport = virtual 
local_recipient_maps = $virtual_mailbox_maps 

dovecot.conf有一些配置:

dict {
#quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
 #expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}
!include conf.d/*.conf
mail_location = maildir:/home/mail/%u/
namespace inbox {
  type = private
  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 =
}
protocols = imap pop3 lmtp
ssl = no
login_greeting = mail.xxxxxx.com
auth_mechanisms = plain login
auth_debug = yes
auth_debug_passwords = yes
service auth {
  # Postfix smtp-auth
  unix_listener /var/spool/postfix/private/auth {
    mode = 0660
    user = postfix
    group = postfix
  }
  # Auth process is run as this user.
  user = postfix
  group = postfix
}
service imap {
    executable = imap
}
userdb {
    driver = sql
    args = /etc/dovecot/dovecot-sql.conf
}
passdb {
    driver = sql
    args = /etc/dovecot/dovecot-sql.conf
}
first_valid_uid = 200 
mail_uid = 200 
mail_gid = 12
disable_plaintext_auth = no
mail_plugins = $mail_plugins zlib
plugin {
    zlib_save_level = 6
    zlib_save = gz
}
protocol imap {
    mail_plugins = $mail_plugins imap_zlib
}
 mail_max_userip_connections = 50
log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot-info.log

dovecot-sql.conf有一些配置:

driver = pgsql
connect = host=localhost dbname=postfix user=postfix password=xxxxxxxx
default_pass_scheme = MD5-CRYPT
password_query = SELECT username AS user,password FROM mailbox WHERE username = '%u' 
AND active='1'
user_query = SELECT '/home/mail/' || maildir AS home, 200 as uid, 12 as gid FROM 
mailbox WHERE username = '%u' AND active = '1'

virtual_mailbox_maps 或其他类似的:

user = postfix
password = xxxxxxxx
hosts = localhost
dbname = postfix
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = true

其他配置应该无关紧要。有谁能帮帮我,因为所有的信息似乎都表明它们是正常的,但我无法得到预期的结果。谢谢。顺便说一下,我可以使用Foxmail发送邮件。maillog:

Mar 31 15:33:40 mail postfix/master[28261]: daemon started - 
version 2.10.1, configuration /etc/postfix
Mar 31 15:33:58 mail postfix/smtpd[28327]: connect from 
xmbg7.mail.xx.com[101.91.43.51]
Mar 31 15:33:58 mail postfix/smtpd[28327]: D0F0D1413AC: 
client=xmbg7.mail.xx.com[101.91.43.51]
Mar 31 15:33:59 mail postfix/cleanup[28335]: D0F0D1413AC: 
message-id=<[email protected]>
Mar 31 15:33:59 mail postfix/qmgr[28263]: D0F0D1413AC: from= 
<[email protected]>, size=2746, nrcpt=1 (queue active)
Mar 31 15:33:59 mail postfix/virtual[28337]: D0F0D1413AC: to= 
<[email protected]>, relay=virtual, delay=0.26, 
delays=0.24/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to 
maildir)

3 月 31 日 15:33:59 邮件 postfix/qmgr[28263]: D0F0D1413AC: 已删除

答案1

Dovecot 在以下位置搜索您的电子邮件邮件位置+用户名

mail_location = maildir:/home/mail/%u/

Postfix 的正常行为虚拟的送货代理是将它们存储在虚拟邮箱库+域+用户名 (文档在这里)就像你提到的:

I see a new email in my /home/mail/domain/www3/new

使用 postfix虚拟的作为交付代理不太实用。它缺少一个最关键的功能:配额。

我建议你使用 dovecot即时传输协议作为传送代理,因为 dovecot lmtp 具有更多功能。

如果你仍然想继续使用 postfix虚拟的递送代理确保您的 user_query 考虑到 maildir 位置的“域”部分。

相关内容