Possible Duplicate:
Configure Postfix to send/relay emails Gmail (smtp.gmail.com) via port 587

I have multiple drupal websites running on an Ubuntu slicehost vps. Naturally, that means that I have a fair number of domains pointing to my one slice. For some of those domains, we use the non-profit version of google apps for email.

I Followed Google's instructions for configuring DNS, so sending and receiving email from within our google apps accounts works just fine. The problem comes when we try to send email from our drupal sites. Generally, email simply doesn't get through. I think that I have trained my personal gmail inbox (which is NOT using google apps) to accept email coming from the vps, but no one else ever gets any of the emails.

What can I do to fix the problem?


You need to do research about email reputation. Things like SPF records. Check out senderscore.com. Your smtp server ip / sending domain could be on a blacklist. Check those as well


The blacklist problems do not apply with Google Apps. All mail is sent through their servers. You need to add googlemail as an allowed sender for your domain with spf records.

SPF Records:

example.com 14400 in TXT "v=spf1 include:aspmx.googlemail.com ~all"

example.com 14400 in TXT "v=spf1 a mx ip4:xxx.xxx.xx.xxx include:aspmx.googlemail

If your domains aren't configured to use ip addresses replace the second record with your FQDN

I don't have mail servers installed on my box that hosts WordPress sites and we use a plugin that forces all mail sent from WordPress through smtp (Google Apps). There is probably something similar available for Drupal.


Check out this page: http://drupal.org/node/266243

It includes 2 module suggestions for sending mail via SMTP instead of the local server's sendmail or postfix. That removes the need for figuring out all of the email reputation stuff, I think.

Not the answer you're looking for? Browse other questions tagged or ask your own question.