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.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

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.

  • Looks like you missed a trailing dot, it should read

    define(`MAIL_HUB', `SameVPSDomain.ext.')dnl
    define(`LOCAL_RELAY', `SameVPSDomain.ext.')dnl
    
Submit an Answer