title: Get only NEW Emails imaplib and python
body: <p>This is a smaller portion of a bigger project. I need to only get unread emails and a parse their headers. How can I modify the following script to only get unread emails?</p>
  
  <pre><code>conn = imaplib.IMAP4_SSL(imap_server)
  conn.login(imap_user, imap_password)
  
  status, messages = conn.select('INBOX')    
  
  if status != "OK":
      print "Incorrect mail box"
      exit()
  
  print messages
  </code></pre>