views:

24

answers:

1

We are using sendmail to send mails from our web app and we do not need to receive emails. Only our machine should be able to send emails from the sendmail server.

What's the best way to make sure sendmail is running secure on our server. Again, we only need to be able to send mails using php's mail() function, nothing more.

A: 

The simplest solution is probably just shut down port 25 via iptables.

Sendmail should still send mail out, but iptables will block any incoming connections, so there will be no way for anyone outside to send mail to local users.

timdev
thanks, what port is used to send mail out?
Jorre
there's no way to tell that. Sendmail will use some random, high, port number to make an outgoing connection (just like a browser or most other applications playing the role of "client")
timdev