We have a virtualmin server running on Centos 7. It was working well up until two weeks ago, at which point it would no longer send emails. The same time, we had added new domains to the server with their own IP’s.
- All servers have email disabled during creation, we only want this server to send emails, not receive.
- We have setup MX rules in the BIND DNS Server indicating that mail deliveries sending from the server to local domains would be rerouted to external (google) mail servers to be delivered. This corrected an issue where the sendmail server would not send emails to customer service agents at the company who have an email address with a domain associated with the server.
Using CLI:
echo “Subject: sendmail test” | sendmail -v mypersonalemail@gmail.com
mail is delivered successfully and received
echo “Subject: sendmail test” | sendmail -v [user]@[domain “A” hosted on server]
mail is not delivered.
/var/log/maillog
Aug 9 17:13:53 prod2 postfix/smtp[36084]: connect to domain"A"[external ip associated with domain]:25: Connection timed out
Aug 9 17:13:53 prod2 postfix/smtp[36084]: 7D8FE168453: to=<user]@[domain hosted on server]>, relay=none, delay=562, delays=532/0.07/30/0, dsn=4.4.1, status=deferred (connect to domain"A"[external ip associated with domain]:25: Connection timed out)
Domain “A” has BIND DNS settings set for the MX record to shoot emails to google servers.
The problem seems to be that the server is not reading this MX record. I confirmed this with the host command:
[root@prod2 ~]# host -t MX Domain “A”
Domain “A” has no MX record
I have researched and come across how to troubleshoot BIND DNS issues and Postfix issues, but nothing actually tells me how to correct this. There are 9 virtual servers on this box (likely all have the same issue, the 3 largest ones have constant entry’s in the maillog) if it makes a difference and has some light modifications (PHP 7.2, mariadb 10.2, etc…).
Please help me fix this. Thanks in advance!