Sending mail through local MTA while domain MX records point to Google Apps
Posted
by
Assaf
on Server Fault
See other posts from Server Fault
or by Assaf
Published on 2011-03-12T06:57:35Z
Indexed on
2011/03/12
8:11 UTC
Read the original article
Hit count: 320
My domain's email is managed by Google Apps, so that domain users get Gmail and Calendar, etc. But I also want to be able to send applicative notifications to users outside the domain via email (e.g. "some commented on your post", and so on). However, if I try to send email through code I get blocked by Gmail after a few emails.
I send marketing email through MailChimp, to minimize the risk of appearing as spam to my users (one-click unsubscribe, etc.). But I can't send applicative message in this way.
I want to install a local MTA (my server runs Ubuntu), but I'm not sure what anti-spam measures I need to implement so that receiving MTAs don't think it's a spam server. What's stopping anyone from setting up a mail server and sending emails using my domain name? AFAIK it's the DNS records that show the MTA's address actually belongs to the domain. But my understanding of this is rather superficial, so someone please correct me if I'm wrong.
But what sort of DNS configuration do I need to put in place so that I don't get blacklisted (assuming I don't actually spam anyone)? The MX records already point to Google, and I'd like to keep it this way. So do I just need to define an A record for my internal mail server? Should it show email as coming from a sub-domain, so as not to conflict with the bare domain being managed by google?
Edit:
Does the following SPF record make sense if I want email from my domain name to be sent by either google's servers or any server with a dns name ending with mydomain.com
?
"v=spf1 ptr mx:google.com mx:googlemail.com ~all"
How should I set up reverse DNS for my server? If I have an A record that points mailsender.mydomain.com
to my MTA's ip address, does it mean that reverse lookup will only allow emails sent from address@mailsender.mydomain.com?
© Server Fault or respective owner