Presentation on theme: "Chapter 8 Providing E-mail Services. Overview Understand the e-mail environment Understand e-mail protocols Administering the Microsoft Exchange."— Presentation transcript:
Chapter 8 Providing E-mail Services
Overview Understand the e-mail environment Understand e-mail protocols Administering the Microsoft Exchange 2000 Installation and administering sendmail for Linux Install and configure IMAP4 and POP3 servers for Linux
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, many email servers were not able to take advantage of Internet e-mail Most common email server products Sendmail (Linux) Exchange (Windows)
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 What about the goofy cartoons (emotions) you can include in your email?
Role of DNS in E-mail Systems Sending email messages requires configuring DNS 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 a mail exchange (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 IN indicating the domain name MX representing a Mail Exchange (MX) record – other options could be A or NS
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 software Formats the message and prepares it for sending to MTA Outlook, KMail MDA (Mail Delivery Agent) Part of the email server Delivers e-mail from server to MUA Exchange 2000, imap-2001
E-mail System Terminology Masquerading Replace actual host name with domain name Actual host name is replaced mail2.technowidgets.com ffarid@ mail2.technowidgets.com becomes ffarid@ technowidgets.com (masking the full host name) Relaying The process of sending e-mail to an intermediate e-mail server (MTA) before the message is transmitted to its final destination When single MTA is available, relaying should not be allowed from the Internet because spammers could use it to send e-mail
E-mail Protocols SMTP (Simple Mail Transfer Protocol) Text-based protocol used to send e-mail messages Does not concern any concerns about security Both client and server use it POP3 (Post Office Protocol) To retrieve e-mail Email client uses it to read, list, and delete email messages Typically, all messages are downloaded to a client IMAP4 (Internet Mail Access Protocol) More complex than POP3 To retrieve e-mail E-mail stays on the server and can be retrieved from any computer that has an email client and supports the protocol You can create folders on server to store e-mail
Understanding SMTP The commands are processed by the SMTP server CommandPurpose 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
Understanding SMTP The SMTP headers add descriptive information HeaderDescription 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
Understanding SMTP Sample session (commands and headers) HELO WKS1 Sending the name of the host 250 web1.technowidgets.com Hello [127.0.0.1] MAIL FROM: XYZ@yahoo.comXYZ@yahoo.com 250 2.1.0 firstname.lastname@example.org....Sender OK RCPT TO: email@example.com 250 2.1.5 firstname.lastname@example.org DATA 354 Start mail input; end with. This is a simple message. QUIT Response Code Carriage Return Line feed
Understanding POP3 Less complex than IMAP4 First step is to logon with user name and password List, read, download, delete e-mail
Common POP3 commands CommandDescription 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
Understanding IMAP4 Messages remain on server Requires much more space on server To keep track of the status of messages, flags are used (For example your free yahoo account) \Recent \Seen \Answered \Flagged \Deleted \Draft
Common IMAP4 commands CommandDescription 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.
Installing Microsoft Exchange 2000 Install SMTP is part of IIS Web Server Install NNTP (Network News Transport Protocol), also a part of IIS Used for newsgroup Active Directory is required for Exchange Once the above are installed, the Exchange wizard guides you through a simple installation Then, to use Exchange 2000 on Windows Server 2003, install Exchange 2000 Service Pack 3 is required
Installing and Configuring Sendmail for Linux Installed sendmail includes SMTP only Configure sendmail through a macro called m4 m4 /etc/mail/sendmail.mc >/etc/mail/sendmail.cf The macro is processed and sendmail.cf is created 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
Minimal sendmail.mc File divert(-1) include(`/usr/share/sendmail-cf/m4/cf.m4') OSTYPE(`linux') define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl MAILER(smtp)dnl MAILER(procmail)dnl Cwtechnowidgets.com Notice that the strings are enclosed with a backtick and an apostrophe as in `linux'
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
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
Projects and Labs
Linux Projects Project 8-1 Make sure your DNS works Go to page 374-375 and make sure you have added the two email entries in your reverse lookup table Make sure sendmail is installed: You should have checked the mail server box If you have to install it, there is no need to Start the program You should have a /etc/mail/sendmail.mc file. Make a back up of this file and modify it according to the text page 424 Using m4 utility create sendmail.cf page 424 step 5 Create a telnet session to send email telnet localhost 25 send a message to email@example.com@yyy.com Do cat /var/spool/mail/ firstname.lastname@example.org you should see the email@example.com Project 8-2 Test IMAP4/POP3 telnet localhost 143 Results must be similar to Page 428 telnet localhost 110 Results must be similar to Page 429 Project 8-5 Configure Kmail in Linux – create two users and send emails to each other Project 8-7 Do cat /var/spool/mail display all the messages (header and contents) the user has received Two servers should be able to send email messages to each other!
Windows Lab Do project 8-9 page 437 Send email from a Linux server to a Windows machine. If you Install Exchange 2000, and do you will receive Extra credit! Page 389- Installation steps! Page 392-Adminstering Project 8-3 page 429
Homework (April. 5 rd ) - submit through WebCT How can you access your email by using a browser in Linux? (Read chapter 8 pages 417-419; in Windows Web-based email product is OWA (Outlook Web Access). OWA uses XML or Dynamic HTML to transfer format processing from the server to the browser). Is there a similar capability in Linux? Is there a software to support Webmail for Linux? Are there software products that allow transferring format processing from the server to the browser? ) Extra Credit - Write a step-by-step procedure to install a software product in Linux that allows webmail. What is qmail in Linux? Can we use it instead of sendmail? What is it used for? Extra Credit – Implement qmail on a server in the lab or write a step-by-step procedure. (Do not copy the procedure from the Web – I have already read that! To get extra credit, you should write your own SHORT version) Find a Linux-based package that can be configured to allow instant messaging, (or audio and video conferencing). What is the difference between Gaim and Kopete? What is multicasting? What is source tree multicasting? Does email server utilizes multicasting? How? One way spammers send unsolicited email is by masquerading their message such that they appear to have come from your organization or some safe source. Elaborate on such spamming techniques. What do they do so that you cannot detect them? (Read about spamming technique. There are lots of ways to send spam and not get detected – There are many interesting articles about this in PCWORLD.com – Don’t just copy and paste – I have read them! Just write a brief summary) Let me know if you find errors in the book! Maximum Extra Credit will be 20 points
Errors in the book
Linux Email Server Labs Install sendmail (page 400 step 1-9) Configure the sendmail as sendmail.mc and store it in >/etc/mail/ Install and configure IMP4 and POP3 (page 404) Configure email client in Linux: Kmail installed automatically – create an account If you have problem with Kmail you may need to reinstall Kmail