HMAIL 服务器没有收到来自 localhost 的邮件
Posted
技术标签:
【中文标题】HMAIL 服务器没有收到来自 localhost 的邮件【英文标题】:HMAIL server not receiving mails from localhost 【发布时间】:2021-12-15 06:07:16 【问题描述】:我正在使用 Windows 365 Business Cloud,我正在尝试在我的 Windows 上设置 hmail 服务器,但 Thunderbird 没有收到电子邮件,我在 windows365 上设置了 Hmailserver,并在 windows 控制面板的入站和出站规则上打开了端口,然后我使用 xampp 为 localhost 设置 php,并使用来自 Hmail 服务器的“collect@localhost.local”帐户连接 Thunderbird,我已经像这样配置了 *php.ini
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP=localhost
; http://php.net/smtp-port
smtp_port=25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = sender@localhost.local
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = C:/xampp/sendmail/sendmail.exe -t
但是当我使用 php 邮件功能时,电子邮件没有进入收件箱,这是什么原因,如果 windows365 不接受它自己的电子邮件从本地主机到本地主机,我可以更改端口并让 hmail 在其他地方收听或没有其他解决方法仅发送和接收本地主机。带有 php 的 localhost 邮件。我的 hmail 日志是这样的
"TCPIP" 10688 "2021-10-30 05:52:26.090" "TCP - 127.0.0.1 connected to 127.0.0.1:25."
"SMTPD" 10688 5 "2021-10-30 05:52:26.106" "127.0.0.1" "SENT: 220 CPC-JOSIE-RC-0T ESMTP"
"TCPIP" 2624 "2021-10-30 05:52:26.090" "TCP - 127.0.0.1 connected to 127.0.0.1:25."
"TCPIP" 4900 "2021-10-30 05:52:26.090" "TCP - 127.0.0.1 connected to 127.0.0.1:587."
"TCPIP" 11648 "2021-10-30 05:52:26.090" "TCP - 127.0.0.1 connected to 127.0.0.1:143."
"TCPIP" 6172 "2021-10-30 05:52:26.090" "TCP - 127.0.0.1 connected to 127.0.0.1:143."
"TCPIP" 8888 "2021-10-30 05:52:26.090" "TCP - 127.0.0.1 connected to 127.0.0.1:587."
"SMTPD" 10688 5 "2021-10-30 05:52:26.106" "127.0.0.1" "RECEIVED: EHLO we-guess.mozilla.org"
"SMTPD" 2624 9 "2021-10-30 05:52:26.106" "127.0.0.1" "SENT: 220 CPC-JOSIE-RC-0T ESMTP"
"IMAPD" 11648 13 "2021-10-30 05:52:26.121" "127.0.0.1" "SENT: * OK IMAPrev1"
"IMAPD" 6172 7 "2021-10-30 05:52:26.121" "127.0.0.1" "SENT: * OK IMAPrev1"
"SMTPD" 10688 5 "2021-10-30 05:52:26.121" "127.0.0.1" "SENT: 250-CPC-JOSIE-RC-0T[nl]250-SIZE 20480000[nl]250-AUTH LOGIN[nl]250 HELP"
"SMTPD" 2624 9 "2021-10-30 05:52:26.121" "127.0.0.1" "RECEIVED: EHLO we-guess.mozilla.org"
"IMAPD" 11648 13 "2021-10-30 05:52:26.121" "127.0.0.1" "RECEIVED: 1 CAPABILITY"
"IMAPD" 6172 7 "2021-10-30 05:52:26.121" "127.0.0.1" "RECEIVED: 1 CAPABILITY"
"SMTPD" 10688 5 "2021-10-30 05:52:26.121" "127.0.0.1" "RECEIVED: QUIT"
"SMTPD" 2624 9 "2021-10-30 05:52:26.121" "127.0.0.1" "SENT: 250-CPC-JOSIE-RC-0T[nl]250-SIZE 20480000[nl]250-AUTH LOGIN[nl]250 HELP"
"IMAPD" 11648 13 "2021-10-30 05:52:26.121" "127.0.0.1" "SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL NAMESPACE RIGHTS=texk[nl]1 OK CAPABILITY completed"
"IMAPD" 6172 7 "2021-10-30 05:52:26.121" "127.0.0.1" "SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL NAMESPACE RIGHTS=texk[nl]1 OK CAPABILITY completed"
"SMTPD" 10688 5 "2021-10-30 05:52:26.121" "127.0.0.1" "SENT: 221 goodbye"
"SMTPD" 2624 9 "2021-10-30 05:52:26.121" "127.0.0.1" "RECEIVED: QUIT"
"IMAPD" 11648 13 "2021-10-30 05:52:26.121" "127.0.0.1" "RECEIVED: 2 LOGOUT"
"IMAPD" 6172 7 "2021-10-30 05:52:26.121" "127.0.0.1" "RECEIVED: 2 LOGOUT"
"SMTPD" 2624 9 "2021-10-30 05:52:26.121" "127.0.0.1" "SENT: 221 goodbye"
"IMAPD" 11648 13 "2021-10-30 05:52:26.121" "127.0.0.1" "SENT: * BYE Have a nice day[nl]2 OK Logout completed"
"IMAPD" 6172 7 "2021-10-30 05:52:26.121" "127.0.0.1" "SENT: * BYE Have a nice day[nl]2 OK Logout completed"
"SMTPD" 8888 8 "2021-10-30 05:52:26.137" "127.0.0.1" "SENT: 220 CPC-JOSIE-RC-0T ESMTP"
"SMTPD" 8888 8 "2021-10-30 05:52:26.137" "127.0.0.1" "RECEIVED: EHLO we-guess.mozilla.org"
"SMTPD" 8888 8 "2021-10-30 05:52:26.137" "127.0.0.1" "SENT: 250-CPC-JOSIE-RC-0T[nl]250-SIZE 20480000[nl]250-AUTH LOGIN[nl]250 HELP"
"SMTPD" 8888 8 "2021-10-30 05:52:26.137" "127.0.0.1" "RECEIVED: QUIT"
"SMTPD" 8888 8 "2021-10-30 05:52:26.137" "127.0.0.1" "SENT: 221 goodbye"
"SMTPD" 4900 10 "2021-10-30 05:52:26.153" "127.0.0.1" "SENT: 220 CPC-JOSIE-RC-0T ESMTP"
"SMTPD" 4900 10 "2021-10-30 05:52:26.153" "127.0.0.1" "RECEIVED: EHLO we-guess.mozilla.org"
"SMTPD" 4900 10 "2021-10-30 05:52:26.153" "127.0.0.1" "SENT: 250-CPC-JOSIE-RC-0T[nl]250-SIZE 20480000[nl]250-AUTH LOGIN[nl]250 HELP"
"SMTPD" 4900 10 "2021-10-30 05:52:26.153" "127.0.0.1" "RECEIVED: QUIT"
"SMTPD" 4900 10 "2021-10-30 05:52:26.153" "127.0.0.1" "SENT: 221 goodbye"
"TCPIP" 11648 "2021-10-30 05:52:39.528" "TCP - 127.0.0.1 connected to 127.0.0.1:143."
"IMAPD" 11648 14 "2021-10-30 05:52:39.528" "127.0.0.1" "SENT: * OK IMAPrev1"
"IMAPD" 7248 14 "2021-10-30 05:52:39.528" "127.0.0.1" "RECEIVED: 28 capability"
"IMAPD" 7248 14 "2021-10-30 05:52:39.528" "127.0.0.1" "SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL NAMESPACE RIGHTS=texk[nl]28 OK CAPABILITY completed"
"IMAPD" 4900 14 "2021-10-30 05:52:39.528" "127.0.0.1" "RECEIVED: 30 login "collect@localhost.local" ***"
"IMAPD" 4900 14 "2021-10-30 05:52:39.544" "127.0.0.1" "SENT: 30 OK LOGIN completed"
"TCPIP" 11648 "2021-10-30 05:52:39.840" "TCP - 127.0.0.1 connected to 127.0.0.1:143."
"IMAPD" 11648 15 "2021-10-30 05:52:39.872" "127.0.0.1" "SENT: * OK IMAPrev1"
"IMAPD" 11648 14 "2021-10-30 05:52:39.934" "127.0.0.1" "RECEIVED: 31 logout"
"IMAPD" 11648 14 "2021-10-30 05:52:39.970" "127.0.0.1" "SENT: * BYE Have a nice day[nl]31 OK Logout completed"
"IMAPD" 7248 15 "2021-10-30 05:52:39.981" "127.0.0.1" "RECEIVED: 81 capability"
"IMAPD" 7248 15 "2021-10-30 05:52:39.997" "127.0.0.1" "SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL NAMESPACE RIGHTS=texk[nl]81 OK CAPABILITY completed"
"IMAPD" 8996 15 "2021-10-30 05:52:40.184" "127.0.0.1" "RECEIVED: 83 login "collect@localhost.local" ***"
"IMAPD" 8996 15 "2021-10-30 05:52:40.200" "127.0.0.1" "SENT: 83 OK LOGIN completed"
"IMAPD" 8996 15 "2021-10-30 05:52:40.200" "127.0.0.1" "RECEIVED: 84 capability"
"IMAPD" 8996 15 "2021-10-30 05:52:40.200" "127.0.0.1" "SENT: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL NAMESPACE RIGHTS=texk[nl]84 OK CAPABILITY completed"
"IMAPD" 8996 15 "2021-10-30 05:52:40.200" "127.0.0.1" "RECEIVED: 85 namespace"
"IMAPD" 8996 15 "2021-10-30 05:52:40.200" "127.0.0.1" "SENT: * NAMESPACE (("" ".")) NIL (("#Public" "."))[nl]85 OK namespace command complete"
"IMAPD" 8996 15 "2021-10-30 05:52:40.200" "127.0.0.1" "RECEIVED: 86 list "" "*""
"IMAPD" 8996 15 "2021-10-30 05:52:40.200" "127.0.0.1" "SENT: * LIST (\HasNoChildren) "." "INBOX"[nl]86 OK LIST completed"
"IMAPD" 4900 15 "2021-10-30 05:52:40.200" "127.0.0.1" "RECEIVED: 87 lsub "" "*""
"IMAPD" 4900 15 "2021-10-30 05:52:40.200" "127.0.0.1" "SENT: * LSUB (\HasNoChildren) "." "INBOX""
"IMAPD" 4900 15 "2021-10-30 05:52:40.200" "127.0.0.1" "SENT: 87 OK LSUB completed"
"IMAPD" 11648 15 "2021-10-30 05:52:40.216" "127.0.0.1" "RECEIVED: 88 list "" "#Public*""
"IMAPD" 11648 15 "2021-10-30 05:52:40.216" "127.0.0.1" "SENT: 88 OK LIST completed"
"IMAPD" 8888 15 "2021-10-30 05:52:40.216" "127.0.0.1" "RECEIVED: 89 lsub "" "#Public*""
"IMAPD" 8888 15 "2021-10-30 05:52:40.216" "127.0.0.1" "SENT: " ```
【问题讨论】:
【参考方案1】:好的,我通过检查 sendmail.ini 并将 smtp_server 更改为 localhost 解决了这个问题,它工作正常。
[sendmail]
; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
; run quicker, but you won't get error messages back to the calling
; application.
smtp_server=localhost
【讨论】:
以上是关于HMAIL 服务器没有收到来自 localhost 的邮件的主要内容,如果未能解决你的问题,请参考以下文章
在 localhost 上运行两台服务器时收到 CORS 错误
如何在android中调用localhost的webservice(来自wamp或xampp服务器)?
windows server 2012R2 部署安装 hmail