|Sendmail Setup Guide|
Joey's Sendmail Setup Guide
This guide has been around for about 5 years now and the last time it was updated previous to this update was in 2000. A lot has changed in the Linux world since then and I don't feel that this guide is really needed anymore.
The simplest way to set up Sendmail is to grab the sendmail package (rpm, deb) that came with your Linux installation and install it that way. One of the good things doing it this way is most distributions now have an automated update type of service so if someone finds a bug in sendmail your system can update to the latest version without having to download and recompile the source etc.
If you are running Sendmail on Red Hat
Linux you will have to edit the /etc/mail/sendmail.mc file so that
you can send and receive mail outside of your local network. Change the
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnlto this:
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnlThen run the following to regenerate your configuration file:
m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
Dont forget to add the following line to your /etc/hosts.allow file:
If you are interested in hiding your Sendmail version number from people who telnet to port 25, open up your sendmail.cf file with a text editor and change this:
O SmtpGreetingMessage=$j Sendmail $v/$Z; $bto this:
O SmtpGreetingMessage=$j $bAnd then restart sendmail.
For those of you who are interested in the original guide, here it is:
One of the pleasures of having Linux is being able to set up servers such as a web server and mail server. In order to set up a mail server you must have a vaild domain or a static IP. If you don't have a domain such as irule.com, then the next best setup is to use one of those dynip.com or dhis.org dynamic subdomains. I will use linuxhelp.dynip.com as an example. By setting up linuxhelp.dynip.com, any user on that machine such as me, will have thier own email address. An example would be my user "lyte" will be able to recieve email at email@example.com whenever my computer is connected to the net.
So first off, you have to set the hostname of the computer to whatever your domain name is. To change it, type linuxconf as root and then go into the Config/Networking/ submenu and press enter on Basic Host Information. Once in there you will see Hostname and it will probably be set as localhost.localdomain if you haven't already changed it. Enter in the new domain name and press enter on Accept and then quit Linuxconf.
Once that is set up, you must install sendmail. Sendmail is available in many different forms. If you use Red Hat Linux, SuSE Linux, or Mandrake Linux, then you can install the RPM package of sendmail. If you run Debian GNU/Linux then you can install the .deb package. Some people prefer installing software via rpm or deb packages, but this guide will be based off using the tarball (tar.gz file).
You can start off by downloading sendmail at
After you untar it (tar -zxvf sendmail.x.x.x.tar.gz), change into the newly created directory and run the command make.
Once it is all installed you must start up the sendmail daemon by typing
Now you're probably all set to recieve email. Find one of your friends and have him/her send you a test email too see if it is working.
One final note... make sure you always have the latest version of sendmail. In the past there have been exploits that will lead to a comprimise of your system. The current version that ships with Red Hat Linux 6.0 is perfectly fine though. But like I said, it's better to keep updated then to be sorry later.
Having trouble? Got questions? Require further assistance? If so please feel free to visit our Help Forums and ask the experts!
Copyright © 1997 - 2013 Private World Domination Inc. All rights reserved.