The Linux Operating System Lecture 7: Email Tonga Institute of Higher Education.

Slides:



Advertisements
Similar presentations
Basic Communication on the Internet:
Advertisements

Remote mailbox access gateway Software lab project.
Exchange server Mail system Four components Mail user agent (MUA) to read and compose mail Mail transport agent (MTA) route messages Delivery agent.
CS 497C – Introduction to UNIX Lecture 38: - Electronic Mail Chin-Chih Chang
Tony Brett Oxford University Computing Services OUCS Learning Technologies Group December 2005 Outlook: and more Tony Brett Oxford University Computing.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols Network Fundamentals – Chapter.
2440: 141 Web Site Administration Services Instructor: Enoch E. Damson.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
中華技術學院 Linux 課程 中華技術學院 Linux 課程 Chap Four : Mail 王俊城RHCE/RHCX.
-I CS-3505 Wb_ -I.ppt. 4 The most useful feature of the internet 4 Lots of different programs, but most of them can talk to each.
CT NIKHEF Nov Mail NIKHEF CT system support.
Web Design Terms and Concepts Ms. Scales. Q. What is a Server? A. A server is a computer that stores information many people can access. It runs special.
1 Application Layer Protocols. 2 Those protocols run on top of/over TCP/IP: Those protocols run on top of/over TCP/IP: TelnetTelnet File Transfer Protocol.
1 Linux Networking and Security Chapter 3. 2 Configuring Client Services Configure DNS name resolution Configure dial-up network access using PPP Understand.
Electronic Mail (SMTP, POP, IMAP, MIME)
Mail Server Setup MAIL SERVER SETUP.
Microsoft Windows 2003 Server. Client/Server Environment Many client computers connect to a server.
Chapter 7: Using Windows Servers to Share Information.
PC Maintenance: Preparing for A+ Certification Chapter 25: The Internet.
Mail Server Three major components MTA MUA MDA Mail Transfer Agent
Mail Services.
Intro to Computer Networks Bob Bradley The University of Tennessee at Martin.
1 Computer Communication & Networks Lecture 27 Application Layer: Electronic mail and FTP Waleed.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 12 Electronic Mail.
A form of communication in which electronic messages are created and transferred between two or more devices connected to a network.
Chapter 10 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain how the functions of the application layer,
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 3: TCP/IP Architecture.
Webmail. Agenda Why use webmail? Why use webmail? What is webmail What is webmail – basic » system MDA MDA MTA MTA MUA MUA »Protocol SMTP SMTP.
CSIE 1 Filtering mail Speaker: Chung yu Wu Adviser: Quincy Wu Date: 2005/12/07.
BY SAGAR SINHA SAPTARSHI BAKSHI SARTHAK JAIN SHAILZA CHAUDHARY
WXET1143 Lecture7: , Chat and Messaging. Introduction  Electronic mail is everywhere.  Now many people in business, government, and education use.
CPT 499 Internet Skills for Educators Electronic Mail Session Five.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Network Services Networking for Home and Small Businesses – Chapter.
Local Area Networks (LAN) are small networks, with a short distance for the cables to run, typically a room, a floor, or a building. - LANs are limited.
INSTALLING MICROSOFT EXCHANGE SERVER 2003 CLUSTERS AND FRONT-END AND BACK ‑ END SERVERS Chapter 4.
Recovery-Oriented Computing User Study Training Materials October 2003.
HTTP HTTP stands for Hypertext Transfer Protocol. It is an TCP/IP based communication protocol which is used to deliver virtually all files and other.
1 Using Messages sent from machine to machine and stored for later reading. You will use a client to read –Type mail or pine in UNIX to read.
The Internet 8th Edition Tutorial 2 Basic Communication on the Internet: .
Linux+ Guide to Linux Certification, Second Edition Chapter 14 Network Configuration.
Postfix Mail Server Postfix is used frequently and handle thousands of messages. compatible with sendmail at command level. high performance program easier-
1 Electronic Messaging Module - Electronic Messaging ♦ Overview Electronic messaging helps you exchange messages with other computer users anywhere in.
Proxy Server PROXY SERVER. What is a Web Proxy? Proxy Server A proxy is a host which relays web access requests from clients Used when clients do not.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
1 COP 4343 Unix System Administration Unit 14: – send and receive mail – mail filtering – mail server – mailing lists.
LinxChix And Exim. Mail agents MUA = Mail User Agent Interacts directly with the end user  Pine, MH, Elm, mutt, mail, Eudora, Marcel, Mailstrom,
SMTP Tapu Ahmed Jeremy Nunn. Basics Responsible for electronic mail delivery. Responsible for electronic mail delivery. Simple ASCII protocol that runs.
A Quick Look At How Works Understanding the basics of how works can make life a lot easier for any user. Especially those who are interested.
4343 X2 – Outline The Domain Name System The Web.
Linux Operations and Administration Chapter Twelve Configuring a Mail Server.
More TCP/IP Protocols Chapter 6. TCP Transmission Control Protocol Connection-oriented Provides flow control Sequencing (putting the segments back in.
Internet Flow By: Terry Hernandez. Getting from the customers computer onto the internet Internet Browser
26.1 Electronic Mail Sending/Receiving Mail Addresses User Agent MIME Mail Transfer Agent Mail Access Protocols.
1 Outlook web app مریم جعفری. Preface 2 Webmail (or web-based ) is any client implemented as a web application running on a web server. Examples.
– Protocols 21 – Protocols 21. – Protocols 21 Now we’ll move on to more technical aspects of This means protocols Remember.
IST 201 Chapter 11 Lecture 2. Ports Used by TCP & UDP Keep track of different types of transmissions crossing the network simultaneously. Combination.
Understanding POP3 / IMAP Created by : Ashish Shah, J. M. Patel College of Commerce 1.
Network Programming 10- SMTP-POP3
Tonga Institute of Higher Education IT 141: Information Systems
UNIT II Configuring additional hardware. Everyday task using Linux.
SUBMITTED BY: NAIMISHYA ATRI(7TH SEM) IT BRANCH
Networking for Home and Small Businesses – Chapter 6
HmailServer Karam al-sofy & Faten alhasan.
Topic 5: Communication and the Internet
Tonga Institute of Higher Education IT 141: Information Systems
has many aspects that work together to give people almost instant communication from any computer on the internet to any other computer There.
Tonga Institute of Higher Education IT 141: Information Systems
Unit – 4 Chap - 2 Mail Delivery System
Chapter 7 Network Applications
Presentation transcript:

The Linux Operating System Lecture 7: Tonga Institute of Higher Education

● has many aspects that work together to give people almost instant communication from any computer on the internet to any other computer ● There are three main parts that we will look at: sending on a server, receiving on a server and receiving as a client ● The simplest is to receive as a client. ● You merely put in the name of the server that holds your and download it. ● On Linux, you can view your through many different programs. There are graphical programs like Mozilla, Ximian Evolution and Kmail ● You can also use programs from the command line like 'pine' and 'mutt'

on the Server ● Getting and reading is simple on a client, but setting up a server to get and send requires a little more understanding of how works ● There are three parts to have an server – The MTA – Mail Transport Agent (most people use the program called 'sendmail') – The LDA – Local Delivery Agent (most people use the program procmail) – IMAP and POP3 servers – these are two ways to get from a server. When a client connects to a server to get , they will use one of these servers

Setting up Sendmail ● Sendmail normally runs with all RedHat distributions, so you won't need to start any service. ● Sendmail is a Mail Transport Agent – this means that it is a program which moves mail from one computer to another computer. It is estimated that 80% of all is handled by Sendmail today. ● With Sendmail, you can do many things, like block spam, relay mail, have forwarders and configure ways to route mail automatically across networks. ● Like most Linux programs, Sendmail is changed through configuration files

Setting up Sendmail ● Setting up Sendmail can be an enormous task if you want to do complicated things, but if we just want it to accept , we can keep it simple. ● First change into /etc/mail where the sendmail files are saved ● Sendmail has a different configuration, where you edit files and then compile them into a form that Sendmail likes to see ● First open the file “access” - This is the file that contains all the domains that will be allowed to use your Sendmail to send s. You’ll also want to make a file called “relay-domains” and put your domain in there. ● This is to stop people from outside using your server to send spam ● You need to add in your domain here and any domains that might be own your network

Setting up Sendmail ● You'll also want to open up the file “local- host-names” - This will contain other names for your computer, so that Sendmail will still accept mail from these domains. ● This file should contain any other names you have for your computer ● Now your sendmail will know who it is good to accept mail from and who it is not good. ● If you haven’t set these up the right way and you are not receiving mail, you can look inside “/var/log/maillog” for any error messages

Setting up Sendmail ● The actual sendmail configuration file is in “sendmail.cf” but it has become so complicated they made another configuration file, which you then compile to make into the “sendmail.cf” ● In RedHat, they use this program called “m4” to generate the sendmail.cf file ● So after we edit the “sendmail.mc” file, we use m4 to change it, like root]# m4 sendmail.mc >

