Sendmail is pretty much the universal mail server for UNIX and Linux. It is everywhere. Expect to learn it if you even think about hosting a Linux server. The O'Reily Sendmail book is most valuable when taking on this task.
If you just built a Linux box and included Sendmail, you are almost ready to go. Just specify the domains that your Sendmail server is the endpoint for. Edit /etc/mail/local-host-names each domain should be specified on a single line:
# local-host-names domain1.com domain2.com friendsdomain.com
Then edit /etc/sysconfig/iptables and open the firewall to allow SMTP port 25. The line you need to add should look something like (all on one line):
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT
Sendmail by default listens only on the loopback interface (127.0.0.1), so it will accept no outside connections. You must edit /etc/mail/sendmail.mc Change this:
Generate sendmail.cf using the command below and restart sendmail:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Then set Sendmail to start automatically and start sendmail:
chkconfig sendmail on
Now you have a working mail server... No spam filtering capabilities and an administrator who has no idea how to configure and move forward. I guess you better keep reading!
Article last reviewed: 10/09/2006