# Accessing Yahoo and AOL Mail Features Through IMAP

DevFeed: [Accessing Yahoo and AOL Mail Features Through IMAP](<https://devfeed.tech/articles/a-peek-behind-the-mail-curtain-20486.md>)

Original publisher: [Read original article](<https://yahooeng.tumblr.com/post/174023151641>)

Author: marcelatoath

Published: 2018-05-18T16:19:38Z

Content type: tutorial

Language: en

Sources: [Yahoo](<https://devfeed.tech/sources/yahoo.md>)

Topics: [Protocol (disambiguation)](<https://devfeed.tech/topics/protocol.md>), [servers](<https://devfeed.tech/topics/servers.md>), [client](<https://devfeed.tech/topics/client.md>), [openssl](<https://devfeed.tech/topics/openssl.md>)

Tags: [aol](<https://devfeed.tech/tags/aol.md>), [developers](<https://devfeed.tech/tags/developers.md>), [openssl](<https://devfeed.tech/tags/openssl.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [server](<https://devfeed.tech/tags/server.md>), [yahoo](<https://devfeed.tech/tags/yahoo.md>), [yahoo-engineering](<https://devfeed.tech/tags/yahoo-engineering.md>)

## AI overview

This tutorial explains how developers can access Yahoo and AOL Mail metadata such as DECOS and THREADID through IMAP. It demonstrates an IMAP command sequence using openssl to connect, authenticate, list folders, select the inbox, and search for message UIDs.

## Source excerpt

USE IMAP TO ACCESS SOME UNIQUE FEATURES By Libby Lin, Principal Product Manager Well, we actually won't show you how we create the magic in our big OATH consumer mail factory. But nevertheless we wanted to share how interested developers could leverage some of our unique features we offer for our Yahoo and AOL Mail customers. To drive experiences like our travel and shopping smart views or message threading, we tag qualified mails with something we call DECOS and THREADID. While we will not indulge in explaining how exactly we use them internally, we wanted to share how they can be used and accessed through IMAP. So let's just look at a sample IMAP command chain. We'll just assume that you are familiar with the IMAP protocol at this point and you know how to properly talk to an IMAP server. So here's how you would retrieve DECO and THREADIDs for specific messages: 1. CONNECT openssl s_client -crlf -connect imap.mail.yahoo.com:993 2. LOGIN a login username password a OK LOGIN completed 3. LIST FOLDERS a list "" "*" * LIST (\Junk \HasNoChildren) "/" "Bulk Mail" * LIST (\Archive \HasNoChildren) "/" "Archive" * LIST (\Drafts \HasNoChildren) "/" "Draft" * LIST (\HasNoChildren) "/" "Inbox" * LIST (\HasNoChildren) "/" "Notes" * LIST (\Sent \HasNoChildren) "/" "Sent" * LIST (\Trash \HasChildren) "/" "Trash" * LIST (\HasNoChildren) "/" "Trash/l2" * LIST (\HasChildren) "/" "test level 1" * LIST (\HasNoChildren) "/" "test level 1/nestedfolder" * LIST (\HasNoChildren) "/" "test level 1/test level 2" * LIST (\HasNoChildren) "/" "&T2BZfXso-" * LIST (\HasNoChildren) "/" "&gQKAqk7WWr12hA-" a OK LIST completed 4.SELECT FOLDER a select inbox * 94 EXISTS * 0 RECENT * OK [UIDVALIDITY 1453335194] UIDs valid * OK [UIDNEXT 40213] Predicted next UID * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk) * OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)] Permanent flags * OK [HIGHESTMODSEQ 205] a OK [READ-WRITE] SELECT completed;