I'm writing a script to run certain processing activities (mainly moving some data files to another machine where they can backed up), but I only know when to trigger the copy when a mail is delivered to a specific folder in an IMAP mailserver (which is outside my network).So I'm looking for something that can only perform a mail check and in case of new mail trigger the script. I do not want to download the contents of the IMAP folder unless there is no other choice.Can fetchmail, getmail or offlineimap do this, or is there anything else?
Checking mail and running a script without downloading
scripting;email;fetchmail
Check imapfilter, which this you can check remote imap server - https://github.com/lefcha/imapfilter