通过 Rails 应用程序从 postfix 发送的电子邮件将被发送到 gmail 中的垃圾邮件
当使用“mail”命令向 gmail 用户发送电子邮件时,电子邮件正常发送。使用 Rails 应用程序发送电子邮件时,电子邮件会被发送到 gmail 用户的垃圾邮件文件夹。有人可以帮我思考一下吗?
When using 'mail' command to send email to a gmail user, the email goes through fine. When sending an email using a Rails app, the email is sent to the spam folder for the gmail user. Can someone help me think through this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
电子邮件登陆垃圾邮件的原因有很多:
邮件服务器设置错误:检查此处了解如何设置
电子邮件内容:电子邮件内容也可能会引发垃圾邮件。像 SpamCheck 这样的网站可以帮助检查电子邮件的内容是否正确。
正如@Noli上面提到的,使用Sendgrid、Critsend 等用于发送电子邮件,将其放入收件箱的机会会更大。您可以将它们用作 Postfix 的中继服务器。但前两个步骤无论如何都是必要的。
如果您想向许多人发送电子邮件,例如:发送新闻通讯、营销电子邮件等,请使用 Mailchimp .
Emails landing in SPAM can happen due to many reasons:
Wrong Mail Server setup: Checkout here on how to setup
Email content: Content of the email can also invite SPAM. Sites like SpamCheck helps to check whether the content of the email is ok.
As mentioned by @Noli above, using services like Sendgrid, Critsend etc for sending out emails, chances of landing them in Inbox will be more. You can use them as relay servers from Postfix. But the first two steps are anyway necessary.
Use Mailchimp if you want to sent emails to many people, for eg: for sending out newsletters, marketing emails etc.
邮件的送达率非常难以保证。您应该考虑将其留给专家,例如 Sendgrid 或 Mailchimp,而不是花太多的开发时间去思考它
Mail deliverabillty is extraordinarily hard to get right. You should consider leaving this to the specialists like Sendgrid or Mailchimp, and not spend tooooo much development time thinking about it
另一件需要检查的事情是,如果这是新服务器,您可能需要设置域密钥来对 Gmail 进行身份验证。这发生在我身上,我可以通过以下操作将我的邮件从垃圾邮件文件夹中删除:
https: //help.ubuntu.com/community/Postfix/DomainKeys
https://help.ubuntu.com/community/Postfix/DKIM
Another thing to check is that if this is a new server, you may need to set up Domain Keys to authenticate to Gmail. This happend to me and I was able to get my mail removed from the spam folder by following these:
https://help.ubuntu.com/community/Postfix/DomainKeys
https://help.ubuntu.com/community/Postfix/DKIM