E-mail security: how does e-mail work (I).

To be able to know how to protect our e-mail from all the threats it’s important to know how does it work. Let’s have a look at it from up to down.

In first place, what do you need to know to send an e-mail to someone? Of course, you need his e-mail direction, which is made of two parts, a username and a server, separate by the @ symbol. So if the username is john and the server is test.com the e-mail dir will be john@test.com. Reversing it, if your e-mail dir is joe@mailtest.com then the username is joe and the server is mailtest.com.

An e-mail is made of two different parts: a header and a body. The header is where data abou the e-mail itself is stored, as the sender, the destination, the date it was sent, the subject,… The body is where the text of the e-mail is stored and it can only contain plain text. If you are asking, then, how can you send files by e-mail, the answer is they are converted to text format first and appended to the body of the e-mail.

Let’s see an example of a complete e-mail:

Return-path: <sender@senderserver.com>
Envelope-to: recipient@recipientserver.com
Delivery-date: Thu, 13 Mar 2006 02:09:17 +0200
Received: from senderserver.com	by recipientserver.com with esmtpa
	id 1EUvIf-0006dK-6q; Thu, 13 Mar 2006 02:07:21 +0200
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Message-Id: 910f0e319d43d9d1a446c9b8bde8f1e7@senderserver.com
Content-Transfer-Encoding: quoted-printable
Reply-To: sender@senderserver.com
From: Sender <sender@senderserver.com>
Subject: An example of an e-mail
Date: Thu, 13 Mar 2006 02:06:22 +0200
To: recipient@recipientserver.com

This is an example of an e-mail.

The part before the blank line is the header, with all the metadata of the e-mail. Usually, our e-mail programa hides most of this data and only shows the sender the recipient and the date, altough this can be configured.

The text of the e-mail is only “This is an example of an e-mail”, but all the rest is needed to transmit the message correctly.


3 Responses to “E-mail security: how does e-mail work (I).”


  1. 1 Felipe Alfaro Solana

    I’m not sure that the component standing at the right of the at (@) sign of an e-mail address is the server name. I would say the component at the right of the at sign could be an e-mail domain or the FQDN of an MTA (SMTP server).

    For example:

    user1@madrid.company.es

    Is “madrid.company.es” an e-mail domain name or the FQDN of a MTA host? To know, an MTA or MUA will, in first place, try to resolve a DNS MX RR corresponding to “madrid.company.es”. If no MX RR is found, the MTA or MUA will try to resolve a DNS A (or AAAA for IPv6) RR corresponding to “madrid.company.es”. If the MX query succeeds, then “madrid.company.es” is an e-mail domain. If the A (or AAAA) query suceeds, then “madrid.company.es” is the FQDN of a host called “madrid.company.es”.

  2. 2 madelman

    Yeah, Felipe, that’s true. One of the consequences of oversymplification is that you get some technical errors. I didn’t want to get deeply technical, as I want to remain these series useful for beginners.

    Anyway, your explanation is correct, so if the email dir is user@server.com, probably the mail is send to the server mail.server.com, depending on the DNS settings. But to explain this I would need to explain how DNS works and that will probably come in a future series of articles :)

    Thanks for your comments :)

  1. 1 Becoming paranoid » E-mail security: types of undesired mail

Leave a Reply





Sponsored links


Search

Search in the Becoming paranoid Archive


Subscribe

Enter your email address:

Delivered by FeedBurner