Python script for imap archiving