Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Why are you surprised that sendmail is sending email? That's what it's supposed to do. Are you sure it's relaying? –  symcbean Jul 16 '12 at 15:16
    
I know :-) I just want to understand how it sends the email without ever configuring it. Aaron and MadHatter have answered it nicely!! –  edotan Jul 16 '12 at 20:11
    
If it's relaying email without you configuring it to do so then something is veryamiss –  symcbean Jul 16 '12 at 23:10

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
Thank you so much!!! –  edotan Jul 16 '12 at 20:23

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 for

tcp        0      0 127.0.0.1:25               0.0.0.0:*                   LISTEN      

If that fourth column says 0.0.0.0:25, you may have more of a problem.

share|improve this answer
    
Thanks as well!!! –  edotan Jul 16 '12 at 20:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.