You are on page 1of 33

A PROJECT

REPORT
ON

DHCP
SERVER
AND

MAIL
SERVER
1

Submitted byNalinee kumari


National institute of technology, patna

ACKNOWLEDGEMENT

My summer training on LINUX in hellwert Packard


educational service was a very enlightening experience
as I learnt a lot of new thing. We would like to thanks
hellwert Packard educational service for giving me the
opportunity to do my training here.

With great pleasure we express our great sense of


gratitude to
Mr. Anil singh to conduct this type of course and for his
kind permission to carry out this project.

We are extremely thankful to for his valuable guidance


throughout the training program and project.

We would also like to thanks all lab persons


respectful guidance.

for his

INDEX
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.

Overview of dhcp...........................................................................................................5
Central dhcp server design............................................................................................5
Definition of dhcp server on the web..............................................................................6
What is dhcp .................................................................................................................6
How does dhcp works(dora process).............................................................................8
Ip address allocation......................................................................................................10
Basic configuration.........................................................................................................10
Setting fixed address.....................................................................................................13
Setting daemon option...................................................................................................13
Starting dhcp .................................................................................................................13
Testing the server...........................................................................................................14
Why dhcp reservation.....................................................................................................17
Mac binding....................................................................................................................17
Overview and history of mail server................................................................................20
Default sendmail installation............................................................................................21
Common sendmail configuration.....................................................................................23
Mail user agent.................................................................................................................25
Mail transport agent..........................................................................................................25
Mail delivery agent............................................................................................................27

DHCP
SERVER

Central DHCP Server Project

Overview
Every device that successfully communicates on the global Internet must be configured with a set of
properly assigned networking parameters. These parameters have historically been manually set
either by the individual using the device or by technical support staff who travel from one device
location to the next. An increasingly popular and efficient means of configuring devices that UGA
campus units (e.g., departments) have deployed is through the Dynamic Host Configuration Protocol
(DHCP). DHCP relies on a database of networking parameters that are delivered to a device, with
unique information (such as IP address) supplied as a function of its network interface card (nic)
address. Although DHCP services managed at the unit level have served the University well up to this
point, there are compelling reasons why a central DHCP service is critical to the successful
deployment of campus networking today.
DHCP Task Force (DHCPTF) was created in March 2000 and charged with the following tasks:

Develop the technical specifications needed for campus-wide DHCP deployment

Evaluate the major DHCP offerings (both commercial and open source) with respect to the
developed specifications

Develop strategies for migrating devices to DHCP

Identify (but not resolve) DHCP management issues such as vendor support, staffing
requirements for managing central servers, and training for technical support staff.

The DHCPTF provided recommendations to the Campus IT Forum, and ultimately the IT Policy Board
and Provost for endorsement as institutional policy by the end of the 2000
Central DHCP Server Design
The central DHCP service consists of three main components: (1) a user-friendly Web front-end to
give appropriately authorized personnel (authenticating through their UGA MyID) the ability to update
DHCP networking parameters, (2) a MySQL database back-end containing authoritative DHCP
information, and (3) two redundant Internet Software Consortium (ISC) Version 3 DHCP servers
whose configuration files are created from the MySQL database.
The MySQL database contains tables of information documenting all of the units on campus, the
individuals responsible for updating DHCP information for their units, and networked device
information. At present, the device information includes the following fields:

MAC Address (network card address)

IP Address (assigned statically, except for mobile devices)

Fully Qualified Domain Name

Departmental Affiliation

Building Location

Room Location

Contact Name (individual responsible for device)

DHCP Exclusion Flag (to exclude devices, e.g., servers, from DHCP assignment)

Mobile Device Flag (for roaming devices Phase 2 implementation)

Record Create Time

Time Last Updated

DHCP Template (optional)

Definitions of Dhcp server on the Web:

The Dynamic Host Configuration Protocol (DHCP) is a computer networking protocol used by
hosts (DHCP clients) to retrieve IP address assignments and other configuration information.
A service provided by a device on the network that assigns network addresses to other
devices, such as your telephone and computer. This avoids having to go to each and every
device to manually assign an addresses to it

