[FreeBSD][Newb] How I use sendmail to send mail?

Toomas Aas toomas.aas at raad.tartu.ee
Mon Jun 11 07:56:03 UTC 2007


Bjorn Boulder wrote:

> Here is what I want:
> 
> 1. I want to send mail
> 2. I don't want to receive mail from the outside
> 3. I do want to receive mail from the box itself.

The default Sendmail configuration on FreeBSD should be
sufficient for what you want to do. You just need to start Sendmail the 
right way.

Make sure you have the following in /etc/rc.conf:
sendmail_enable="NO"

Then give this command:
/etc/rc.d/sendmail start

Now sendmail should start up, listening on loopback interface only. You can 
verify this with command:

sockstat -4

Among the output you should see this line:
root     sendmail   562   4  tcp4   127.0.0.1:25          *:*

Then try
telnet localhost 25
and make sure you get connected.

Additionally try
telnet yourserver 25
from another host and make sure you don't get connected.

I have one web server (FreeBSD 5.5) with sendmail set up this way.

-- 
Toomas Aas


More information about the freebsd-questions mailing list