By jmiller
I’ve got a droplet running a site (let’s call it example.com). For a variety of historical reasons, the site’s domain is registered at Dreamhost, which is currently providing the domain’s DNS and mail service. This is working fine EXCEPT that the site (based on Drupal 7) is not able to send mail to an address at example.com – when I track /var/log/maillog, Postfix reports that the attempt to send fails because of an unknown user (yes, the user really exists in the Dreamhost mail system); this happens both when Drupal (php, really) tries to send mail and when I manually send mail from the shell via mailx. Outgoing mail from the site is in fact working, by the way; I can send to addresses other than example.com via both php and mailx. Finally, I’m not running a DNS server as part of the droplet.
So:
(1) How do I get the site to understand where its mail server is? I’d like to leave the mail service at Dreamhost for now, but I’m open to moving the DNS service to DigitalOcean if that makes things easy/possible.
(2) Once mail is working, I’ll want to set up SPF records for the domain. I guess it’ll be obvious where/how to do that, but that will be an issue down the road.
Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Is the name of your DO server example.com? Are you using the standard install for whatever email server is running on your DO site. Does that mail server therefore think that It is handling email for the domain example.com? I suspect that you’re not talking to the DreamHost email servers at all, because the email server on the DO host thinks it is handling email for example.com, and tries to deliver the email locally. <br>
Yes, I think you’re exactly right – the DO host incorrectly thinks that it’s handling mail for example.com (even though doing “dig example.com mx” comes up with the Dreamhost servers). So: how do I convince the DO host that Dreamhost should be handling the domain’s mail services?
<b>"Outgoing mail from the site is in fact working, by the way; I can send to addresses other than example.com via both php and mailx.</b> <br> <br>Wouldn’t that suggest that the problem lies with Dreamhost and <i>not</i> the DigitalOcean droplet? Perhaps you need to add an SPF record, at Dreamhost, to authorize the droplet to send mail on behalf of “example.com.”
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.