What is DHCP?
Dynamic Host Configuration Protocol (DHCP) is a network protocol that enables a server to
automatically assign an IP address to a computer from a defined range of numbers (i.e., a scope)
configured for a given network.

DHCP assigns an IP address when a system is started, for example:


1. A user turns on a computer with a DHCP client.
2. The client computer sends a broadcast request (called a DISCOVER or DHCPDISCOVER),
looking for a DHCP server to answer.
3. The router directs the DISCOVER packet to the correct DHCP server.
4. The server receives the DISCOVER packet. Based on availability and usage policies set on
the server, the server determines an appropriate address (if any) to give to the client. The
server then temporarily reserves that address for the client and sends back to the client an
OFFER (or DHCPOFFER) packet, with that address information. The server also configures
the client's DNS servers, WINS servers, NTP servers, and sometimes other services as well.
5. The client sends a REQUEST (or DHCPREQUEST) packet, letting the server know that it
intends to use the address.
6. The server sends an ACK (or DHCPACK) packet, confirming that the client has a been given
a lease on the address for a server-specified period of time.
When a computer uses a static IP address, it means that the computer is manually configured to use
a specific IP address. One problem with static assignment, which can result from user error or
inattention to detail, occurs when two computers are configured with the same IP address. This
creates a conflict that results in loss of service. Using DHCP to dynamically assign IP addresses
minimizes these conflicts.
Dynamic Host Configuration Protocol was developed to automate the assignment of IP addresses,
subnet masks, gateways, and other IP parameters. It allows for much capability- both with the
administrator and end-user. It saves the administrator the trouble of modifying IP information every
time an implementation or upgrade is conducted. End-users appreciate it since it allows for quick and
simple connections to a network- often without any configuration needed.
DHCP was created by the Internet Engineering Task Force (IETF) and became a standard in 1993,
where it succeeded the BOOTP protocol. DCHP is actually based on the BOOTP protocol, which can
be seen as a simpler and less complex solution to DHCP. The transition was needed since BOOTP
was not designed to provide dynamic address assignment. Instead, administrators tediously
maintained configuration files for each host on the network. Instead of a multitude of configuration
files, a dynamic alternative was created with DHCP.
DHCP uses the concept of a "lease" or amount of time that a given IP address will be valid for a
computer. The lease time can vary depending on how long a user is likely to require the Internet

connection at a particular location. It's especially useful in education and other environments where
users change frequently. Using very short leases, DHCP can dynamically reconfigure networks in
which there are more computers than there are available IP addresses. The protocol also supports
static addresses for computers that need a permanent IP address, such as Web servers.
DHCP is an extension of an earlier network IP management protocol, Bootstrap Protocol (BOOTP).
DHCP is a more advanced protocol, but both configuration management protocols are commonly
used and DHCP can handle BOOTP client requests. Some organizations use both protocols, but
understanding how and when to use them in the same organization is important. Some operating
systems, including Windows NT/2000, come with DHCP servers. A DHCP or BOOTP client is a
program that is located in (and perhaps downloaded to) each computer so that it can be configured
The Dynamic Host Configuration Protocol (DHCP) is an excellent technique for managing changes in
the network configuration parameters (such as IP address, network mask, default gateway, etc.) of
Internet connected devices. DHCP uses a server containing a database of parameters that key off the
network interface card (NIC) address of the connected device. A DHCP client program running on the
device requests these parameters which are delivered by the DHCP server based on the requesting
device's NIC address

How Does DHCP Work?


DHCP works within four steps: DHCP discovery, DHCP offers, DCHP requests, and DHCP
acknowledgement.
DHCP Discovery

When a computer is connected to a DHCP-enabled network, it will send out a broadcast. This
broadcast, known as DHCPDISCOVER, will be sent out in hopes of finding the DHCP server.
Optionally, the client will request that the last known IP information the client used on the network be
used. (Based on the settings of the DHCP server, this request may be fulfilled or denied.)

DHCP Offers

The DHCP will then receive a lease request from the client. This lease determines how long the client
can expect to use the IP information it will obtain from the server. A DHCP message referred to as
DHCPOFFER is sent back from the server to the client. This message contains the lease duration, IP
address, subnet mask, the clients MAC address, and the IP address of the DHCP server that issued
the message.
DCHP Requests

