Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto process incoming emails for spam #231

Open
christianreiss opened this issue Jan 16, 2025 · 10 comments
Open

Auto process incoming emails for spam #231

christianreiss opened this issue Jan 16, 2025 · 10 comments
Labels
api_google_gemini Google Gemini API Integration api_ollama Ollama API Integration api_openai_comp Compatible OpenAI API Integration for local LLMs api_openai OpenAI API Integration for Chatgpt new feature
Milestone

Comments

@christianreiss
Copy link

Hey folks,

I have a custom prompt that classifies emails with spam/ham:

"Classify the following text in terms of Spam propability from 0 (100% not spam) to 10 (100% ensured Spam)."

Using ollama the results are awesome and have -for me- a near 100% detection rate. Would it be possible to run thunderai on incoming emails in the Inbox? And move them to junk?

This would be super awesome.

@micz
Copy link
Owner

micz commented Jan 16, 2025

To achieve what you're asking it could be used the onNewMailReceived event to move the mail to the spam folder with a new special prompt.

Thank you for your submission!
May you share your prompt?

@micz micz added api_openai OpenAI API Integration for Chatgpt api_ollama Ollama API Integration api_openai_comp Compatible OpenAI API Integration for local LLMs api_google_gemini Google Gemini API Integration labels Jan 16, 2025
@section1
Copy link

section1 commented Jan 17, 2025

Hi @christianreiss I'm interested too in the prompt that you use for spam classification and the llm model you use in ollama, thanks.

@christianreiss
Copy link
Author

Hey guys,

Sorry for the delay in answering, got sick and realllly did not care for IT for a few days.

Running: Ollama,
Model: llama3.2:3b (only, seems sufficient)

Prompt: "Classify the following text in terms of Spam propability from 0 (100% not spam) to 10 (100% ensured Spam)."

This returns something like:

Image

@micz
Copy link
Owner

micz commented Jan 19, 2025

Thank you @christianreiss.
I considered asking the AI only for a number between 0 and 100, but it might also be useful to request a brief explanation and save it in a log.
This log could be accessible from the add-on's options page, allowing the user to review what’s happening.

@section1
Copy link

section1 commented Jan 23, 2025

Thank @christianreiss.
I have a question...Is possible to classify emails at incoming ? let's says a new email is received and the plugin runs this spam classifier ? and move o tag the email without user intervention ... should be great. o for example not sure if this is possible but using thunderbird filters and select "ThunderAI spam Classifier" thanks...great work.

NVM i read about onNewMailReceived ... yeah that would be a nice feature.

@micz
Copy link
Owner

micz commented Jan 23, 2025

@section1 yes, it seems to be possible to both assign tags or move a message to the spam folder upon receipt.

My idea is to work on it for version 3.2.0.

@micz micz added this to the 3.2.0 milestone Jan 23, 2025
@micz
Copy link
Owner

micz commented Jan 26, 2025

Added issue #237 for the auto tags assignment.

@micz micz changed the title Auto process incoming emails for spam. Auto process incoming emails for spam Jan 27, 2025
@section1
Copy link

Thanks @micz ! I'll donate to this project..

@micz micz pinned this issue Jan 31, 2025
@micz
Copy link
Owner

micz commented Feb 4, 2025

The onNewMailReceived event has to be fixed.
It seems to be fired only when the new mails notification is shown.

For reference: https://bugzilla.mozilla.org/show_bug.cgi?id=1850289

@micz
Copy link
Owner

micz commented Feb 9, 2025

Added issue #237 for the auto tags assignment.

#237 (comment) first prerelease with autotagging is available. The antispam will released in next prerelease.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api_google_gemini Google Gemini API Integration api_ollama Ollama API Integration api_openai_comp Compatible OpenAI API Integration for local LLMs api_openai OpenAI API Integration for Chatgpt new feature
Projects
None yet
Development

No branches or pull requests

3 participants