1 web server administration chapter 8 providing e-mail services

28
1 Web Server Administration Chapter 8 Providing E-mail Services

Upload: evelyn-carroll

Post on 26-Dec-2015

229 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: 1 Web Server Administration Chapter 8 Providing E-mail Services

1

Web Server Administration

Chapter 8Providing E-mail Services

Page 2: 1 Web Server Administration Chapter 8 Providing E-mail Services

2

Overview

Understand the e-mail environment

Understand e-mail protocols Install and administer Microsoft

Exchange 2000 Install and administer sendmail for

Linux

Page 3: 1 Web Server Administration Chapter 8 Providing E-mail Services

3

Overview

Install and configure IMAP4 and POP3 servers for Linux

Configure e-mail clients Understand Web-based e-mail

clients

Page 4: 1 Web Server Administration Chapter 8 Providing E-mail Services

4

Understanding the E-mail Environment E-mail evolved from a variety of

proprietary systems In the 1980s and 1990s, people often had

e-mail addresses on a number of systems Even as late as 1997, Exchange 5.5 was

not designed to take advantage of Internet e-mail An add-on gave Exchange the ability to send

and receive e-mail over the Internet

Page 5: 1 Web Server Administration Chapter 8 Providing E-mail Services

5

Exchange 2000 Goes Beyond E-mail Basics

Instant messaging Unified messaging platform

Single inbox for e-mail, voicemail, fax Chat service URL addressing

Use a single URL to access stored data Audio and video conferencing

Page 6: 1 Web Server Administration Chapter 8 Providing E-mail Services

6

Role of DNS in E-mail Systems

A domain name, such as technowidgets.com, needs to be associated with two IP addresses One IP address can be for a Web site Another IP address is for e-mail

To associate a domain name, or any other host name, with the IP address of an e-mail server, you need an MX record

technowidgets.com. IN MX 10 mail.technowidgets.com.

The 10 refers to the priority of the e-mail server if there are multiple e-mail servers

Page 7: 1 Web Server Administration Chapter 8 Providing E-mail Services

7

E-mail System Terminology MTA (Mail Transfer Agent)

Accepts e-mail from clients and sends e-mail to another MTA for storage

Exchange 2000, sendmail MUA (Mail User Agent)

E-mail client Outlook, KMail

MDA (Mail Delivery Agent) Delivers e-mail from server to MUA Exchange 2000, imap-2001

Page 8: 1 Web Server Administration Chapter 8 Providing E-mail Services

8

E-mail System Terminology Masquerading

Replace actual host name with domain name Relaying

The process of sending e-mail to an intermediate e-mail server before the message is transmitted to its final destination

This should not be allowed from the Internet because spammers could use it to send e-mail

Spammer Someone who sends unsolicited e-mail,

typically to try to sell something

Page 9: 1 Web Server Administration Chapter 8 Providing E-mail Services

9

E-mail Protocols SMTP (Simple Mail Transfer Protocol)

To send e-mail messages POP3 (Post Office Protocol)

To retrieve e-mail Typically, all messages are downloaded to a

client IMAP4 (Internet Mail Access Protocol)

To retrieve e-mail E-mail stays on the server You can create folders on server to store e-mail

Page 10: 1 Web Server Administration Chapter 8 Providing E-mail Services

10

Understanding SMTP The commands are processed by

the SMTP server

Command Purpose

HELO Identifies the domain sending the message

DATA Indicates the body of the message

VRFY Verifies the e-mail user

QUIT Ends the SMTP session

Page 11: 1 Web Server Administration Chapter 8 Providing E-mail Services

11

Understanding SMTP The SMTP headers add descriptive information

Header Description

MAIL FROM: Identifies who is sending the message (required)

RCPT TO: Identifies the recipient of the message (required)

RECEIVED: Identifies the e-mail server that processed the message

DATE: Indicates the date of the e-mail

FROM: Shows the e-mail address as it is typically displayed in an e-mail client

SUBJECT: Shows the subject of the e-mail message

TO: Shows the recipient as it is typically displayed in an e-mail client

CC: Sends copies of the message to a list of e-mail addresses

BCC: Sends copies of the message to a list of e-mail addresses but does not display the e-mail addresses

Page 12: 1 Web Server Administration Chapter 8 Providing E-mail Services

12

Understanding SMTP Sample session Commands and headers in boldHELO WKS1250 web1.technowidgets.com Hello [127.0.0.1]MAIL FROM: [email protected] 2.1.0 [email protected] OKRCPT TO: [email protected] 2.1.5 [email protected] Start mail input; end with <CRLF>.<CRLF>This is a simple message.QUIT

Page 13: 1 Web Server Administration Chapter 8 Providing E-mail Services

13

Understanding POP3

More simplistic than IMAP4 First step is to log on with user

name and password List, read, download, delete e-mail

Page 14: 1 Web Server Administration Chapter 8 Providing E-mail Services

14

Common POP3 commandsCommand Description

USER username Connects to POP3 server based on user name

PASS password Enters the password for the user, as in PASS: Ax6yy

LIST Displays the message number followed by the number of characters in the message

UIDL Displays the unique ID for each message

RETR n Replaces the n with a message number to retrieve that message

