/** Synchronizes the <code>messages</code> field from the underlying {@link EmailFolder}. */
 private void updateMessages() {
   // Generate the updated list of messages
   messages = Collections.synchronizedList(new ArrayList<BoteMessage>(messageMap.values()));
   // Update UIDs
   for (BoteMessage message : messages) {
     if (message.getUid() == 0) {
       message.setUid(uid);
       uid++;
     }
   }
 }
 void saveMetadata(BoteMessage message)
     throws IOException, MessagingException, PasswordException, GeneralSecurityException {
   folder.saveMetadata(message.getEmail());
   modSeq++;
 }
 void add(BoteMessage message)
     throws IOException, MessagingException, PasswordException, GeneralSecurityException {
   folder.add(message.getEmail());
 }