By greasan
Hi,
sendmail is set up correctly. Emails arrive at email addresses other than my domain or host name.
Is it possible to ignore – or something like that – the local host/domain?
System: Ubuntu 15.04 with LEMP stack.
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!
Hi! I know this was posted a while ago but I hope this helps anyone who is experiencing the same issue and happens to come across this question in the future:
This happens by default because your domain name matches either your server’s hostname or a setting in sendmail’s config file. You can force sendmail to send emails to your actual mail server instead of itself by following these steps:
Edit /etc/mail/sendmail.mc and add the following lines at the end:
define(`MAIL_HUB', `domain.com.')dnl
define(`LOCAL_RELAY', `domain.com.')dnl
Make sure you including the trailing dot!
Run sendmailconfig so that the changes take effect, and restart sendmail just to be 100% sure:
sudo sendmailconfig
sudo service sendmail restart
Once you’ve done that, try sending an email to the same domain and you should see sendmail connecting to your domain’s incoming mailserver(s) in the log file.
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.