我的邮件被发送到 Google 的垃圾邮件文件夹

发布于 2024-11-15 23:01:54 字数 1907 浏览 3 评论 0原文

我刚刚设置了我的网络服务器、rails 应用程序、postfix 和 dovecot。当我测试邮件程序时,它工作正常,但 Gmail 会自动将我发送的邮件放入其垃圾邮件文件夹中。

我检查了 Spamhaus 列表中的 IP 地址,但什么也没有,我检查了邮件日志,没有什么令人惊讶的……

任何人都可以为我提供指导,告诉我我还应该寻找什么吗?

谢谢!

更新

这里是邮件标题:

Delivered-To: [email protected]
Received: by 10.52.113.230 with SMTP id jb6cs31694vdb;
        Sat, 18 Jun 2011 05:42:32 -0700 (PDT)
Received: by 10.227.198.133 with SMTP id eo5mr3183668wbb.38.1308400951575;
        Sat, 18 Jun 2011 05:42:31 -0700 (PDT)
Return-Path: 
Received: from mail.example.com (mail.example.com [123.45.678.910])
        by mx.google.com with ESMTP id fs8si5078709wbb.140.2011.06.18.05.42.29;
        Sat, 18 Jun 2011 05:42:30 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of [email protected] designates 123.45.678.910 as permitted sender) client-ip=123.45.678.910;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of [email protected] designates 123.45.678.910 as permitted sender) [email protected]
Received: from example.com (localhost.localdomain [127.0.0.1])
    (Authenticated sender: [email protected])
    by mail.example.com (Postfix) with ESMTPA id CCB602AFCF
    for ; Sat, 18 Jun 2011 14:42:29 +0200 (CEST)

I've just set up my webserver, rails app, with postfix, and dovecot. When I'm testing the mailer it works fine, but Gmail is automatically putting my sent mail into it's spam folder.

I checked the Spamhaus list for my IP address and nothing, I checked the mail log, and there is nothing surprising there ...

can anyone offer me guidance for what else I should be looking for?

Thanks!

update

here is the mail header:

Delivered-To: [email protected]
Received: by 10.52.113.230 with SMTP id jb6cs31694vdb;
        Sat, 18 Jun 2011 05:42:32 -0700 (PDT)
Received: by 10.227.198.133 with SMTP id eo5mr3183668wbb.38.1308400951575;
        Sat, 18 Jun 2011 05:42:31 -0700 (PDT)
Return-Path: 
Received: from mail.example.com (mail.example.com [123.45.678.910])
        by mx.google.com with ESMTP id fs8si5078709wbb.140.2011.06.18.05.42.29;
        Sat, 18 Jun 2011 05:42:30 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of [email protected] designates 123.45.678.910 as permitted sender) client-ip=123.45.678.910;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of [email protected] designates 123.45.678.910 as permitted sender) [email protected]
Received: from example.com (localhost.localdomain [127.0.0.1])
    (Authenticated sender: [email protected])
    by mail.example.com (Postfix) with ESMTPA id CCB602AFCF
    for ; Sat, 18 Jun 2011 14:42:29 +0200 (CEST)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

如果没结果 2024-11-22 23:01:54

我要检查的第一件事是电子邮件中的 :from valueconfig.action_mailer.smtp_settings 中的 :user_name 相同,

如下举个例子,注意 '[电子邮件受保护]'

# config/development.rb
config.action_mailer.smtp_settings = {
    :address              => "smtp.gmail.com",
    :port                 => 587,
    :domain               => 'gmail.com',
    :user_name            => '[email protected]',
    :password             => SECRET[:email_password],
    :authentication       => 'plain'
    # :enable_starttls_auto => true  
  }  

# app/mailers/user_mailer.rb
class UserMailer < ActionMailer::Base

  default :from => "[email protected]"  

  def welcome_email(user)
    @user = user
    mail(:to => user.profile.email,
         :subject => "Registration Successful")
  end
end

The first thing I would check is that your :from value in the email is the same of the :user_name in config.action_mailer.smtp_settings

Here's an example, notice '[email protected]'

# config/development.rb
config.action_mailer.smtp_settings = {
    :address              => "smtp.gmail.com",
    :port                 => 587,
    :domain               => 'gmail.com',
    :user_name            => '[email protected]',
    :password             => SECRET[:email_password],
    :authentication       => 'plain'
    # :enable_starttls_auto => true  
  }  

# app/mailers/user_mailer.rb
class UserMailer < ActionMailer::Base

  default :from => "[email protected]"  

  def welcome_email(user)
    @user = user
    mail(:to => user.profile.email,
         :subject => "Registration Successful")
  end
end
讽刺将军 2024-11-22 23:01:54

您可能需要使用自定义域。你?理论上,任何人都可以设置自定义邮件服务器并发送垃圾邮件,这可能就是发生这种情况的原因。

另外,请确保不要在标题中添加任何过于奇怪的内容。

You may need to use custom domain. Do you? In theory anyone can set up custom mail server and send spam, and probably that's why it happens.

Also, be sure to not put anything too outlandish into headers.

难如初 2024-11-22 23:01:54

我发现您的电子邮件没有 DKIM,这也可能是将电子邮件放入垃圾邮件的原因之一,或者可能是由于 IP 声誉或域声誉。

您可以此处检查 IP 和域名信誉是否列入黑名单

i see that your email didnt had DKIM that can be also one reason of putting email in spam or maybe due to ip reputation or domain reputaion.

You can check if the ip and domain reputaion for blacklist here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文