Setting up Sendmail ● Now that you have the configuration set up for Sendmail, you can restart the service if you want to take the new changes into affect ● So we use the service command to restart sendmail ● root]# service sendmail ● And you can check to see if it's running by using 'ps -aux' and you'll see an entry that says, “sendmail: accepting connections” This means that it is up and running and people can send to your server ● But how does anyone else on the Internet know how to send to your server?

MX Records ● MX Records – Mail Exchange records are part of the DNS system for the entire Internet. In order for other computers to know where to send you , you need to have the correct MX records set up on some Name Server on the internet. ● They use a numerical priority determines the order in which servers should be used. ● The server with the lowest priority is the primary. In DNS, the MX records will look like the following. ● In this example, mail.example.com handles mail, but mail.connect.com will also accept mail if the primary is down: example.com. IN MX 10 mail.example.com example.com. IN MX 100 mail.connect.com

Local Delivery Agents ● In most RedHat distributions, Sendmail will get the mail from some server on the Internet and then pass it off to another program for local delivery ● This means there is another layer of handling before an will reach your inbox. ● Procmail is usually the program that is chosen to do the local delivery. ● The reason that there is another layer is that it is easy to do things to mail after it has come in with procmail. For example, you could sort mail into different folders, delete it if it is spam or make copies of everybody's

