Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




22.1. Linux Sendmail Server

In our configuration and installation we'll provide you two different configurations that you can set up for Sendmail;

Central Mail Hub Relay,

The Central Mail Hub Relay Server configuration will be used for your server where the assigned task is to send, receive and relay all mail for all local or neighbor client and server mail machines you may have on your network.

local or neighbor clients and servers.

A local or neighbor client and server refer to all other local server or client machines on your network that run Sendmail and send all outgoing mail to the Central Mail Hub for future delivery. This kind of internal client never receives mail directly via the Internet; Instead, all mail from the Internet for those computers is kept on the Mail Hub server.

It is a good idea to run one Central Mail Hub Server for all computers on your network; this architecture will limit the task managements on the server and client machines, and improve the security of your site.

You can configure the neighbor Sendmail so that it accepts only mail that is generated locally, thus insulating neighbor machines for easier security. The Gateway server outside the firewall, or part of it acts as a proxy and accepts external mail via its Firewall rules file that is destined for internal delivery from the outside, and forwards it to the Central Mail Hub Server. Also note that the Gateway server is configured like a neighbor Sendmail server to never accept incoming mail from the outside the Internet.

Here is a graphical representation of the Sendmail configuration used in this book, with different settings:

  • Central Mail Hub Relay,

  • local or neighbor client and servers on different servers.

Lots of possibilities exist, and depends on your need and network architecture.

           Sendmail configuration examples

These installation instructions assume

  • Commands are Unix-compatible.

  • The source path is /var/tmp, other paths are possible.

  • Installations were tested on Red Hat Linux 6.1 and 6.2.

  • All steps in the installation will happen in super-user account root.

  • Sendmail version number is 8.10.1

These are the package(s) you need to download and they are available here

Sendmail Homepage:
Sendmail FTP Sire:
You must be sure to download: sendmail.8.10.1.tar.gz

Before you decompress the tarballs, it is a good idea to make a list of files on the system before you install Sendmail, and one afterwards, and then compare them using diff to find out what file it placed where. Simply run find /* > Sendmail1 before and find /* > Sendmail2 after you install the software, and use diff Sendmail1 Sendmail2 > Sendmail-Installed to get a list of what changed.

You need to compile, so decompress the tarball (tar.gz). which you have downloaded:d
         [root@deep] /# cp sendmail.version.tar.gz /var/tmp
         [root@deep] /# cd /var/tmp
         [root@deep ]/tmp# tar xzpf sendmail.version.tar.gz

Before you compile it is always better to configure to your needs, move into the new Sendmail directory and edit the smrsh.c file vi +77 smrsh/smrsh.c and change the line:
         # define CMDDIR         "/usr/adm/sm.bin"
To read:
         # define CMDDIR        "/etc/smrsh"
This modification specifies the default search path for commands runs by smrsh program. It allows us to limit the location where these programs may reside.

  Published under the terms of the Open Publication License Design by Interspire