我试图接收发送到sendgrid帐户的电子邮件。 所以我基本上有以下几点:
很好,所以我在该服务器上运行Nginx
,我希望能够将发送到@rallypodium.be
的电子邮件保存并存储在我的数据库中,这是在同一台DigitalOcean服务器上。
我已经设置了这样的Inbound Parse:
主持人:www.rallypodium.be 网址:http://www.rallypodium.be/inbound/parse/mail
我的域名是whitelabled。
我已经阅读了10次文档但仍然没有弄清楚我做错了什么。
这就是我存储它们的方式:
public function ReceiveMail(Request $request)
{
DB::table('email')->insert([
'headers' => $request->get('headers'),
'html' => $request->get('html'),
'from' => $request->get('from'),
'to' => $request->get('to'),
'cc' => $request->get('cc'),
'subject' => $request->get('subject'),
'dkim' => $request->get('dkim'),
'spf' => $request->get('spf'),
'envelope' => $request->get('envelope'),
'charsets' => $request->get('charsets'),
'spam_score' => $request->get('spam_score'),
'spam_report' => $request->get('spam_report'),
'attachments' => $request->get('attachments'),
'attachment-info' => $request->get('attachment-info'),
'attachmentX' => $request->get('attachmentX')
]);
return 'ok';
}
如果我查看活动源,那么我会看到:
错误消息如下:
电子邮件:robin@rallypodium.be
原因:错误拨打远程地址:拨打tcp 104.24.101.114:25:i / o timeout
SMTP-ID:< 1f7f313f27fd051b525581562e6af9b5@rallypodium.be>
处理过的字符串:2016年8月1日 - 下午06:53:45
MSGID:J1irmehmR_GELI7tIpPXNg.filter0810p1mdw1.1861.579F77CC27.0
哦,这是我的cloudflare DNS:http://prntscr.com/c0bjl8
有人可以帮帮我吗? 谢谢!
答案 0 :(得分:1)
您实际上是在尝试通过CloudFlare接收电子邮件,但遗憾的是CloudFlare doesn't proxy SMTP/email traffic。
相反,您需要添加灰色阴影记录来管理您的电子邮件,这样您的电子邮件就可以直接路由到您的来源而无需CloudFlare阻止它。请注意,灰色云端域可以显示您的IP地址,因此建议您将电子邮件服务器放在与Web服务器不同的服务器上;甚至更好地使用云电子邮件提供商并从中获取电子邮件。