Help with SMTP server


New Member
Apr 27, 2017
Reaction score
I have a an Ubuntu 16.04 that a customer has built. They went ahead and installed mailutils using apt-get. They set up the domain, and can send emails to any domain but the domain the specified during the install. When I looked at this it appears that the emails never left the server. What do I need to do to get this working?

Mail servers aren't my area of expertise, but as nobody else has attempted to answer this - I'll try to help out if I can.

First up, have you checked the system logs for any errors/warnings from any of the programs in mailutils? That might help you to narrow-in on the cause of the problem.
Go to /var/log and run a few grep commands. Try searching for anything relating to mail, or perhaps even the word fail.
sudo grep -Ri mail ./
See what output that throws at you. It may yield some clue as to what is going on.

Otherwise, is there any chance you can post any of the settings for the server? e.g. /etc/hosts, configs for mailutils, ssmtp and/or any other settings that you feel are relevant. Perhaps also any firewall rules that have been set-up.....Obviously anonymise whatever private information you can. I don't need to see any sensitive information. But without seeing a bit about how the server and the rest of the environment is configured, I can only make vague guesses.

Speaking of vague guesses - Is it possible that this is some DNS related problem? Because from what you describe, it sounds like the mail-server can use DNS to successfully resolve the IP addresses for external domains and send mail to them. But for some reason - it cannot resolve the IP address for its own domain, so cannot send anything to users on that domain.....

Is the mail server assigned a static IP address that is assigned each time the machine starts? or is it automatically/dynamically allocated via DHCP?

If the IP is automatically set, it's possible that the IP for the server will change any time it is re-started. In which case, the IP address for the server in /etc/hosts may be incorrect. Which might account for the failure to send to that domain.

If this is the case, then two ways around that would be:
1. Set up your router to assign the server a fixed IP and ensure that /etc/hosts contains the correct IP for the server
2. Write a script that runs on startup which will set the correct IP in /etc/hosts AFTER the IP has been allocated by DHCP.

Or perhaps it could be something in the configuration of DHCP itself? IDK!

I think that's about all I can come up with off the top of my head....

Members online