IMAP connection from the command line

While I connect to an SMTP server via telnet regularly, I do it seldom for IMAP servers.

More as a personal note I want to cite what I found on imap via linux shell

Connect to server:

# IMAP
nc SERVERNAME-OR-IP 143
# IMAPS
openssl s_client -connect SERVERNAME-OR-IP:993

# IMAP commands:

  1.     enumerate/prefix commands with arbitrary labels or simply a '.'
  2.     login USERNAME "PASSWORD" # login
  3.     list "" "*" # show all mailboxes
  4.     status [mailbox]
  5.     select "MAILBOX" # switch to mailbox
  6.     fetch FIRST:LAST FLAGS
  7.     fetch MAILID BODY[HEADER]
  8.     fetch MAILID BODY[TEXT]
  9.     uid search all
  10.     uid store MAILID +flags (\Deleted) # mark as deleted
  11.     expunge # actual delete
  12.     logout # logout

Internet:

Themen:

Syndicate

Subscribe to Syndicate