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.
echo "Subject: sendmail test" | sendmail -v firstname.lastname@example.org
mail is delivered successfully and received
echo "Subject: sendmail test" | sendmail -v [user]@[domain "A" hosted on server]
mail is not delivered.
Aug 9 17:13:53 prod2 postfix/smtp: connect to domain"A"[external ip associated with domain]:25: Connection timed out
Aug 9 17:13:53 prod2 postfix/smtp: 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!