Extract imap tool in a single file for cron task