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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login

