tldr : A web service that assigns an oddness score to emails.
OMG aka OddMailGuard is a dedicated web service designed to verify the oddness of emails. To use the service, simply transfer an email to the displayed address and include the given ID at the start of the email subject. The analysis will be take arround 30 seconds, providing you with an overall oddness score, as well as more specific oddness details, such as for the body, subject, sender and more.
OMG uses Google Safe Browsing API to detect malicious links. It also uses OpenAI's Chat Completion API with the gpt-3.5-turbo model to assign an oddness value (ranging from 0 to 100) to the email body and subject. To ensure data protection, all potential links and emails are replaced with placeholders, to avoid data leakage (since OpenAi store everything).
- Clone the repo
git clone https://github.com/YungBricoCoop/omg
cd omg
- Install backend dependencies
cd backend
pip install -r requirements.txt
- Install frontend dependencies
cd frontend
npm i
Before running the code you might need to configure the environment. For the backend, create a .env
file in the root directory and update the following keys:
MAIL_SERVER="server.com"
MAIL_USERNAME="username@server.com"
MAIL_PASSWORD="strong_password"
MAIL_IMAP_PORT=993
MAIL_SMTP_PORT=465
ID_LENGTH=8
SAFE_BROWSING_API_KEY="https://developers.google.com/safe-browsing/v4"
OPENAI_API_KEY="https://platform.openai.com/account/api-keys"
Use uvicorn for development, and gunicorn for production.
Dev : uvicorn app:app --reload
Prod : gunicorn -w 1 -k uvicorn.workers.UvicornWorker app:app
For development, you can host the frontend using npm run dev
.
For production, build the frontend using npm run build
and host it on a production server.
- Enhance attachment oddness scanning
Im open to contributions! If you'd like to contribute, please create a pull request and I'll review it as soon as I can.
This project is licensed under the MIT License - see the LICENSE file for details.