Trying to send mail from my centOS 7 server but they are failing. Below is an extract from the mail with what i think is the cause but im not sure how to fix. I believe i have the correct setup in my hosts file but could be mistaken.NOTE: I have substituted my email address for email@myaddress.com.The maillog has stat=sent as well.The original message was received at Tue, 29 Nov 2016 10:46:18 GMTfrom localhost [127.0.0.1]   ----- The following addresses had permanent fatal errors -----<email@myaddress.com>    (reason: 550 Host unknown)   ----- Transcript of session follows -----550 5.1.2 <email@myaddress.com>... Host unknown (Name server: myaddress.com: host not found)Edit#/usr/sbin/sendmail -d8.20 -bv email@myaddress.com  Warning: OperatorChars is being redefined.           It should only be set before ruleset definitions.  Warning: OperatorChars is being redefined.           It should only be set before ruleset definitions.  Warning: OperatorChars is being redefined.           It should only be set before ruleset definitions.  dns_getcanonname(myaddress.com, trymx=1)  dns_getcanonname: trying myaddress.com. (AAAA)      YES  dns_getcanonname: trying myaddress.com. (AAAA)      YES  dns_getcanonname: trying myaddress.com. (AAAA)      YES  dns_getcanonname: trying myaddress.com. (AAAA)      YES  dns_getcanonname: trying myaddress.com. (AAAA)      YES  dns_getcanonname: trying myaddress.com. (AAAA)      YES  dns_getcanonname: trying myaddress.com. (AAAA)      YES  dns_getcanonname: trying myaddress.com. (AAAA)      YES  dns_getcanonname: trying myaddress.com. (AAAA)      YES  dns_getcanonname: trying myaddress.com. (AAAA)      YES  dns_getcanonname: trying myaddress.com. (AAAA)      YES  dns_getcanonname: trying myaddress.com. (AAAA)      YES  email@myaddress.com... deliverable: mailer local, user email  
Mail failed to send 550 unknown host
dns;sendmail
I have it working now. For the benefit of others this is what i did:uninstalled sendmail and sendmail-cf so i could start freshyum remove sendmail sendmail-cfinstall them fresh againyum install sendmail sendmail-cfedit /etc/mail/sendmail.mcset the LOCAL_DOMAIN option to your machine hostname  LOCAL_DOMAIN(`example.com')dnlnext runmake -C /etc/mailedit /etc/hosts127.0.0.1 hostname hostname.domainname172.16.213.146(my internal ip) hostname hostname.domainname domainname  edit /etc/sysconfig/network HOSTNAME should equal your machine hostnamefinally runservice sendmail restartThis is what worked for me on my vm server, there may be uneccassary steps here and i cant explain them but it made it work. Thanks for everyones input.