Skip to content

crosenblum/CreateSpamDomainFilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

CreateSpamDomainFilter.js

Gmail App Script as a scheduled task to automatically block all spam emails and domain names.

This is an imperfect tool designed by and coded with the help of ChatGPT to find creative ways to fight spam via Gmail. The ideas was to look for spam/trash messages from people not in my contacts and start adding their domains and email addresses as filters automatically. Of course there are going to be ongoing issues, but since using this script myself, the amount of spam that shows up in my inbox has massively decreased.

The language is pretty simple, feel free to customize and/or make suggestions for improvements.

Features

  • Can be custom time triggered to run as often as you want
  • Any email in your spam filter will be blocked from future emails

Script Logic

  • Check for all emails in the spam folder
  • Get both the from email address and it's domain name
  • Create New Filter to block all emails from both.
  • Move email to trash

FAQ

Question 1 - How do I install this?

  • Go to the Google App Script Editor
  • https://script.google.com/home/
  • Create New Project
  • Copy N Paste Script
  • Setup Google Authentication so it can access your Gmail Account
  • Create Time Triggers to execute this script as often as you wish

Future Ideas/To Do List

  • Global Spam List - To help us all block more spam
  • Send Data to Spam Reporting Sites - To reduce amount of spam
  • Browser Extension

Author

About

Used domains of spam emails to create block filters

Resources

Stars

Watchers

Forks

Packages

No packages published