What is a Email Message ? known as Internet Message or RFC822

About

An email is a document that is composed of the following structure

  • one or more headers
  • followed by a body that may be composed of multi-parts:
    • Text part
    • HTML part
    • Attachment and Inline Images

It's a network message known as:

The format is described in RFC822 Internet Message Format.

The email can be found after the DATA or BDAT smtp command in the SMTP protocol. ie this is the message.

Example

Delivered-To: [email protected]
Received: by 2002:a05:6504:519b:0:0:0:0 with SMTP id z27csp820130ltq;
        Fri, 12 Jun 2020 12:08:19 -0700 (PDT)
X-Google-Smtp-Source: ABdhPJzM66OAweomG9vKiJ5AWPP0ohl2MoXV5gWEkK6qjMEbbi7zYkA0YtlEAlN2q+zIayLrmH2K
X-Received: by 2002:a7b:c186:: with SMTP id y6mr410599wmi.82.1591988898906;
        Fri, 12 Jun 2020 12:08:18 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1591988898; cv=none;
        d=google.com; s=arc-20160816;
        b=TCI6uKqvNsf837MdYuidYRQJXym4/du4gMiXIDqrfvkJodVd7CFPK3cOoawD8OiT8E
         Hm2dTBOVIOpZElxKAlfFkiUorasnIgTgfSV4GmdmRyRPnb+9kieuIVntFHVYfn1gmQU9
         eXf/M7q/tUl4EH6qyjr3gAgQ1+xAWWhexsGWdAreFfUzNgoVtGDvpbN+VVlQZdt50QWc
         8vdzg04mBmpH3AoB2todjh8TpiDKCJJDVeC6v/bXNZ02T4lL9KRPhr4ZjPQQ/ocS07Ez
         AUGZqgKMSXWswq8Lj7avngjwl5a1yoEb+07pGzJL/lOT9BeWSECwfnC1vexkGVXB/pyR
         XZVw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=from:message-id:content-transfer-encoding:mime-version:user-agent
         :subject:to:date:dkim-signature:dkim-filter;
        bh=WBggpZrfs7F0OzQkyE7LiZPHyfFFhl7N4CNav2f5YVw=;
        b=0B+TDvc+p0JWW/204sbMHyWdqPQDdEW+3lmKdn2aZu9vuS8Tc1tQmnd3eoEMhRFi0Z
         Vn3LIIBIYnX1oaYlkOWmPuQ5sczzPUxVQbfip0MQ0GDakNwOQJKy+jBMeV3bc+T/KRN3
         yJjFrvfJWwLBoQVIC+lkJVhY3Uj92SM2W7aTL3U3N4P5vvcwIzl1OLEm+aB5kNPbmIj9
         u0Im/2y60y8IOXx2Kh3lrDdJeyFAmrsng5XZDQjL6rM80VA1zm0kA/GUOPgcJE72A5N4
         oBivn/1DdD7piqw3EP6X4u/09owyOvHZW1ENU1GoAFVqPRMvw1s6WF4+eng0j+BensZu
         VeyQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass [email protected] header.s=vps748761.ovh.net header.b=ByN4Iw4U;
       spf=pass (google.com: domain of [email protected] designates 164.132.99.202 as permitted sender) [email protected]
Return-Path: <[email protected]>
Received: from server01.bytle.net (server01.bytle.net. [164.132.99.202])
        by mx.google.com with ESMTP id v21si7421752wra.299.2020.06.12.12.08.18
        for <[email protected]>;
        Fri, 12 Jun 2020 12:08:18 -0700 (PDT)
Received-SPF: pass (google.com: domain of [email protected] designates 164.132.99.202 as permitted sender) client-ip=164.132.99.202;
Received: by server01.bytle.net (Postfix, from userid 0)
	id 3E16E1FBE8; Fri, 12 Jun 2020 21:08:18 +0200 (CEST)
DKIM-Filter: OpenDKIM Filter v2.11.0 server01.bytle.net 3E16E1FBE8
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytle.net;
	s=vps748761.ovh.net; t=1591988898;
	bh=WBggpZrfs7F0OzQkyE7LiZPHyfFFhl7N4CNav2f5YVw=;
	h=Date:To:Subject:From:From;
	b=ByN4Iw4U9RP8bzaPK0n3HJbFlvI60ett+V9pkoli+UNtdAcSdq/ANc3hL71PzjrT4
	 3yyTjK3MC5e2f/k+BAnIaAgnradAK/1CbMF4vMZVD6WoVIx7KTZlfWsW39Ir8PhqYQ
	 4TKvPpDUx8ToxUz1gwQlxJoExYW3McXJ2WdvUAf8=
Date: Fri, 12 Jun 2020 21:08:18 +0200
To: [email protected]
Subject: Without hosts dkim test !
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <[email protected]>
From: [email protected] (root)
cc: [email protected]
bcc: [email protected]

This is the body of the email

where:

Structure

An email has:

  • headers (key pair value) such as:
    • the sender’s address,
    • then the recipient’s address
    • address,
    • mimetype, …
  • body (text written in the defined mime format)

where:

  • Every logical line starts without space.
  • A line with a space at the beginning is the continuation of a logical line
  • Headers are separated from the body by a blank line

Storage

The mime message are stored in a mailbox

How to see the original email by provider

Gmail

To see the text format of the email (the original), you can ask it in the email menu

Gmail Show Original Email

Library

Specification

  • Rfc2822 - Internet Message Format
  • Rfc733 - STANDARD FOR THE FORMAT OF ARPA NETWORK TEXT MESSAGES





Discover More
Card Puncher Data Processing
Email (Internet Message)

An Email is just a document known as the MimeMessage or Internet Message Format that: is send and received between email server and managed via a client known as the Mail User Agent This is in the...
Email - Email processing

Every server that handles an email message adds some information to the message headers. At a minimum, the SMTP server will add a Received header, which indicates when and how it handled the message....
Opendkim Test Mailer
Email - How to test if your server email configuration was done correctly ?

This article will show different server configuration testing in order to validate your email server configuration
Email - Mailbox

A mailbox is a file where the emails message are stored. A user application (known as MUA) can read and write a mailbox The Mail Delivery Agent will write the email received by the SMTP server (MTA)...
Gmail Original Message Id
Email - Message Id

A Message-ID is an email identifier. It is generated by the client sending the mail and added in the Message-ID header An message id is generally the concatenation of: a timestamp the local hostname...
Email - Mille and one way to send an email (professional and user)

This article shows you Mille and one way to send an email (ie known as transport in SMTP. submission port Before continuing, you need to know the basics of email and how it works with SMTP. If you...
HTML emails - How to write them correctly

There is a lot of fuzz concerning how you should write the HTML for email. This article will give you on the good track and this is not as scary as it seems
How does the email system work? SMTP, POP, IMAP explained

This page gives you the foundations of the email system. At the end, you should be able to understand why when you configure your email client, you need to set up: The SMTP configuration And the...
Dkim Record Text Format Ovh Dns Zone
How to configure DKIM with PostFix, a step by step guide

This article will show and explain you how to install DKIM with OpenDkim as a milter for Postix on CentOS
Postsrsd Spf Pass
How to install the Sender Rewriting Scheme (SRS) on PostFix?

This page is the installation of postsrsd which implements Sender Rewriting Scheme (SRS) for Postfix. It's mandatory if you forward emails via the alias functionality....



Share this page:
Follow us:
Task Runner