<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.johnlradford.io/index.php?action=history&amp;feed=atom&amp;title=Using_Telnet_with_IMAP</id>
	<title>Using Telnet with IMAP - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.johnlradford.io/index.php?action=history&amp;feed=atom&amp;title=Using_Telnet_with_IMAP"/>
	<link rel="alternate" type="text/html" href="https://wiki.johnlradford.io/index.php?title=Using_Telnet_with_IMAP&amp;action=history"/>
	<updated>2026-05-05T14:46:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.johnlradford.io/index.php?title=Using_Telnet_with_IMAP&amp;diff=25&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;== The Old Way ==  To connect to a server using just plain old telnet and IMAP you would run the following command.   telnet mail.example.com 143  However, you&#039;re not going to get very far. Dovecote will not allow an insecure login so you&#039;re pretty much dead in the water.  == Using OpenSSL to Connect Securely ==  Luckily, you can get around this by using the wonderful &lt;code&gt;openssl&lt;/code&gt; tool/library to wrap your telnet session in a warm security blanket weaved from the...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.johnlradford.io/index.php?title=Using_Telnet_with_IMAP&amp;diff=25&amp;oldid=prev"/>
		<updated>2023-10-04T12:15:55Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== The Old Way ==  To connect to a server using just plain old telnet and IMAP you would run the following command.   telnet mail.example.com 143  However, you&amp;#039;re not going to get very far. Dovecote will not allow an insecure login so you&amp;#039;re pretty much dead in the water.  == Using OpenSSL to Connect Securely ==  Luckily, you can get around this by using the wonderful &amp;lt;code&amp;gt;openssl&amp;lt;/code&amp;gt; tool/library to wrap your telnet session in a warm security blanket weaved from the...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== The Old Way ==&lt;br /&gt;
&lt;br /&gt;
To connect to a server using just plain old telnet and IMAP you would run the following command.&lt;br /&gt;
&lt;br /&gt;
 telnet mail.example.com 143&lt;br /&gt;
&lt;br /&gt;
However, you&amp;#039;re not going to get very far. Dovecote will not allow an insecure login so you&amp;#039;re pretty much dead in the water.&lt;br /&gt;
&lt;br /&gt;
== Using OpenSSL to Connect Securely ==&lt;br /&gt;
&lt;br /&gt;
Luckily, you can get around this by using the wonderful &amp;lt;code&amp;gt;openssl&amp;lt;/code&amp;gt; tool/library to wrap your telnet session in a warm security blanket weaved from the finest encryption the transport security layer has to offer.&lt;br /&gt;
&lt;br /&gt;
* To connect to a mail server using &amp;lt;code&amp;gt;openssl&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -connect mail.example.com:143 -starttls imap -no_ssl3&lt;br /&gt;
&lt;br /&gt;
* Once you&amp;#039;ve established a secure connection with the mail server you should be clear to log into Dovecote:&lt;br /&gt;
&lt;br /&gt;
 a login YOUR_EMAIL_ADDRESS YOUR_PASSWORD&lt;br /&gt;
&lt;br /&gt;
* Once you&amp;#039;re logged into the Inbox you&amp;#039;ll want to see what namespace you&amp;#039;re in (AKA where everything is):&lt;br /&gt;
&lt;br /&gt;
 n namespace&lt;br /&gt;
&lt;br /&gt;
:Result,&lt;br /&gt;
 * NAMESPACE ((&amp;quot;&amp;quot; &amp;quot;.&amp;quot;)) NIL NIL&lt;br /&gt;
 n OK Namespace completed (0.001 + 0.000 secs).&lt;br /&gt;
&lt;br /&gt;
* To list the folders:&lt;br /&gt;
&lt;br /&gt;
  A1 list &amp;quot;&amp;quot; &amp;quot;*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:Results,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* LIST (\HasNoChildren \UnMarked) &amp;quot;.&amp;quot; Junk&lt;br /&gt;
* LIST (\HasNoChildren \UnMarked) &amp;quot;.&amp;quot; INBOX.Trash&lt;br /&gt;
* LIST (\HasNoChildren \UnMarked) &amp;quot;.&amp;quot; INBOX.Junk&lt;br /&gt;
* LIST (\HasNoChildren \UnMarked) &amp;quot;.&amp;quot; INBOX.Sent&lt;br /&gt;
* LIST (\HasNoChildren \UnMarked) &amp;quot;.&amp;quot; INBOX.Drafts&lt;br /&gt;
* LIST (\HasChildren) &amp;quot;.&amp;quot; INBOX&lt;br /&gt;
A1 OK List completed (0.001 + 0.000 secs).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To select the Inbox:&lt;br /&gt;
&lt;br /&gt;
 g21 SELECT &amp;quot;INBOX&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:Results,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)&lt;br /&gt;
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.&lt;br /&gt;
* 14 EXISTS&lt;br /&gt;
* 0 RECENT&lt;br /&gt;
* OK [UIDVALIDITY 1579611755] UIDs valid&lt;br /&gt;
* OK [UIDNEXT 15] Predicted next UID&lt;br /&gt;
* OK [HIGHESTMODSEQ 45] Highest&lt;br /&gt;
g21 OK [READ-WRITE] Select completed (0.001 + 0.000 secs).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To list the basic information of the top four messages in the Inbox:&lt;br /&gt;
&lt;br /&gt;
 f fetch 1:4 (BODY[HEADER.FIELDS (from to subject date)])&lt;br /&gt;
&lt;br /&gt;
* Read the whole second message in the Inbox message:&lt;br /&gt;
&lt;br /&gt;
 F1 fetch 2 RFC822&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sources: ==&lt;br /&gt;
&lt;br /&gt;
https://www.atmail.com/blog/imap-101-manual-imap-sessions/&lt;br /&gt;
&lt;br /&gt;
https://hostpapasupport.com/view-send-email-using-telnet/&lt;br /&gt;
&lt;br /&gt;
https://busylog.net/imap-telnet-example-test-imap-with-telnet/&lt;br /&gt;
&lt;br /&gt;
https://michlstechblog.info/blog/mail-connect-tls-encrypted-to-a-smtp-server-by-telnet/&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>