{"id":403,"date":"2021-05-08T22:05:06","date_gmt":"2021-05-08T22:05:06","guid":{"rendered":"https:\/\/www.valleau.art\/blog\/?p=403"},"modified":"2021-05-08T22:05:06","modified_gmt":"2021-05-08T22:05:06","slug":"how-email-works","status":"publish","type":"post","link":"https:\/\/valleau.art\/blog\/how-email-works\/","title":{"rendered":"How email works"},"content":{"rendered":"<p>Here&#8217;s a brief explanation of how email works.<\/p>\n<p>When you send an email to a friend, it has an address like user@domain.ext. \u00a0The email you&#8217;re sending goes to an outgoing mail server (a computer) via Simple Mail Transfer Protocol. The SMTP servertries to figure out where to send it, but It doesn\u2019t understand people&#8217;s names or addresses however. &#8220;bill@gmail.com&#8221; means nothing to it at all. So the SMTP server contacts a Domain Name System server (another computer.) The DNS server is like an old phone book for the internet; it translates names to numbers, to an IP address like \u201c123.456.78.910.\u201d Then the DNS server checks that IP address to see if it can receive email. If so, \u00a0&#8230;<\/p>\n<p>The DNS Server sends the appropriate &#8220;decoded&#8221; infomation (the IP address) back to the first SMTP server. Now that it has the proper info, the message gets sent from that server to the target domain\u2019s mail exchange server (yet another computer). This server is called a MTA, or Mail Transfer Agent. the MTA decides exactly where to send the email. The MTA then transfers the email to your friend&#8217;s IMAP server (yes: another computer) where it resides on a hard drive until your friend goes and fetches the mail, to their own computer.<\/p>\n<p>If you&#8217;re counting, that&#8217;s 7 transfers between 6 computers.<\/p>\n<p>And just to make this all the more fun, every time something (such as an email or a web page) is sent over the internet, it is broken into tiny chunks, each with a header (ie destination address) and some chunk of the whole data. There may be only a few, or there may be thousands of these packets. And they do not all take the same route to get to the destination. Some may go almost directly while others may travel around the world. Along the way they have gone thru dozens or hundreds of other computers. Then they are all reassembled at the destination (even though they likely arrived out of order.)<\/p>\n<p>As you can see now, this IS &#8220;rocket science&#8221; and FAR more complex than you might have thought.<\/p>\n<p>And that&#8217;s the way every single one of the 300 Billion emails sent each day works.<\/p>\n<p>Nobody tracks all this as it is sent either. There are tens of TRILLIONS of packets flitting around the internet every day. Even computers cannot track all that.<\/p>\n<p>What does happen, however, is that the path taken is added to the hidden header inside each email. You probably didn&#8217;t know it was there, but it is. If you get an email, and your email software offers it, there may be a &#8220;view raw&#8221; option to show you what an email really looks like, and how it got to you.<\/p>\n<p>There&#8217;s an example at the end&#8230;*<\/p>\n<p>If you look at it, you&#8217;ll notice that because it&#8217;s filled as it goes along, it is not until the email is finally delivered that can you actually see the path it took.<\/p>\n<p>In other words, if it gets lost, then it&#8217;s well and truly lost and virtually impossible to track or find.<\/p>\n<p>With 300 Billion of -anything- it&#8217;s inevitable that thing will go wrong with some of them. That&#8217;s just the way the universe runs. In fact, that so many of them actually make the trip and get reassembled is pretty close to amazing.<\/p>\n<p>In my 40+ years using electronic mail, starting long before there was a public-facing &#8220;internet&#8221; I&#8217;ve received well over 2 million emails. Every now and then one doesn&#8217;t arrive. However, I&#8217;d wager that it&#8217;s been less than 1 in 100,000.<\/p>\n<p>When someone says &#8220;I didn&#8217;t get the email&#8221; chances are quite large that they are wrong. They got it and deleted it without reading it; it landed in their spam mailbox; it got filtered out by some over-eager host (looking at you Gmail and AOL!) But actually failing to reach the destination server is vanishingly rare.<\/p>\n<p>I&#8217;m inspired to write this because today I saw something I&#8217;d never seen before: the SMTP server at our host was giving every email a high spam score, so our email was being filtered into the recipient&#8217;s spam box (well, depending on their own personal spam settings, of course.) VERY embarrassing for our host, and they scrambled to fix it.<\/p>\n<p>Point is that I&#8217;ve never seen this in 40 years, so it was hard to diagnose, much less believe!<\/p>\n<p>So: there you are &#8211; more about email than you wanted to know. But&#8230; now you know! \ud83d\ude42<\/p>\n<p>Tracy<\/p>\n<p>Here&#8217;s the promised example email header:<\/p>\n<p>Return-Path: &lt;sender@someplace.com&gt;<br \/>X-Original-To: recipient@someplaceelse.net<br \/>Delivered-To: x11354805@pdx1-sub0-mail-mx43.g.SomeMailService.com<br \/>Received: from vade-backend20.SomeMailService.com (fltr-in2.mail.SomeMailService.com [66.33.205.213])<br \/>(using TLSv1.2 with cipher AECDH-AES256-SHA (256\/256 bits))<br \/>(No client certificate requested)<br \/>by pdx1-sub0-mail-mx43.g.SomeMailService.com (Postfix) with ESMTPS id 41EE298071<br \/>for &lt;recipient@someplaceelse.net&gt;; Tue, 4 Jun 2019 14:54:01 -0700 (PDT)<br \/>Received: from bonobo.elm.relay.mailchannels.net (bonobo.elm.relay.mailchannels.net [23.83.212.22])<br \/>by vade-backend20.SomeMailService.com (Postfix) with ESMTPS id C5B794000021C<br \/>for &lt;recipient@someplaceelse.net&gt;; Tue, 4 Jun 2019 14:54:00 -0700 (PDT)<br \/>Authentication-Results: vade-backend20.SomeMailService.com; dkim=pass<br \/>reason=&#8221;1024-bit key; unprotected key&#8221;<br \/>header.d=photography.org header.i=@photography.org<br \/>header.b=LMOB8Jy2; dkim-adsp=pass; dkim-atps=neutral<br \/>X-Sender-Id: SomeMailService|x-authsender|sender@someplace.com<br \/>Received: from relay.mailchannels.net (localhost [127.0.0.1])<br \/>by relay.mailchannels.net (Postfix) with ESMTP id 62CE91A21EA<br \/>for &lt;recipient@someplaceelse.net&gt;; Tue, 4 Jun 2019 21:54:00 +0000 (UTC)<br \/>Received: from pdx1-sub0-mail-a16.g.SomeMailService.com (100-96-38-146.trex.outbound.svc.cluster.local [100.96.38.146])<br \/>(Authenticated sender: SomeMailService)<br \/>by relay.mailchannels.net (Postfix) with ESMTPA id B04AC1A23C3<br \/>for &lt;recipient@someplaceelse.net&gt;; Tue, 4 Jun 2019 21:53:59 +0000 (UTC)<br \/>X-Sender-Id: SomeMailService|x-authsender|sender@someplace.com<br \/>Received: from pdx1-sub0-mail-a16.g.SomeMailService.com ([TEMPUNAVAIL].<br \/>[64.90.62.162])<br \/>(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)<br \/>by 0.0.0.0:2500 (trex\/5.17.2);<br \/>Tue, 04 Jun 2019 21:54:00 +0000<br \/>X-MC-Relay: Neutral<br \/>X-MailChannels-SenderId: SomeMailService|x-authsender|sender@someplace.com<br \/>X-MailChannels-Auth-Id: SomeMailService<br \/>X-Shoe-Bottle: 400ba0ab50630a71_1559685240240_2338004666<br \/>X-MC-Loop-Signature: 1559685240240:1840485062<br \/>X-MC-Ingress-Time: 1559685240240<br \/>Received: from pdx1-sub0-mail-a16.g.SomeMailService.com (localhost [127.0.0.1])<br \/>by pdx1-sub0-mail-a16.g.SomeMailService.com (Postfix) with ESMTP id C8E06800BE<br \/>for &lt;recipient@someplaceelse.net&gt;; Tue, 4 Jun 2019 14:53:55 -0700 (PDT)<br \/>DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=photography.org; h=from<br \/>:content-type:message-id:mime-version:subject:date:references:to<br \/>:in-reply-to; s=photography.org; bh=5L7HIklL0wCkU0ypcRkIUoRmaA8=; b=<br \/>LMOB8Jy2TBpllKQwm9NNS5plG3ibBzvke7p3apYYyOXM5246LJCNx8jCnLulvZjL<br \/>jR\/C0lk0bai\/zKfV+qYtxZjWAocbwKIQLXQjYc8tSEEJ2gcDeq0Ej7kLxeYGHHgQ<br \/>ognij93JyNKQv0w8M204mQ2AKoOC5kKV1fx1A41dpyk=<br \/>Received: from [192.168.1.32] (c-73-241-48-152.hsd1.ca.comcast.net [73.241.48.152])<br \/>(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256\/256 bits))<br \/>(No client certificate requested)<br \/>(Authenticated sender: sender@someplace.com)<br \/>by pdx1-sub0-mail-a16.g.SomeMailService.com (Postfix) with ESMTPSA id 4D9467FF46<br \/>for &lt;recipient@someplaceelse.net&gt;; Tue, 4 Jun 2019 14:53:55 -0700 (PDT)<br \/>X-DH-BACKEND: pdx1-sub0-mail-a16<br \/>From: Some Person &lt;sender@someplace.com&gt;<br \/>Content-Type: multipart\/alternative; boundary=&#8221;Apple-Mail=_FBA4BD6B-A8CB-4FEF-A76D-040F73951B06&#8243;<br \/>Message-Id: &lt;413A4AE3-03A9-49BD-98E8-3C5660A48123@photography.org&gt;<br \/>Mime-Version: 1.0 (Mac OS X Mail 8.2 \\(2104\\))<br \/>Subject: Re: discount code for IJE<br \/>Date: Tue, 4 Jun 2019 14:53:54 -0700<br \/>References: &lt;70A1983D-549E-4C11-B0A2-B2CAB33267B8@photography.org&gt; &lt;A56A1316-5331-45C3-AEF0-184CE3B838A5@photography.org&gt; &lt;DA021C83-189F-455F-B622-2494C6596FD4@photography.org&gt; &lt;703A1595-7095-4485-A964-6210EEA3ABED@photography.org&gt;<br \/>To: Tracy Valleau &lt;recipient@someplaceelse.net&gt;<br \/>In-Reply-To: &lt;703A1595-7095-4485-A964-6210EEA3ABED@photography.org&gt;<br \/>X-Mailer: Apple Mail (2.2104)<br \/>X-VR-OUT-STATUS: OK<br \/>X-VR-OUT-SCORE: -100<br \/>X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrudeguddgtdefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfgtkfgguffffhfvjgfosegrtdhmrehhtdejnecuhfhrohhmpeetnhhnucflrghsthhrrggsuceorghnnhesphhhohhtohhgrhgrphhhhidrohhrgheqnecuffhomhgrihhnpehphhhothhoghhrrghphhihrdhorhhgnecukfhppeejfedrvdeguddrgeekrdduhedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopegludelvddrudeikedruddrfedvngdpihhnvghtpeejfedrvdeguddrgeekrdduhedvpdhrvghtuhhrnhdqphgrthhhpeetnhhnucflrghsthhrrggsuceorghnnhesphhhohhtohhgrhgrphhhhidrohhrgheqpdhmrghilhhfrhhomheprghnnhesphhhohhtohhgrhgrphhhhidrohhrghdpnhhrtghpthhtohepthhrrggthiesphhhohhtohhgrhgrphhhhidrohhrghenucevlhhushhtvghrufhiiigvpedt<br \/>X-VR-STATUS: OK<br \/>X-VR-SCORE: -100<br \/>X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrudeguddgtdefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfgtkfgguffffhfvjgfosegrtdhmrehhtdejnecuhfhrohhmpeetnhhnucflrghsthhrrggsuceorghnnhesphhhohhtohhgrhgrphhhhidrohhrgheqnecuffhomhgrihhnpehphhhothhoghhrrghphhihrdhorhhgnecukfhppedvfedrkeefrddvuddvrddvvddpjeefrddvgedurdegkedrudehvdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepsghonhhosghordgvlhhmrdhrvghlrgihrdhmrghilhgthhgrnhhnvghlshdrnhgvthdpihhnvghtpedvfedrkeefrddvuddvrddvvddprhgvthhurhhnqdhprghthheptehnnhculfgrshhtrhgrsgcuoegrnhhnsehphhhothhoghhrrghphhihrdhorhhgqedpmhgrihhlfhhrohhmpegrnhhnsehphhhothhoghhrrghphhihrdhorhhgpdhnrhgtphhtthhopehtrhgrtgihsehphhhothhoghhrrghphhihrdhorhhgpdhhvghloheplgduledvrdduieekrddurdefvdgnpdhinhgvthepjeefrddvgedurdegkedrudehvdenucevlhhushhtvghrufhiiigvpedt<\/p>\n<p>&#8211;Apple-Mail=_FBA4BD6B-A8CB-4FEF-A76D-040F73951B06<br \/>Content-Transfer-Encoding: quoted-printable<br \/>Content-Type: text\/plain;<br \/>charset=utf-8<\/p>\n<p>Hi Tracy, \u00a0(here the actual email, finally!)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a brief explanation of how email works. When you send an email to a friend, it has an address like user@domain.ext. \u00a0The email you&#8217;re sending goes to an outgoing mail server (a computer) via Simple Mail Transfer Protocol. The SMTP servertries to figure out where to send it, but It doesn\u2019t understand people&#8217;s names [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-403","post","type-post","status-publish","format-standard","hentry","category-mac-tips"],"_links":{"self":[{"href":"https:\/\/valleau.art\/blog\/wp-json\/wp\/v2\/posts\/403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/valleau.art\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/valleau.art\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/valleau.art\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/valleau.art\/blog\/wp-json\/wp\/v2\/comments?post=403"}],"version-history":[{"count":1,"href":"https:\/\/valleau.art\/blog\/wp-json\/wp\/v2\/posts\/403\/revisions"}],"predecessor-version":[{"id":404,"href":"https:\/\/valleau.art\/blog\/wp-json\/wp\/v2\/posts\/403\/revisions\/404"}],"wp:attachment":[{"href":"https:\/\/valleau.art\/blog\/wp-json\/wp\/v2\/media?parent=403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/valleau.art\/blog\/wp-json\/wp\/v2\/categories?post=403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/valleau.art\/blog\/wp-json\/wp\/v2\/tags?post=403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}