Upon a successful transaction of information, the client must then tell the DHCP server that the
information was indeed received and accepted. A broadcast is initiated with the DHCP servers IP
address. This will tell other possible DHCP servers that they shouldnt issue IP information to the
client, since the client already obtained the necessary information. This will help free up IP addresses
for other computers, as only one lease can be obtained per network interface card.
DHCP Acknowledgement

DHCP acknowledgement is the final phase in the information exchange between server and client. In
this phase the server obtains the DHCPREQUEST message from the client, and sends back a
DHCPACK message. This packet of information includes the lease duration, as well as any
configuration information the client may have requested. At this point the process is complete, and the
client will configure its IP information accordingly.

IP Address Allocation
The DHCP protocol provides three methods of IP address allocation:

manual allocation, where the allocation is based on a table with MAC address - IP address pairs manually filled by the server
admin. Only requesting clients with a MAC address listed in this table get the IP address according to the table.

automatic allocation, where a free IP address of a range given by the admin is permanently assigned to a requesting client.

dynamic allocation, the only method which provides dynamic reuse of IP addresses. A network administrator assigns a range of
IP addresses to DHCP, and each client computer on the LAN has its TCP/IP software configured to request an IP address from
the DHCP server when that client computer's network interface card starts up. The request-and-grant process uses a lease
concept with a controllable time period. This eases the network installation procedure on the client computer side considerably.

Some DHCP server implementations can update the DNS name associated with the client hosts to reflect the new IP

address by way of the DNS update protocol which was established with RFC 2136

Dynamic Host Configuration Protocol (DHCP) is defined in RFC2131 and is basically an automated
means of managing and assigning Internet IP addresses to client workstations on the network. This
protocol saves the system administrator much time having to manually configure each host
workstation manually, and to maintain large databases storing IP assignment details. When any of the
network settings change (like allocating a new default gateway or new DNS server), then the details

10

can be configured at the DHCP server as opposed to manually changing the settings of many client
systems.
This chapter will provide the means to configure the DHCPd package to provide IP assignment to
your internal network. The DHCP server is installed on most Linux distributions, and is also available
from the Internet Systems Consortium site.
Basic Configuration
The main DHCP configuration file should be located at /etc/dhcpd.conf, however it is sometimes
missing. This is a configuration safeguard to stop users from accidentally starting a DHCP server
without fully configuring its details. Having any unplanned DHCP servers operating on a network can
result in major network problems. Therefore the administrator must create the configuration before
implementing its services, a physical task to reduce error (some distributions may have the file
available).
[bash]# vi /etc/dhcpd.conf

The following configuration file is an example for a typical home / small office network.

#
# DHCP Server Config File
#
ddns-update-style none;
ignore client-updates;
lease-file-name "/var/lib/dhcpd/dhcpd.leases";
authoritative;
option domain-name

"example.com";

default-lease-time

86400; # 24 hours

max-lease-time

172800; # 48 hours

subnet 192.168.1.0 netmask 255.255.255.0 {


option routers

192.168.1.1;

option subnet-mask

255.255.255.0;

option broadcast-address

192.168.1.255;

option domain-name-servers
option ntp-servers

192.168.1.1;

192.168.1.1;

11

option netbios-name-servers
option netbios-node-type

192.168.1.1;
8;

range 192.168.1.101 192.168.1.200;


}

A DHCP server can be configured with more than one range (subnet) of IP addresses. The
parameters specified above the "subnet" declaration are global parameters which are applied to all
subnet declarations, while the parameters inside each subnet override the global parameters.
The parameters specified in the above sample file are explained below. For more detailed information
about the configuration options available, type "man dhcpd.conf" or "man dhcp-options" at the
command prompt.
Parameter

Definition

ddns-update-style

Type of DDNS update to use with local DNS Server

ignore client-updates

Ignore all client requests for DDNS update

lease-file-name

Filename that stores list of active IP lease allocations

authoritative

option domain-name
option domain-nameservers

Set as master server, protects against rogue DHCP servers and


misconfigured clients
Specifies the Internet Domain Name to append to a client's hostname
The DNS servers the clients should use for name resolution

default-lease-time

The default time in seconds that the IP is leased

max-lease-time

The max time in seconds that the IP is leased

option routers

Specifies the Gateway for the client to use

option subnet-mask

The subnet mask specific to the lease range

option broadcastaddress
option ntp-servers
option netbios-nameserver

The broadcast address specific to the lease range

Network Time Protocol servers available to the clients


The NetBIOS name server (WINS)

12

option netbios-nodetype
Range

The NetBIOS name resolution method (8=hybrid)


The range of valid IP addresses available for client offer

The DHCP server can be quite tricky to configure and normally does not provide any error messages
when it fails to start as a service. Ensure your configuration file is formatted similar to the example
above, and that semicolons complete all the parameter lines.
If the network on which the DHCP server is broadcasting does not have a WINS server, then the
netbios-name-server and netbios-node-type options should be removed.
Setting Fixed Addresses
There may be a time when it is necessary for a workstation to be assigned a fixed address, this can
host wkstn1 {
hardware ethernet 00:0d:62:d7:a0:12;
fixed-address 192.168.1.5;
}
be easily achieved by setting the following details in the bottom of the /etc/dhcpd.conf file.

Setting fixed addresses saves the operator time by avoiding the manual adjustments needed at each
workstation. Be sure to remove the fixed address when it is no longer required, this is particularly
important on larger networks where IP allocation needs careful management.
Setting Daemon Options
The DHCP daemon can be configured with command line options by using the /etc/sysconfig/dhcpd
file. For security, DHCP can be bound to an interface so the allocation of addresses are only available
to the private internal network.
[bash]# vi /etc/sysconfig/dhcpd

Setting this option provides queries and assignment only through this interface.
# Command line options here
DHCPDARGS=eth1

13

Starting DHCP
There was no initial DHCP configuration file when we started to set up the server. Now that the file
has been created and the configurations are defined, it would be a good time to make a backup of the
file.
[bash]# cp /etc/dhcpd.conf /etc/dhcpd.conf.original

When the server provides a leased IP address to a client, the details of the transaction are stored in
the dhcpd.leases file. In some distributions this file has not been provided and may need to be created
before the server will function. The following command prepares the dhcpd.leases file for use.
[bash]# touch /var/lib/dhcpd/dhcpd.leases

The server is now fully configured and its time to determine the runlevels and start the service.
[bash]# chkconfig --level 2345 dhcpd on
[bash]# /etc/init.d/dhcpd restart

You should always check the runlevels after they have been adjusted to confirm they will function as
required.
[bash]# chkconfig --list dhcpd

Once the service has been started the system log should be checked to see if there are any errors.
Most important is the security options we viewed earlier, which was to make sure the daemon was
bound to the internal interface. The following example shows a binding to eth0.
[bash]# grep dhcpd /var/log/messages

galaxy dhcpd: Listening on LPF/eth1/00:40:05:51:20:e7/192.168.1.0/24


galaxy dhcpd: Sending on LPF/eth1/00:40:05:51:20:e7/192.168.1.0/24
galaxy dhcpd: Sending on Socket/fallback/fallback-net
galaxy dhcpd: dhcpd startup succeeded

14

Testing The Server


Now that the server is configured and running successfully, its time to test the server by requesting an
IP lease from a Linux or Windows client. The DHCP protocol uses UDP on port 67 to broadcast for
and reply to DHCP requests, ensure that the clients have access through any firewall system to
successfully obtain an IP address.
Linux Client
If the Linux client distribution you are testing uses the dhclient package from the Internet Systems
Consortium, then use the following command to obtain a lease for the eth0 network device.
[bash]# dhclient eth0

(EXECUTED ON CLIENT WORKSTATION)

Internet Systems Consortium DHCP Client V3.0.1


Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Listening on LPF/eth0/00:0d:62:d7:a0:12
Sending on LPF/eth0/00:0d:62:d7:a0:12
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPOFFER from 192.168.1.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.5 -- renewal in 20509 seconds.

By viewing the system log after renewing a DHCP client's lease, the transaction between client and
server can be viewed. The following transaction records the fixed address 192.168.1.5 that was
covered earlier being assigned to the reserved MAC address.
[bash]# grep dhcpd /var/log/messages

(EXECUTED ON DHCP SERVER)

galaxy dhcpd: DHCPDISCOVER from 00:0d:62:d7:a0:12 via eth0


galaxy dhcpd: DHCPOFFER on 192.168.1.5 to 00:0d:62:d7:a0:12 via eth0
galaxy dhcpd: DHCPREQUEST for 192.168.1.5 (192.168.1.1) from 00:0d:62:d7:a0:12 via eth0
galaxy dhcpd: DHCPACK on 192.168.1.5 to 00:0d:62:d7:a0:12 via eth0

15

If your Linux client is using the pump dhcpclient, then the following commands can be used to release,
obtain, or view the status of the client.
[bash]# pump -i eth0
[bash]# pump -i eth0 --release
[bash]# pump -i eth0 --status

Windows Client
Testing a Windows based DHCP client is best done from a command prompt in the DOS shell, as
more information is returned to the user than the standard graphical tools.
To release and renew your windows based IP address, follow these examples (expected results are
provided).
C:\>ipconfig /release
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 0.0.0.0
Subnet Mask . . . . . . . . . . . : 0.0.0.0
Default Gateway . . . . . . . . . :

C:\>ipconfig /renew
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : example.com
IP Address. . . . . . . . . . . . : 192.168.1.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

16

The following command will provide more detailed information about the leased IP address and
associated network resources.
C:\>ipconfig /all
WHY DHCP RESERVATION?
1. Assigning IP address dynamically has some problem that every time a client system boots, it
is not sure that it will get the same IP so it will be uneasy task for other system to find the
particular system.
2. To solve the above problem we can do mac-address binding of IPs . Just give its entry in the
fixed adderess position.

What is the IPv4 MAC address (aka the hardware or physical address) of my network adapter?
Every network adapter has a Media Access Control address (usually shortened to MAC address). A
MAC address is a six-byte identifying number permanently embedded in the firmware of the adapter,
and is readable by the network and the operating system of the device on which the adapter is
installed. All modems and Ethernet cards have a MAC address. The address must follow the
standards set by the Institute of Electrical and Electronics Engineers (IEEE), which sets computer
networking standards. The IPv4 address is a six-pair set of hexadecimal numbers, for example, a1c2-e3-44-5f-6d.
The purpose of the MAC address is to uniquely identify every node on a network; nodes include
workstations and devices like printers. Every adapter has a unique MAC address. Even two identical
models from the same manufacturer will have distinct MAC addresses.

host wkstn1 {
hardware ethernet 00:0d:62:d7:a0:12;
fixed-address 192.168.1.5;
}

By default, Windows randomly assigns an IP address. Typically in Linux and Mac OS X, the IPv6
protocol uses the MAC address of a network node to generate its IPv6 IP address. This is
accomplished by expanding the 48-bit MAC address into a 64-bit portion of an 128-bit IPv6 IP

17

address. This represents a change from the practice of IPv4, where the MAC address was entirely
distinct from the IP address.

18

MAIL
SERVER

OVERVIEW AND HISTORY

19

The birth of electronic mail (email) occurred in the early 1960s. The mailbox was a file
in a user's home directory that was readable only by that user. Primitive mail applications appended
new text messages to the bottom of the
file, making the user wade through the constantly growing file to find any particular
message. This system was only capable of sending messages to users on the same system.

The first network transfer of an electronic mail message file took place in 1971 when
a computer engineer named Ray Tomlinson sent a test message between two machines via
ARPANET the precursor to the Internet. Communication via email soon became very popular,
comprising 75 percent of ARPANET's traffic in less than two years.

Today, email systems based on standardized network protocols have evolved into
some of the most widely used services on the Internet. Red Hat Enterprise Linux offers many
advanced applications to serve and access email.

20

Mail server architecture


.

The Default Sendmail Installation

21

The Sendmail executable is /usr/sbin/sendmail.

Sendmail's lengthy and detailed configuration file is


/etc/mail/sendmail.cf. Avoid editing the sendmail.cf file directly. To make configuration changes to
Sendmail, edit the /etc/mail/sendmail.mc file, back up the original /etc/mail/sendmail.cf, and use the
following alternatives to generate a new configuration file:

Use the included makefile in /etc/mail (make all -C /etc/mail) to create a new
/etc/mail/sendmail.cf configuration file. All other generated files in /etc/mail (db files) will be
regenerated if needed. The old makemap commands are still usable. The make command will
automatically be used by service sendmail start | restart | reload if the make package is
installed.

Alternatively you may use the included m4 macro processor to create a new
/etc/mail/sendmail.cf.

Common Sendmail Configuration Changes.

Various Sendmail configuration files are installed in the /etc/mail/ directory including:

access Specifies which systems can use Sendmail for outbound email.

domaintable Specifies domain name mapping.

local-host-names Specifies aliases for the host.

22

mailertable Specifies instructions that override routing for particular domains.

virtusertable Specifies a domain-specific form of aliasing, allowing multiple virtual domains to


be hosted on one machine.

Several of the configuration files in /etc/mail/, such as access, domaintable, mailertable and
virtusertable, must actually store their information in database files before Sendmail can use any
configuration changes. To include any changes made to these configurations in their database files,
run the command

makemap hash /etc/mail/<name> < /etc/mail/<name>

where <name> is replaced with the name of the configuration file to convert.

For example, to have all emails addressed to the example.com domain delivered to <bob@otherexample.com>, add the following line to the virtusertable file:

@example.com

bob@other-example.com

To finalize the change, the virtusertable.db file must be


updated using the following command as root:

makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable

This creates an updated virtusertable.db file containing the new configuration.

23

Common Sendmail Configuration Changes

When altering the Sendmail configuration file, it is best not to


edit an existing file, but to generate an entirely new /etc/mail/sendmail.cf file.

Caution

Before changing the sendmail.cf file, it is a good idea to create a backup copy.

To add the desired functionality to Sendmail, edit the /etc/mail/sendmail.mc


file as the root user. When finished, use the m4 macro processor to generate a new sendmail.cf by
executing the following command:

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

By default, the m4 macro processor is installed with


Sendmail but is part of the m4 package.

After creating a new /etc/mail/sendmail.cf file, restart Sendmail for the


changes to take effect. The easiest way to do this is to type the following command:

/sbin/service sendmail restart

The default sendmail.cf file does not allow Sendmail to


accept network connections from any host other than the local computer. To configure Sendmail as a
server for other clients, edit the

24

/etc/mail/sendmail.mc file, and either change the address specified in the Addr= option of the
DAEMON_OPTIONS directive from 127.0.0.1 to the IP address of an active network device or
comment out the DAEMON_OPTIONS directive all together by placing dnl at the beginning of the line.
When finished, regenerate /etc/mail/sendmail.cf by executing the following command:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

The default configuration which ships with Red Hat Enterprise Linux works for most SMTPonly sites. However, it does not work for UUCP (UNIX to UNIX Copy) sites. If using UUCP mail
transfers, the /etc/mail/sendmail.mc file must be reconfigured and a new /etc/mail/sendmail.cf must be
generated.

25

Consult the /usr/share/sendmail-cf/README file before editing any files in the directories under the
/usr/share/sendmail-cf directory, as they can affect the future configuration of /etc/mail/sendmail.cf

files.
Mail User Agents

There are scores of mail programs available under Red Hat Enterprise Linux.
There are full-featured, graphical email client programs, such as Ximian Evolution, as well as textbased email programs such as mutt.
The remainder of this section focuses on securing communication between the client
and server.

Mail Transport Agents

26

Red Hat Enterprise Linux includes two primary MTAs, Sendmail and Postfix.
Sendmail is configured as the default MTA, although it is easy to switch the default MTA to Postfix

Mail Transport Agent (MTA) Configuration

A Mail Transport Agent (MTA) is essential for sending email. A Mail User
Agent (MUA) such as Evolution, Thunderbird, and Mutt, is used to read and compose email. When a
user sends an email from an MUA, the message is handed off to the MTA, which sends the message
through a series of MTAs until it reaches its destination.

Even if a user does not plan to send email from the system, some automated
tasks or system programs might use the /bin/mail command to send email containing log messages to
the root user of the local system.

Red Hat Enterprise Linux 5 provides three MTAs: Sendmail, Postfix, and
Exim. If all three are installed, sendmail is the default MTA. The Mail Transport Agent Switcher allows
for the selection of either sendmail, postfix, or exim as the default MTA for the system.

The system-switch-mail RPM package must be installed to use the textbased version of the Mail Transport Agent Switcher program. If you want to use the graphical version,
the system-switch-mail-gnome package must also be installed.

To start the Mail Transport Agent Switcher, select System (the main menu on the
panel) => Administration =>
Mail Transport Agent Switcher, or type the command system-switch-mail at a
shell prompt (for example, in an XTerm or
GNOME terminal).

27

The program automatically detects if the X Window System is running. If it is running,


the program starts in graphical mode as shown in Figure III.23-1. If X is not detected, it starts in textmode. To force Mail Transport Agent Switcher to run in text-mode, use the command system-switch
mail-nox.

Mail Delivery Agents

Red Hat Enterprise Linux includes two primary MDAs, Procmail and mail.
Both of the applications are considered LDAs and both move email from the MTA's spool file into the
user's mailbox. However, Procmail provides a robust filtering system.

28

This section details only Procmail. For information on the mail command, consult its man page.
Procmail delivers and filters email as it is placed in the mail spool file of the localhost. It is powerful,
gentle on system resources, and widely used. Procmail can play a critical role in delivering email to be
read by email client applications.
Procmail can be invoked in several different ways. Whenever an MTA places an email into the mail
spool file, Procmail is launched. Procmail then filters and files the email for the MUA and quits.
Alternatively, the MUA can be configured to execute Procmail any time a message is received so that
messages are moved into their correct mailboxes. By default, the presence of /etc/procmailrc or of
a .procmailrc file (also called an rc file) in the user's home directory invokes Procmail whenever an
MTA receives a new message.

Whether Procmail acts upon an email message depends upon whether the
message matches a specified set of conditions or recipes in the rc file. If a message matches a
recipe, then the email is placed in a specified file, is deleted, or is otherwise processed.
When Procmail starts, it reads the email message and separates the body from the header
information. Next, Procmail looks for /etc/procmailrc and rc files in the /etc/procmailrcs directory for
default, system-wide, Procmail environmental variables and recipes. Procmail then searches for a
.procmailrc file in the user's home directory. Many users also create additional rc files for Procmail that
are referred to within the .procmailrc file in their home directory.
By default, no system-wide rc files exist in the /etc/ directory and no .procmailrc files exist in any
user's home directory. Therefore, to use Procmail, each user must construct a .procmailrc file with
specific environment variables and rules

29

BIBLIOGRAPHY

Arpanet-20
bootp-7
broadcast address-11
daemon-13
ddns-update-style-12
dhcp exclusion flag-6
dhcpack-7
dhcp-acknowledgement-7
dhcp-discovery-7
dhcp-offer-7
dhcp-request-7
dhcptf-5
discover packet-6
domain name server-11
hardware Ethernet-13
ietf-7
ignore client update-12
ip address-5
it policy board-5
lease-file-name-12
M4 package-24
mac-address-17
mailbox-20
man dhcp conf-11
max lease time-12

30

mobile device flag-6


Mta-25
network address-6
nic-5
offer-7
option domain name server-12
option domain name-12
option router-12
range-12
request-7
routers-11
Routing-22
Sendmail-21
subnetmask-11
sysconfig-13
tcp/ip-10
template-6
uga-5
Uucp-24
webserver-7
Xml driven protocol-21

31

REFERENCES

1
2
3
4
5
6
7
8

defineDhcp server - Google Search.htm


DHCP - Definition.htm
DHCP - DHCP in Computer Networking.htm
DHCP definition by The Linux Information Project.htm
Dynamic Host Configuration Protocol (DHCP) Definition Learn-Networking_com.htm
erlang-dhcp-server - Project Hosting on Google Code.htm
How to set up a mail server on a GNU - Linux system.htm
Mail Server Configuration.htm

32

33

You might also like