Professional Documents
Culture Documents
OVERVIEW
Email System Architecture
MDA, MTA, MAA, MUA
POP3 & IMAP
MIME
SMTP
Email Server (Sendmail)
Network Management
The diagram below shows a typical sequence of events that takes place when Alice
composes a message using her mail user agent (MUA). She enters the email address of
her correspondent (Bob), and hits the "send" button.
Internet
SMTP COMMANDS
Command Function
HELO <hostname> Identifies connecting host
MAIL From: <revpath> Starts mail with sender
RCPT To: <fwdpath> Identifies envelope
DATA Begins message body
terminated by a line only with a dot
VRFY <address> checks that address is valid
EXPN <address> expands aliases and .forward
QUIT Closes the connection
RSET Resets the state of the connection
EMAIL ADDRESS
An email address has two parts: the email accou
nt (which is the actual user’s account) and th
e domain name (which is the Internet registered
name for the organisation). These two parts are
separated by the @ (pronounced ‘at’) symbol.
The following example shows a user called James
.cim with an account on the cwcim.org domain.
James.cim@cwcim.org
EMAIL SERVER
Most email servers conduct email services by run
ning two separate processes on the same machine.
One process is the POP3 (Post Office Protocol 3)
server which holds mail messages in a queue and
delivers the messages to the clients when reques
ted.
The other is the SMTP (simple mail transfer prot
ocol) server that receives outgoing emails from
clients and sends and receives emails from other
SMTP servers.
These two processes are linked by an internal ma
il delivery mechanism that moves messages betwee
n the POP3 and SMTP servers.
Mail Server - Sendmail
Topic 05,p.21
©VTC 2012
Technical Support Fundamentals (ITP 4107)
EMAIL SERVER
When the client calls the email server to send
messages, it connects to the server on certain
TCP port (port 25 for SMTP).
When the client checks for new messages, it co
nnects to the server on another TCP port
(port 110 for POP3).
Figure on the next slide shows the relationshi
p between the client, server, POP3, SMTP and t
he Internet.
EMAIL SERVER
Sendmail
Sendmail is the most widely used MTA in Linux
.
COMPONENTS OF SENDMAIL
Configuration file – /etc/mail/sendmail.cf
location of files and directories needed
Parsing rules for addresses
Postfix
Postfix is a replacement for the well known S
endmail (i.e. another mail server).
Postfix is preferable (as compared to Sendma
il) because of the numerous security leaks tha
t were found in the Sendmail daemon.
Postfix is robust and easy to setup (the conf
iguration file for sendmail is too complex).
It acts as a MTA (mail transfer agent) that can
receive mail messages and drop them into a loca
l mailbox.
NETWORK MANAGEMENT
Network management generally includes th
e following tasks:
Fault detection for networks, gateways, and c
ritical servers.
Schemes for notifying an administrator of pro
blems.
General network monitoring, to balance load a
nd plan expansion.
Documentation and visualization of the networ
k.
Administration of network devices from a cent
ral site.
Mail Server - Sendmail
Topic 05,p.29
©VTC 2012
Technical Support Fundamentals (ITP 4107)
NETWORK TROUBLESHOOTING
Several good tools are available for debugging
a network at the TCP/ IP layer. Most give low-l
evel information, so you must understand the ma
in ideas of TCP/ IP and routing in order to use
the debugging tools.
The architecture of TCP/ IP defines several lay
ers of abstraction at which components of the n
etwork can function. You can dramatically reduc
e the amount of time spent debugging a problem
if you first figure out which layer is misbehav
ing.
PING COMMAND
TRACEROUTE COMMAND
It uncovers the sequence of gateways through whi
ch an IP packet travels to reach its destination
.
The output is simply a list of hosts, starting w
ith the first gateway and ending at the destinat
ion.
As packets arrive at the first gateway (lab-gw in this case), their TTL is decreased to
zero. When a gateway decreases the TTL to 0, it discards the packet and sends an
ICMP “time exceeded” message back to the originating host. The sender’s IP
address in the header of the error ICMP packet identifies the gateway, and traceroute
looks up this address in DNS to find the gateway’s hostname. To identify the second-
hop gateway, traceroute sends out a second round of packets with TTL fields set to 2.
NETSTAT COMMNAD
netstat collects a wealth of information about t
he state of your computer’s networking software
.
The most common uses of netstat are:
NETSTAT COMMNAD
2. With no arguments , netstat displays the status
of active TCP and UDP ports. Inactive (“listen
ing”) servers that are waiting for connections
are normally hidden, but you can see them with
netstat -a. For example:
The output above
shows an inbound
SSH connection, two
inbound IMAPS
connections, one
inbound HTTP
connection, an
outbound MySQL
connection, and a
bunch of ports
listening for other
connections.
Addresses are shown as hostname:service, where the service is a
port number. For well-known services, netstat shows the port
symbolically, using the mapping defined in /etc/services.
Mail Server - Sendmail
Topic 05,p.34
©VTC 2012
Technical Support Fundamentals (ITP 4107)
TCPDUMP
By default, tcpdump tunes in on the first network interfac
e it comes across. If it choose the wrong interface, you c
an force an interface with the -i flag.
If DNS is broken or you don't want tcpdump doing name look
ups, use the -n option; because slow DNS service can cause
the filter to start dropping packets before they can be de
alt with by tcpdump.
The -v flag increases the information you see about packet
s. Finally, tcpdump can store packets to a file with the -
w flag and can read them back in with the -r flag.
An overwhelming amount of information can be produced by p
acket sniffers. To avoid this problem on busy networks, tc
pdump lets you specify complex filters. For example, the f
ollowing filter collects only incoming web traffic from on
e subnet.
# tcpdump src net 192.168.1.0/24 and dst port 80
Mail Server - Sendmail
Topic 05,p.35
©VTC 2012