Run script on new email
-
@girish I don’t know as I’ve zero experience with Sieve. I want to curl with POST to an external server. Ideally containing the email contents but at least its sender and subject data.
@yusf generally, the 'robust' way to do this is to implement this, is in the app and not in the mail server. This takes care of situations where the app is down, app is busy etc. For example, chatwoot, freescout, gitlab all have built-in support for IMAP.
-
@girish I don’t know as I’ve zero experience with Sieve. I want to curl with POST to an external server. Ideally containing the email contents but at least its sender and subject data.
-
@yusf why not run a script in cron (on the cloudron server) that monitors the mailbox via imap?
-
@yusf depending what you want to do exactly, 2 excellent utilities I have used previously are :
- imapfilter (https://github.com/lefcha/imapfilter)
- offlineimap (http://www.offlineimap.org/)
You will probably need to write the meat of your script in bash or php or whatever, but this will get you access to raw email.
And can be run by cron and targeted to mail in certain folders.
-
G girish marked this topic as a question on
-
G girish has marked this topic as solved on