2

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.

3
  • 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, 2012 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, 2012 at 20:11
  • If it's relaying email without you configuring it to do so then something is veryamiss
    – symcbean
    Jul 16, 2012 at 23:10

2 Answers 2

1

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.

0
2

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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .