What are you using the POP the mail? Some clients mark as downloaded only at the end of a complete batch of POPs.. so if your download get interupted then those mails werent actually downloaded according to GMail. Otherwise you could tey using imap to connect ot Gmail I use offlineimap + mutt to awesome effect with gmail. Cheers, Sias