Dr. Mark Humphrys

School of Computing. Dublin City University.

Online coding site: Ancient Brain

coders   JavaScript worlds

Search:

Free AI exercises


Email




7.2 Email



SMTP

Message transfer agents - Move email across the network.

Source machine establishes TCP socket connection to port 25 on destination machine.



Sample SMTP conversation delivering an email from client C to server S.

  


DCU mail servers

It was easier to see how mail servers worked when DCU had its own mail servers. But these are being phased out.

Now all DCU email is done through a Gmail service.

Incoming server: imap.gmail.com
Outgoing server: smtp.gmail.com 
Of course, these "server" addresses have entire server farms behind them.
  
If any DCU mail servers still running, try these out:
$ telnet mail.dcu.ie 25

$ telnet mailhost.computing.dcu.ie 25
help
214-2.0.0 This is sendmail version 8.12.10
214-2.0.0 Topics:
214-2.0.0       HELO    EHLO    MAIL    RCPT    DATA
214-2.0.0       RSET    NOOP    QUIT    HELP    VRFY
214-2.0.0       EXPN    VERB    ETRN    DSN     AUTH
214-2.0.0       STARTTLS




Email headers




Basic email header fields.
Message consists of:
Header fields
(blank line)
Message body


Other email header fields.
Applications can invent their own. Must begin with X-.
e.g. Some Spam filtering software attaches headers like X-Spam-Status:



Email headers in forensic work



I receive an unpleasant email from Hotmail.
But where is it actually from? America?



"View - Headers - All" (or something similar) in your email client and you can see the actual email headers.
These reveal the path it travelled and also the original IP address, which you can then look up.
Lookup here said it was Eircom, who I then complained to.
I could even see what part of Ireland this came from.




MIME

MIME encoding.
Invented for binary data to be sent by email (designed for text data).
Encodes it as simple plain text 7-bit ASCII chars.





Types of MIME encodings

base64 encoding: For binary attachments.
Can encode any binary stream whatsoever as (a really safe subset of) 7-bit ASCII.
"The resultant base64-encoded data has a length that is approximately 33% greater than the original data"

Content-Type: application/msword; name="Postgrad_Prospectus_Research.doc";
 x-mac-type="42494E41"; x-mac-creator="4D535744"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Postgrad_Prospectus_Research.doc"

0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAATwAAAAAAAAAA
EAAAUQAAAAEAAAD+////AAAAAE4AAAD/////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////s
pcEATSAJBAAA8BK/AAAAAAAAEAAAAAAABAAAKzIAAA4AYmpiauI94j0AAAAAAAAAAAAAAAAAAAAA
AAAJBBYAIlAAAIBXAACAVwAARywAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//w8AAAAA
AAAAAAD//w8AAAAAAAAAAAD//w8AAAAAAAAAAAAAAAAAAAAAAGwAAAAAAMYBAAAAAAAAxgEAAMYB
AAAAAAAAxgEAAAAAAADGAQAAAAAAAMYBAAAAAAAAxgEAABQAAAAAAAAAAAAAANoBAAAAAAAAshcA
AAAAAACyFwAAAAAAALIXAAAAAAAAshcAABwAAADOFwAAVAAAANoBAAAAAAAAqyQAAIoBAAAuGAAA
....

Quoted-printable encoding: For basically plaintext with 8-bit ASCII chars.
Encodes everything as 7-bit ASCII. The 8-bit chars are encoded as: "=nn".
"=" itself encoded as "=3D".

I have had several enquiries =
regarding=20
IEEE Xplore (full-text access to IEEE and IEE publications) and would =
like to=20
inform you of some recent developments. As part of the<A=20
href=3D"http://www.library.dcu.ie/news/index.htm#HES"> IReL</A> =
initiative (funded=20
by SFI and HEA) to provide increased access to e-journals, negotiations =
for IEEE=20
Xplore are at an advanced stage.


MIME headers.


MIME content types.

  


How to repair corrupted email





Standalone email clients

Email clients - Read and send email.

Mail server: mail.isp.com receives and stores your email when you are offline.

To read it you might:

  1. Use a web interface the ISP has set up at: www.isp.com

  2. Use a standalone client to communicate with mail.isp.com over the network, using various protocols.

Both types of email client (web clients and standalone clients) are popular.




(a) mail.isp.com collects your email.
(b) You periodically use a client to connect to mail.isp.com



POP3

The original protocol for standalone clients.

POP3 client sets up TCP connection to the mail server at port 110.



Sample POP3 conversation to retrieve 3 email messages.
You can retrieve and then delete from server. Or retrieve and leave on server.


IMAP

Updated protocol for standalone clients.



Web-based email

Web-based email like Gmail

Keep everything on server (like IMAP). No standalone client. Just web browser.

Not everyone uses web client only:

Note that most big web email services can be accessed through either web client or standalone client.
Gmail supports IMAP access.




Proprietary email protocols



Surveys



Survey of email reading environments, 2018.
From litmus.com.
Shows the popular ways of reading email: desktop web browser, desktop standalone client, and mobile.



Survey of top email clients, 2018.
From litmus.com.
Shows a mix of mobile and desktop clients.
Huge amount of reading email on Apple devices. (Is there a problem with data gathering for other devices?)
Also shows a mix of webmail and standalone email clients.




ancientbrain.com      w2mind.org      humphrysfamilytree.com

On the Internet since 1987.      New 250 G VPS server.

Note: Links on this site to user-generated content like Wikipedia are highlighted in red as possibly unreliable. My view is that such links are highly useful but flawed.