TOP n lines Instead of retrieving the whole message, retrieves the number of lines designated by the lines parameter for message number n

DELE n Deletes message number n from the server

QUIT Ends the session

Page 15: 1 Web Server Administration Chapter 8 Providing E-mail Services

15

Sample POP3 Session-Major ComponentsUSER cbranco+OKPASS pass+OK User successfully logged on.LIST+OK 1 4041 404.RETR 1+OKReceived: from WKS1 (127.0.0.1) by web1.technowidgets.comFrom: [email protected]: [email protected] is a sample message.DELE 1+OKQUIT

Page 16: 1 Web Server Administration Chapter 8 Providing E-mail Services

16

Understanding IMAP4 Messages remain on server Requires much more space on server To keep track of the status of messages,

flags are used \Recent \Seen \Answered \Flagged \Deleted \Draft

Page 17: 1 Web Server Administration Chapter 8 Providing E-mail Services

17

Common IMAP4 commands

Command Description

LOGIN username password

Log on to the server with your user name and password, which are unencrypted.

SELECT mailbox Select a mailbox before you perform mail tasks. The default mailbox is called inbox. The response gives a summary of mailbox information.

FETCH message(s) item(s)

Retrieve messages. The message(s) parameter gives the message number. The item(s) parameter determines what part of the message is fetched—that is, individual header items or the body of the text.

STORE message(s) flags

Change the flags associated with a message. Typically, this command is used to mark messages to be deleted, undeleted, or identified as unread.

LOGOUT End the IMAP4 session.

Page 18: 1 Web Server Administration Chapter 8 Providing E-mail Services

18

Installing Microsoft Exchange 2000 SMTP is part of IIS, not Exchange, and

needs to be installed NNTP (Network News Transport Protocol)

needs to be installed before Exchange and is also part of IIS

Active Directory is required for Exchange Once the above are installed, the

Exchange wizard guides you through a simple installation

To use Exchange 2000 on Windows Server 2003, Exchange 2000 Service Pack 3 is required

Page 19: 1 Web Server Administration Chapter 8 Providing E-mail Services

19

Administering Exchange 2000 Messag

e Delivery Defaults

Page 20: 1 Web Server Administration Chapter 8 Providing E-mail Services

20

Administering Exchange Users

When you add a user, you have the option to create a mailbox

By default, the e-mail name is the same as the user name but you can change it

Page 21: 1 Web Server Administration Chapter 8 Providing E-mail Services

21

Exchange 2000 Delivery Restrictions

You can restrict the size of messages being sent and received

The e-mail names of senders can be restricted too

Page 22: 1 Web Server Administration Chapter 8 Providing E-mail Services

22

Installing and Configuring Sendmail for Linux Installed from an rpm file Configure sendmail through a

macro processor called m4 m4 /etc/mail/sendmail.mc >/etc/mail/sendmail.cf

There are many advanced features of sendmail that make configuring it substantially difficult

There are other e-mail servers, such as qmail, that are easier

Page 23: 1 Web Server Administration Chapter 8 Providing E-mail Services

23

Minimal sendmail.mc Filedivert(-1)include(`/usr/share/sendmail-cf/m4/cf.m4')OSTYPE(`linux')define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnlFEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnlMAILER(smtp)dnlMAILER(procmail)dnlCwtechnowidgets.com

Notice that the strings are enclosed with a backtick and an apostrophe as in `linux'

Page 24: 1 Web Server Administration Chapter 8 Providing E-mail Services

24

Installing and Configuring IMAP4 and POP3 for Linux Both IMAP4 and POP3 are included in

the imap-2001 package Once installed, you have to enable the

daemons by either editing their configuration files such as /etc/xinetd.d/imap or using chkconfig chkconfig imap on

Then you restart xinetd to recognize the changes service xinetd restart

Page 25: 1 Web Server Administration Chapter 8 Providing E-mail Services

25

Configuring E-mail Clients-Typical Information Required

SMTP server IP address Your e-mail address Your e-mail password POP3 or IMAP4 server IP address

Page 26: 1 Web Server Administration Chapter 8 Providing E-mail Services

26

Web-based E-mail Clients Web-based e-mail clients allow you

to use your browser Exchange 2000 can be configured

for Web-based e-mail using Outlook Web Access

Public sites, such as Microsoft's Hotmail and Yahoo! Mail, have been very popular

Page 27: 1 Web Server Administration Chapter 8 Providing E-mail Services

27

Web-based E-mail Clients-Advantages

Because a browser is used, no client configuration is needed

The lack of configuration can significantly reduce support costs

No specialized client software is needed Users are not required to retrieve e-mail from

specific computers that have been configured for them

POP3 or IMAP4 protocols are not required, which reduces server-side support

Because Web-based e-mail is not constrained by POP3 or IMAP4 protocols, a richer environment can be developed that extends beyond basic e-mail

Page 28: 1 Web Server Administration Chapter 8 Providing E-mail Services

28

Summary E-mail has evolved over the years Microsoft Exchange 2000 and

sendmail are the two of the most popular e-mail server products

DNS plays a central role in messaging

Three major protocols are involved in e-mail SMTP, POP3, and IMAP4