Procmail ● When a new message comes in, Procmail will start automatically and deliver the mail to the correct folder for the person to read it ● You can change how mail is delivered though through a procmail configuration file. ● Initially, there is no configuration file for procmail, because it will just give whatever mail comes in to the person who should receive it ● You can make one yourself though by creating a file called “/etc/procmailrc” ● This is the file where you can put rules that will change how mail is delivered

Procmail configuration ● Procmail configuration let's you do almost anything you can imagine to , but you have to know the right way to configure ● Once you have the procmailrc file open, you can start putting rules. ● For example, if you want to make a copy of everyone's so you can read it yourself: :0c /home/mycopy- ● The ':0' part says that a new rule is starting. The 'c' says copy all and the following line says where to copy it. ● If you left out the 'c', it would instead send all to that file

Procmail Example: If you wanted to delete all that came from a certain domain :0 * /dev/null ● The first line says a new rule is starting. The next line checks if the 'From' field is from 'bad- ● The last line says move that message to /dev/null if the is from that person ● /dev/null is like the trash bin for linux. If you move something there, it delete's it automatically.

IMAP and POP3 ● The last part of setting on the server is to have a way for users to get that . ● The most popular way is through to services called IMAP and POP3 ● IMAP - Internet Message Access Protocol ● It permits a "client" program to access remote message stores as if they were local. ● For example, stored on an IMAP server can be manipulated from a desktop computer at home, a workstation at the office, and a notebook computer while traveling, without the need to transfer messages or files back and forth between these computers.

Turning on IMAP ● To get IMAP and POP3 working on your server, it is not difficult, but can be confusing because there are no startup scripts in the “rc.d” folder ● To get them started, you need to edit a file called “/etc/inetd.conf” ● This file has a list of all the services that are running and what ports they are connected on. ● Look down the list until you see the info for port “139” – pop3 and “143” – IMAP. ● Uncomment those lines and the next time you restart the server, IMAP and pop3 should be started

POP3 ● The other way to get is through the POP3 service ● POP – Post Office Protocol ● It was the first way to get from a server. POP3 is the latest version, which has replaced POP2. ● POP is different from IMAP in that everything is downloaded to the client machine. Thus, if you make a change to your mail, it will only be changed on the client machine and not the server ● You can turn it on using the same procedures from IMAP

SMTP ● You will also hear about SMTP servers if you use computers. ● SMTP – Simple Mail Transfer Protocol – is a program that runs on a server and will send messages ● When we set up and turned on Sendmail, the SMTP server also started. ● When you send from a client computer, you need a SMTP server to send it through. This is what is responsible for sending those messages to the rest of the Internet ● It operates on port 25. A good way to see if it is running, try – root]# telnet localhost 25 ● What this command will do is use the telnet program to connect to port 25 on the computer you are using. You will then be able to see the protocol and server messages coming from the SMTP server

IMAP and POP ● You can also see how the IMAP and POP servers work by using the same telnet idea ● IMAP runs on port 143 ● POP3 runs on port 110 – root]# telnet localhost 143 – root]# telnet localhost 110 ● What happens then is that the IMAP or POP server thinks it is connected to something that will know how to speak it's language. If you knew the protocol that IMAP or POP used, you could get your this way too.

Local and Remote ● You should be aware of when you are getting from remotely and when you are accessing it locally on the server ● If you telnet into a server, and use a program like 'pine' or 'mutt' this means that you are accessing the local copy of the . ● Your is saved in a file in the “/var/mail” directory under your username. These programs open up that file and break it up so that it looks like there are many messages ● IMAP and POP3 are services that run on a server that allow client computers to use different programs (like Microsoft Outlook) to access over a network. IMAP and POP will also open up your mail file, but they are not programs you use to read . They are servers that will send your to program that asks for it

Updating programs ● Sendmail, especially, but also IMAP and POP3 have been vulnerable to many security holes in the past. ● This is because they run as root, so if you can break in through the program, you can have root access to the system ● So one of the first things to do is to update Sendmail (get the newest from sendmail.org) and then IMAP as well. ● Generally, the installations are pretty easy, but we might need to change startup scripts.

Summary ● Again, we've condensed a lot of information into a short sequence of notes. Sendmail, procmail, IMAP and POP are all powerful programs with many different possible configurations ● For more information about Sendmail: – ● More information about Procmail – ● More info about IMAP – ● More info about SMTP –