0

We have a Ruby application hosted on an AWS Instance. We are sending emails from our application using the following setting in our code to send emails from our front end,

ActionMailer::Base.smtp_settings = { :enable_starttls_auto => true, #this is the important shit!

:address => 'smtp.gmail.com',

:port => 587,

:domain => 'www.gmail.com',

:authentication => :plain,

:user_name => 'support@exampleabc.com',

:password => '***************' }

With this, few of our emails are reaching the "spam" at the receiver end. Please suggest us if we can avoid this by setting a "SPF" record in our DNS file.

Thanks!

Big Data
  • 114
  • 2
  • 11
  • 1
    The Google Apps setup process specifically requests you to set up an SPF record. You're saying that you haven't done it, and you're asking us whether it's a good idea? *Of course* it's a good idea. – Skyhawk Jun 29 '13 at 16:31
  • Just a note: Gmail will cap the number of e-mails you send like this. Don't count on Gmail SMTP for any sort of high-volume sending. Use something like SendGrid, Mandrill, etc. for that. – ceejayoz Jun 29 '13 at 17:10

2 Answers2

1

If your domain already has an SPF policy configured - SPF check failure will most likely land your message in the SPAM bucket. But if was recognized as SPAM without any SPF policy - setting up an SPF record would not help. By default passing an SPF check has almost zero weight in spamassassin and other SPAM filters. The purpose of SPF is not to magically make all your outgoing mail into HAM but to help recognize anyone trying to impersonate you as SPAM.

You need to find the real reason why your mail ends up in the SPAM folder.

I would set up another mail server with a spam filter and send a test email to that server. In the logs you will be able to see exactly which SPAM tests your message has failed.

Alex P.
  • 650
  • 4
  • 7
0

Good spam filters use Bayesian Filtering to detect spam, so for best results you should update the question with the text of your email.

Also, is your 'From' address a gmail.com address? If not, that might land you in some junk folders. That's one check they do to see if an email might be spam.

MDMoore313
  • 5,581
  • 6
  • 36
  • 75
  • Yes, Our 'From' address is a Google Apps Email Address that belongs to our Domain. We have a Google Apps account for our Domain. – Big Data Jun 29 '13 at 12:46
  • Not all our Emails from our application are reaching the 'SPAM' at the receiver end, only few of our emails are reaching the 'SPAM' at the receiver end. – Big Data Jun 29 '13 at 12:48
  • Then there's probably not much you can do about that, you can try running tests to reproduce the issue, and try to find out why they're landing in spam. Sometimes, a user marks one of your emails as junk, and *any email from that sender* is later classified as junk by the mail client. – MDMoore313 Jun 29 '13 at 12:49