I installed CentOS that I use as a webserver (Apache) and I also have the sendmail running on it.
I didn't change any configuration in my sendmail. It's currently set to the default settings.
I can send emails using my sendmail.
How is this possible? Is relaying in the default settings for sendmail? I'm missing something here.
sendmail on centos will by default listen on
127.0.0.1
(the loopback interface) and will happily accept email from the local system to remote addresses, and try to deliver them (they may not accept them, but that's a different matter). It's not relaying per se, because it will only accept email from the local system - you can't talk to any machine's loopback interface from anywhere but itself.If you want to verify that it's only listening on the loopback interface, do
netstat -an|grep -w 25|grep LISTEN
and look forIf that fourth column says
0.0.0.0:25
, you may have more of a problem.When sendmail receives e-mail on the localhost it will do a DNS lookup for the MX record of the receiving domain and try to deliver it. If the receiving side will accept mail from you, your host can send it.