Hi, I’m using a thirdy part provider for email boxes and domain registration. From this provider I’ve redirected my domain to a DO VPS running Ubuntu 14.04. Using SENDMAIL if I send an email to xyzqwe@gmail.com (or @otherdomain.ext) all works great, but if I send an email to xyzqwe@SameVPSDomain.ext it doesn’t work. What is the problem? Why from DO droplet I cannot send email to a thirdy part email provider?? Thanks in advance.
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!
Hello,
This is happening most likely because your mail service thinks that mail sent to it’s own configured hostname is handled locally. To fix this, open the /etc/mail/sendmail.mc file with your favorite text editor. If you use vim:
vim /etc/mail/sendmail.mc
Then go and edit the following. I’m using the domain SameVPSDomain.ext, but you want to replace that with whatever your domain name is.
define(`MAIL_HUB', `SameVPSDomain.ext')dnl
define(`LOCAL_RELAY', `SameVPSDomain.ext.')dnl
Save that, then recompile things and restart sendmail with:
sendmailconfig
service sendmail restart
This should route mail from your domain using DNS and the MX records for SameVPSDomain.ext instead of routing it locally.
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.