title: Logic to sync labels with gmail
body: <p>I want to synch gmail labels in my imap application. 
  I am syncing gmail using All Mails. 
  After syncing one message in imap if user changes the label of IMAP. 
  It will not automatically comes as updated message. 
  I am looking for best option to synch gmail labels. </p>
  
  <p>What I thought is </p>
  
  <ul>
  <li>Either sync folder based. </li>
  <li>Checking labels for each message in gmail from starting to current stage. </li>
  </ul>
  
  <p>but I don't think these two will be good option. 
  What will be best option to sync gmail labels ?</p>