Python script to check new messages in IMAP directory