Where should I add DKIM valid record and SPF valid record for verifying domains in mandrill - mandrill

I have followed mandrill guide to convert mandrill as mailChimp add-on. While doing this process, we need to verify the sending domains. To do that, we should create SPF and DKIM records. Could you please anyone guide me to add these records in DNS providers?

You can add this record in DNS Zone record.
Step 1: Login to your Domain purchase account
Step 2: Click on Edit DNS Zone record
Step 3: Add mandrill._domainkey as you create for a subdomain
Step 4: In Type the default option will be A change it to TXT
Step 5: In Data paste your text content
Step 6: Save the content
this will solve your issue.

Related

Is it possible to receive e-mail using Google Apps for Work (gmail) with a heroku domain?

I have a Google for Work account and I'm creating an e-mail address with my herokuapp domain (e.g. me#myapp.herokuapp.com). I have verified the domain by putting the meta tag in the header of my app. I can send e-mail through gmail from me#myapp.herokuapp.com but for some reason I can't receive e-mail. I'm curious what is causing the problem of the e-mail not going through.
If anyone has some insight, I would appreciate it. I know that it's possible to receive e-mail by using a custom domain in my heroku app, but I don't want to spend the money on a custom domain right now.
As mentioned by miketreacy, you would need to configure the DNS records for your herokuapp.com subdomain to point to the Google server.
This is not something Heroku allows you to do though. The only way you can send and receive emails from your app is with your own domain name.
Your MX records are not set to Google's. Currently, the MX records are listed as these. In order to receive emails at this domain - in your Apps account - you'll need to modify your DNS to match the MX records listed on Google's Support site.

How do I alternate domains for sending emails for my app running on Heroku with Sengrid Add-on?

