Running Sendmail as a Local Delivery Agent

At work, I had to turn off Sendmail on my servers in order to be alowed to relay mail through the company's servers. They do this so that you don't open up your server to allow people to relay through you and then through the company's servers. So, I turned off sendmail by :

# cd /etc/mail
# make stop
Stopping: sendmail sendmail-clientmqueue.

And then I edited /etc/rc.conf and added:


Problem solved! However, I checked my server the next day and normally every night the root account receives 2 or 3 automated emails going over security and email and other things. These didn't get delivered. It turns out that I needed to enable sendmail but as a local delivery agent only. Don't listen on port 25 externally. I edited /etc/rc.conf:


And then went back to /etc/mail and started up sendmail again:

# cd /etc/mail
# make start
Starting: sendmail sendmail-clientmqueue.

Telnetting to port 25 from outside received connection denied but my internal automated email were working again.