为什么邮件没有出现在收件人的邮件池中?

为什么邮件没有出现在收件人的邮件池中?

我在 thunderbird 上运行了 postfix dovecot 和本地电子邮件系统。我在 ubuntu 上有两个用户,mailuser 1 和 mailuser 2,我把他们添加到了 thunderbird。一切顺利,只是用户在 thunderbird 的收件箱里没有任何内容,发送的邮件也收不到。

我也使用 maildir。检查 /var/log/mail.log 发现了这一点

正在发生的事情是:重新启动 postfix 和 dovecot,然后从一个用户向另一个用户发送邮件......

我相信这一行是问题所在

May 30 18:31:55 postfix/smtpd[12804]: disconnect from localhost[127.0.0.1]

为什么无法连接?可能是什么问题?

/var/log/mail.log

May 30 18:30:21 dovecot: imap: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
May 30 18:30:21 dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
May 30 18:30:21 dovecot: imap: Server shutting down. in=467 out=475
May 30 18:30:21 dovecot: config: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
May 30 18:30:21 dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
May 30 18:30:21 dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
May 30 18:30:21 dovecot: master: Dovecot v2.2.9 starting up (core dumps disabled)
May 30 18:30:54 dovecot: imap-login: Login: user=<mailuser2>, method=PLAIN, rip=::1, lip=::1, mpid=12638, TLS, session=<xUfQkaD66gAAAAAAAAAAAAAAAAAAAAAB>
May 30 18:31:04 postfix/master[12245]: terminating on signal 15
May 30 18:31:04 postfix/master[12795]: daemon started -- version 2.11.0, configuration /etc/postfix
May 30 18:31:55 postfix/postscreen[12803]: CONNECT from [127.0.0.1]:33668 to [127.0.0.1]:25
May 30 18:31:55 postfix/postscreen[12803]: WHITELISTED [127.0.0.1]:33668
May 30 18:31:55 postfix/smtpd[12804]: connect from localhost[127.0.0.1]
May 30 18:31:55 postfix/smtpd[12804]: 1ED7120EB9: client=localhost[127.0.0.1]
May 30 18:31:55 postfix/cleanup[12809]: 1ED7120EB9: message-id=<[email protected]>
May 30 18:31:55 postfix/qmgr[12799]: 1ED7120EB9: from=<[email protected]>, size=546, nrcpt=1 (queue active)
May 30 18:31:55 postfix/local[12810]: 1ED7120EB9: to=<mailuser2@mysitecom>, relay=local, delay=0.03, delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (delivered to maildir)
May 30 18:31:55 postfix/qmgr[12799]: 1ED7120EB9: removed
May 30 18:31:55 postfix/smtpd[12804]: disconnect from localhost[127.0.0.1]
May 30 18:31:55 dovecot: imap-login: Login: user=<mailuser1>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=12814, TLS, session=<sD9plaD6PgB/AAAB>

这是我的 postfix main.cf

 See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
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/private/ssl-cert-snakeoil.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
  # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
 # information on enabling SSL in the smtp client.
 smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated           
 defer_unauth_destination
 myhostname = server
 mydomain = mysite.com
 alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
 myorigin = $mydomain
 mydestination = mysite.com
 #relayhost = smtp.192.168.10.1.com
 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.10.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
home_mailbox = Maildir /
mailbox_command=

所有端口都在监听

tcp 0 0 *:imaps *:* LISTEN 
tcp 0 0 *:submission *:* LISTEN 
tcp 0 0 *:imap2 *:* LISTEN 
tcp 0 0 s148134.s148134.:domain *:* LISTEN 
tcp 0 0 192.168.56.101:domain *:* LISTEN 
tcp 0 0 10.0.2.15:domain *:* LISTEN 
tcp 0 0 localhost:domain *:* LISTEN 
tcp 0 0 *:ssh *:* LISTEN 
tcp 0 0 *:smtp *:* LISTEN 
tcp 0 0 localhost:953 *:* LISTEN 
tcp6 0 0 [::]:imaps [::]:* LISTEN 
tcp6 0 0 [::]:submission [::]:* LISTEN 
tcp6 0 0 [::]:imap2 [::]:* LISTEN 
tcp6 0 0 [::]:domain [::]:* LISTEN 
tcp6 0 0 [::]:ssh [::]:* LISTEN 
tcp6 0 0 [::]:smtp [::]:* LISTEN 
tcp6 0 0 localhost:953 [::]:* LISTEN 

答案1

首先,断开连接是正常的,这不是任何类型的错误。这是因为之前有一个成功交付:

May 30 18:31:55 postfix/local[12810]: 1ED7120EB9: to=<mailuser2@mysitecom>, relay=local, delay=0.03, delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (delivered to maildir)

请注意以下status=sent部分;就日志服务器的配置而言,这表明该消息已成功传递到其目标位置。在本例中,这是本地传递到 maildir spool,因此信息在某处等待被接走。

你需要做的是确认Postfix 正在将邮件消息多夫科特正在注视着什么。它们都可以配置为使用任意位置来存储邮件假脱机;两者必须相同,否则邮件看起来已被送达,但永远不会出现在 MUA 中。

在 Postfix 方面,$home_mailbox控制每个用户主目录下的传送位置。附加一个/选择“qmail 样式传送”;又称为 maildir。你在那里有一个空间;您可能应该更改 Postfix 配置,以便在读取时home_mailbox = Maildir/不添加斜杠前的空格。

在 Dovecot 方面,配置值mail_location选择查找邮件的目录。它支持~用户主目录的标准,并且必须指定邮件缓冲格式。因此在 Dovecot 中,您需要设置mail_location = maildir:~/Maildir(检查以确保只有一个这样的指令有效)。在我的 Debian Wheezy 系统上,这恰好是在 /etc/dovecot/conf.d/10-mail.conf 中配置的。

完成这些更改后,删除相关用户的任何现有邮件假脱机文件或目录,然后发送另一封电子邮件。Postfix 应该可以正常发送该邮件,然后可以通过 Dovecot 接收。

相关内容