So we are running a rails app on Heroku with the Sengrid add-on (free plan so no whitelabeling) (let's call it magicapp) and in our action mailer we always set the from field to be "noreply#magicapp.com". We have seen some of our email go to spam and someone suggested to us to try to alternate our email domain to improve deliverability.
So my questions are as follows:
What verification and checking goes on at the receiver side to verify that the email really is sent from "magicapp" and not just someone pretending to be magicapp?
Right now, when we send an email from "noreply#magicapp.com" the email says it's from "noreply#magicapp.com via sendgrid.me" so when receiver clients are doing spam checking, do they use my "magicapp.com" domain for reputation or the "sengrid" domain?
If it does use the "magicapp.com" domain, could I just set my from field in my action mailer to be a different domain such as "magicapp-mail.com"? Are there any potential issues to this or additional things to set up, like DNS etc? If I do this, will the receiver use the reputation of the magicapp-mail domain instead of magicapp then?
Any answers or information would be much appreciated, thanks!
I am pretty sure setting sendgrid's DKIM and SPF records properly will save your emails from being sent to spam. At least that's what worked in my app I was working on and emails ended in inbox, unless users hit Mark as spam instead of unsubscribe.
DKIM
DKIM stands for DomainKeys Identified Mail which was designed to help ISPs prevent malicious email senders by validating email from specific domains.
What a basic DKIM record should look like:
smtpapi._domainkey.yourdomain.com. | TXT or CNAME | value
smtpapi._domainkey.subdomain.yourdomain.com. | TXT or CNAME | value
TXT value: k=rsa; t=s; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDPtW5iwpXVPiH5FzJ7Nrl8USzuY9zqqzjE0D1r04xDN6qwziDnmgcFNNfMewVKN2D1O+2J9N14hRprzByFwfQW76yojh54Xu3uSbQ3JP0A7k8o8GutRF8zbFUA8n0ZH2y0cIEjMliXY4W4LwPA7m4q0ObmvSjhd63O9d8z1XkUBwIDAQAB
CNAME value: dkim.sendgrid.net
docs: https://sendgrid.com/docs/Glossary/dkim.html
SPF
Sender Policy Framework (SPF) is an email authentication standard developed by AOL that compares the email sender’s actual IP address to a list of IP addresses authorized to send mail from that domain. The IP list is published in the domain’s DNS record.
The DNS record should look like this:
yourdomain.com. | TXT | v=spf1 a mx include:sendgrid.net ~all
docs: https://sendgrid.com/docs/Glossary/spf.html
The key is your 2nd question. As long as you're not whitelabeled, the receiving server 'knows' the mail came from SendGrid, so it checks SendGrid for all DKIM & SPF records. SendGrid signs your mail with their own DKIM if you're not whitelabeled, so it all checks through.
"Alternating" the domain does not sound like a feasible way to avoid bulking of your mail. We're still in an IPv4 world, and IPs are still the main source of reputation tracking in the email world. No matter what domain your mail says it's "From", the receiving server knows what IPs gave it the mail (unless your domain is so bad it's blacklisted).
What does mail-tester.com say about your mail?

Mandrill- how to remove "mailed by mandrill app"

I was able to remove via asdfklsdj#ksjl.com etc from next to my email address that would appear to receiver of message from my email.
But if i expand i still see mailed by mandrill app. Is there a way to have to removed...
The Return-Path address for your emails is where things like bounces and other delivery events are sent. It's also known as the "envelope-from" or MAIL FROM address. (For Gmail users, the mailed-by header typically is generated from this address). You can customize the Return-Path domain used for your emails to change what's shown in Gmail. Instructions for this can be found in the Mandrill KB.
AFAIK there's no way to remove the "mailed by" in gmail. Mandrill must identify as the sending party and gmail is allowed to show it.
The best you can do is remove the 'via' using proper DKIM/SPF setup -- which it looks like you're already doing.
Yes, you can remove mandrillapp.com. Just follow the below steps.
Save the Return Path Domain in Mandrill
Go to Settings.
Choose Tracking & Return Path Domains.
Enter your subdomain and click Add.
Click Test DNS Settings to verify the settings for the subdomain you've added.
After that Go to Sending Default in Settings.
Set Return Path Domain as newly added Sub Domina.
Save these settings.
After that in header section you 'll see mailled-by value with the name of your subdomain.

Bad Authentication Error Rails connecting to google drive

I have a contacts controller which has a method to connect and save the data submitted from the form to a spreadsheet in my account on google drive (app/models/contact.rb):
def update_spreadsheet
connection = GoogleDrive.login(ENV["GMAIL_USERNAME"], ENV["GMAIL_PASSWORD"])
ss = connection.spreadsheet_by_title('Learn-Rails02-Example')
if ss.nil?
ss = connection.create_spreadsheet('Learn-Rails02-Example')
end
The method calls on environment variables I set up with figaro which are saved config/environments/development.rb as follows:
GMAIL_USERNAME: tgolsby#gmail.com
GMAIL_PASSWORD: Paxxword (obviously this is a place holder for my actual password in the .yml file)
When I submit my form I get the following error:
*GoogleDrive::AuthenticationError at /contacts
Authentication failed for tgolsby: Response code 403 for post https://www.google.com/accounts/ClientLogin: Error=BadAuthentication*
It points to the following line in the contacts model:
*def update_spreadsheet*
**connection = GoogleDrive.login(ENV["GMAIL_USERNAME"], ENV["GMAIL_PASSWORD"])**
*ss = connection.spreadsheet_by_title('Learn-Rails02-Example')
if ss.nil?
ss = connection.create_spreadsheet('Learn-Rails02-Example')
end*
I have checked and rechecked my username and password and am 100% sure they are correct in the application.yml file. I have gone through the tutorial and repeated all the steps but I just cant' figure out why the app is having trouble connecting to google. I have also checked that I don't have 2 step verification set up on my google account.
You might have the same issue I had. I was accessing my google doc using the google_drive gem on a personal project I had not touched in over a year. I used to be able to access my google doc by enabling a session using session = GoogleDrive.login('rosalyntest1#gmail.com', 'password') but was now getting the same error as you.
I logged into that account using my password and saw an email from google with a subject of "sign in blocked." I followed the link https://www.google.com/settings/security/lesssecureapps to enable less secure app access for that account only and was able to enable a session locally using the same code. I would check your google account and see if you received an email or enable less secure app access and try again.
The code is good (you can check it against the learn-rails example application). It looks exactly like the code from the Learn Ruby on Rails book.
That means the problem is a result of an environment or configuration issue.
First, are you running locally, or do you have the problems after deploying to Heroku?
If running locally, here are things you can try to troubleshoot:
1) Try restarting the web server. When you change configuration files, the server has to be restarted.
2) Replace ENV["..."] in the code and use the credentials directly ("hardcode the credentials"). Be careful not to check the code into the git repo with the hardcoded credentials (and don't push to GitHub because you would expose your credentials).
3) Can you send email from the application? Comment out the code that updates the spreadsheet and you should be able to send email if your credentials are correct.
I had this problem as well, and I was able to fix it by making the ENV["GMAIL_PASSWORD"] code in my contacts model all caps just as it is in my environment. It was not working when I only had the first letter caps in the code but everything in caps in the env variable, so be sure to consider the case sensitivity of your environments.

Setting up custom domained heroku app to send email from the domain's email address

So, I have a heroku app: severe-ocean-4908.herokuapp.com/
The app has a custom domain: www.volunteerhours.org that I purchased through godaddy
I have zerigo basic addon on my heroku app that hosts the heroku app under the domain name www.volunteerhours.org
Currently, the website sends email through gmail, but now I am trying to have it send email using the free email account info#volunteerhours.org
I have done some research online and have found some useful articles
Here are the links that I think talk about the setup that I am trying to do:
http://www.zerigo.com/docs/managed-dns/creating_your_first_domain
https://webmasters.stackexchange.com/questions/22523/enable-email-on-godaddy-when-using-zerigo-on-heroku-hosted-app
My Question
Currently, I am trying to add my email host in zerigo so that email.volunteerhours.org hosts to smptout.sercureserver.net...like mentioned in the first article
I am a beginner in Rails and I know that this question is not very specific or if this is the ideal/easy way to do it. Any help/comment is highly appriciated
Many Thanks,
You need to create a CNAME record in the Zerigo interface. The below screenshot on the Zerigo link provided shows where you need to do it.
Set the "host" as email, leave the TTL as the default (doesn't matter for your end of the CNAME record), set the type to CNAME and leave the priority blank.
The data field will need to be smptout.secureserver.net.
Note that you will also need to fill in the MX records for your domain, as per the GoDaddy documentation. Make sure to set email in the Host field for the MX records as this will be your mail domain.

Resources