Does anyone know of a script that will check an IMAP folder on my mail server for emails I put there, and, if found, will have ChatGPT generate a reply and send it?

I want something that will spam spammers back, and I figure I should see if one exists first.

@stavros probably a two program solution. Something like #getmail to sync your local to the mail server, and then another script that reads the local mail and does your tasks
@jamesrylandmiller I ended up writing a script to do this, it just checks the mailbox for any new mail and sends the reply to the thread. It works great!