From the course: CompTIA Network+ (N10-009) Cert Prep
Email servers and clients
From the course: CompTIA Network+ (N10-009) Cert Prep
Email servers and clients
- Junk, important, bills, pretty much the usual state of affairs for my mail. Now, when we're talking about mail in the TCP/IP world, what we're really talking about is good old email. Now, when we're dealing with email, you're dealing with sending mail and receiving mail. So what we're going to be starting off with here is kind of old school email where you would have an actual client, they would have names like Outlook or Thunderbird or things like that that you'd be running on your local computer. Granted today a lot of us use things like Yahoo and Gmail, which are web-based, but I don't want you to think of those terms yet. Let's go back a few years to the days when email was run through old school clients to old school servers. Okay, well, once again, here we are with a machine set up as a server and a machine set up as a client. Now, before we get into this too much you need to appreciate when it comes to email. Well, let's look at it from the client side. You're going to be sending email to deliver to other people, and then you're going to be receiving email that other people have sent to you. So you really have two different things going on. Now, on the sending side, we use a protocol called SMTP, simple mail transfer protocol, and that runs on TCP port 25. And that's pretty universal. If you talk about how you receive email, you've got two choices here. Both of these are pretty commonly used. The older one is called post office protocol version three or POP 3. Pop three runs on TCP port 110, getting the impression that network plus really wants you to memorize a bunch of ports. You're right. Now the other competitor to POP 3 is called hold on, internet message access protocol. And this one's version four. IMAP runs on TCP port 143. So when you're setting up email, on the server side, you'll be setting up the SMTP part, and then you're going to decide whether you're going to be IMAP or POP 3, and then your clients are going to have to be configured. So people will say things like, oh, is your server IMAP or POP three? Because when we configure it, we're going to need to know that. So when it comes to email servers and clients, it's extremely common to have one piece of software that acts both as an SMTP server, as well as either a POP 3 or IMAP server. That's extremely common. Okay, so what I've got here is this is my server side and I'm using an email server called hMailServer. There's hundreds of them out there. I kind of like this one. The thing to keep in mind is that when you're setting up an email server, it's extremely common for one piece of software to act as both the SMTP server, as well as either the IMAP or the POP server as well. So what we're going to do here is since email's based on domain names, the first thing we're going to do is create a domain. Now, I've created domain here called timmy.local. Timmy.local is a domain that can't be out on the real internet. So if it's like .coms or .orgs, this isn't part of the true internet DNS service. So, and that's why we use it 'cause it's just kind of an internal thing, but it works fine. So then we have to make some accounts. So I've made three accounts here. So dave@timmy.local, fred@timmy.local and mike@timmy.local. And once I get this up and running, it pretty much automatically works. Now this is an SMTP server and it's also a POP 3 server. There's no settings for it because that's all it does. So that's it, and it's working. So the email server is up and running. Now, once this is up and cooking, we can go ahead and let's take a look at the client and what we have to do to get this guy set up. Now, for the client side, I'm going to choose a very popular program called Mozilla Thunderbird. Now, keep in mind that this is a self-standing email client. I know a lot of people these days like to use web mail and there's nothing wrong with that. I use it like crazy. But the Network Plus wants you to understand this older way of doing things when it comes to email. So let's take a look at what we've got here. So I've set up this email client for mike@timmy.local. Now what I want to do is let's just take a look at some of the settings here. Whenever you're setting up an email client, you're going to have to be setting up your SMTP side and then your POP or your IMAP side. So I'm going to go down to SMTP. And if we take a look here, I set this guy up and I typed in the IP address for this server. So I just typed in the 202.13.212.104. So you'll see that my port is 25. Now, I need to warn you, as you're looking through these screens, you're going to see a lot of stuff like this. And that's because most email that's done in this old client style is now done in a secure way. So that's not covered on Network plus. So we're kind of doing it old school here. So it's going to be using SMTP port 25. Okay, now the other side and every one of these clients is different. So on this particular guy, the server type is set up as a POP mail server, and you can see it's the exact same server number because my server does both and the port is 110. So if I wanted to change this to IMAP, well, I'd actually have to end up deleting this entire thing and then resetting it up from scratch. Now, once I'm set up, I can do all the usual things that we're used to seeing with email. I can send mail, write stuff, whatever I want to do. And this puppy is pretty much set up. The big thing that people are asking about all the time is what's really the difference between POP and IMAP? Well, the difference is fairly subtle, but it's important. POP is very old school in that anything you have up on your server is simply copied down. Individual emails are copied down to your computer. On your client, you can set up folders and things like that and organize your email, but it's just done on your client. IMAP is kind of like, well, it's a lot like web-based mail where you can set up folders online and those folders are always there no matter where you log in. So with an IMAP email server, copies of your email are left online unless you explicitly want to take them out. They're left online and you can create folders and things like that that will be matched on your client. So IMAP is a little bit more popular these days than POP and it's really up to whoever set you up, your email server, how you set up your client to use one or the other. Okay, so now that we've seen both the server side and the client side, let's go through the process of sending and receiving some email and let's actually watch using Wireshark, what that email looks like. Now I'm back on the server and what I've done here is I went ahead and fired up Wireshark and what I did is on another machine, I went ahead and sent an email. So the client is sending the email, but the server here is actually receiving an SMTP packet from the client, and then he'll go ahead and send it on from there. So what I need to do is filter out all this goo, there's some SMTP, so let me just filter on SMTP, let's apply that. Okay, so what we're looking at here is the actual SMTP packet, packets as they're being sent. So once again, here's the server and here's the client itself. So we, oh god, I missed another packet right at the beginning, but that's okay. So here we go. It goes through an authorization and it's then going to be, it actually sends a challenge authentication, and now it's sending the email itself. Remember the email's coming in. So let's take a look at this. We can actually follow the TCP stream and you can see the email local and he says, okay, send it. And this, there's not much to be said here. It just says this is the second test email. So not too terribly exciting, but there it is pretty much ready to go. Now, the one thing I didn't get on this capture is the actual login process. So logging in and all that type of stuff with email is done in all these separate little individual commands. So I didn't see that one. If I had seen it though, it would've been totally in the clear. So that's the basics of email. Make sure you've got your three big port numbers memorized. SMTP is port 25, POP is on port 110 and IMAP is on port 143. Do keep in mind though that this old school email is completely in the clear. We do have other technologies that allow emails to be encrypted today using a lot of different ways to do it. We'll be covering that as we do encryption in later episodes. But for right now, remember you've got an email client, you've got a server, and you've got three port numbers you need memorized for the exam.
Contents
-
-
-
-
-
-
-
-
-
-
TCP and UDP7m 9s
-
ICMP and IGMP5m 55s
-
Explaining traffic types4m 44s
-
Handy tools6m 30s
-
Wireshark protocol analyzer10m 25s
-
Introduction to netstat7m 31s
-
File transfer protocol (FTP)9m 56s
-
Email servers and clients9m 7s
-
Securing email5m 34s
-
Telnet and SSH9m 2s
-
Network time protocol (NTP)4m 46s
-
Network service scenarios9m 20s
-
-
-
-
-
-
-
-
-
-
-
-