20150209 talking imap - plembo/onemoretech GitHub Wiki
title: Talking IMAP link: https://onemoretech.wordpress.com/2015/02/09/talking-imap/ author: phil2nc description: post_id: 9250 created: 2015/02/09 12:26:18 created_gmt: 2015/02/09 17:26:18 comment_status: closed post_name: talking-imap status: publish post_type: post
Talking IMAP
Quick procedure to test that an IMAP account is working using telnet. Good for WordPress Postie plugin admins to know. First, connect: [code lang="bash" gutter="false" highlight="1"] [me@mine ~]$ telnet imap.example.com 143 Trying 10.254.0.5... Connected to imap.example.com. Escape character is '^]'. * OK The Microsoft Exchange IMAP4 service is ready. [/code] Now login: [code lang="bash" gutter="false" highlight="1"] ? LOGIN myname mypass + OK LOGIN completed. [/code] List folders: [code lang="bash" gutter="false" highlight="1"] ? LIST "" "*" * LIST (\HasNoChildren) "/" Calendar * LIST (\HasNoChildren) "/" Contacts * LIST (\HasNoChildren) "/" "Deleted Items" * LIST (\HasNoChildren) "/" Drafts * LIST (\Marked \HasNoChildren) "/" INBOX * LIST (\HasNoChildren) "/" Journal * LIST (\HasNoChildren) "/" "Junk E-mail" * LIST (\HasNoChildren) "/" Notes * LIST (\HasNoChildren) "/" Outbox * LIST (\HasNoChildren) "/" "Sent Items" * LIST (\HasNoChildren) "/" Tasks ? OK LIST completed. [/code] Check the Inbox: [code lang="bash" gutter="false" highlight="1"] ? EXAMINE INBOX * 314 EXISTS * 0 RECENT * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent) ... ? OK [READ-ONLY] EXAMINE completed. [/code] Get the first message in the queue: [code lang="bash" gutter="false" highlight="1"] ? FETCH 1 BODY[] [/code] To logout and end the session: [code lang="bash" gutter="false" highlight="1"] ? LOGOUT * BYE Microsoft Exchange Server 2010 IMAP4 server signing off. ? OK LOGOUT completed. Connection closed by foreign host. [/code]
Copyright 2004-2019 Phil Lembo