API-driven Gmail spam filtering. Parses raw MIME payloads to permanently delete messages matching configurable blocklist criteria.
StaticVoid is a Google Apps Script utility that automatically monitors the Gmail Spam folder and permanently deletes aggressive spam, bypassing the 30-day Trash cycle entirely.
While Gmail's native filters can only send mail to the Spam or Trash folders, StaticVoid leverages the Advanced Gmail API to execute a true delete operation (Gmail.Users.Threads.remove), keeping the mailbox clean and secure.
- Permanent Deletion: Bypasses the Trash folder, permanently destroying matching threads via direct API drops to save storage space and remove risk.
- Dual-Layer Inspection Engine: Combines fast envelope metadata evaluations (Layer 1) with full MIME payload parsing (Layer 2) to decode base64 body content, evaluate message text, and extract URLs.
- Modular Configuration: Centralizes all rules within a single
CONFIGblock, making it simple to manage blocklists, whitelist overrides, and system toggles. - Modern Exploit Detection: Includes built-in defenses against advanced spam tactics, including Unicode emoji subject abuse and Gmail "Reaction" payload exploits.
- Smart TLD Escaping: Automatically handles character escaping for complex top-level domains like
web.idorproto be added directly to the blocklist without manual regex styling. - Command Center Dashboard: Deployable as a web app interface to monitor active rule definitions and trigger manual firewall sweeps asynchronously.
- Go to script.google.com and create a new project.
- Create a script file named
src/staticvoid.jsand paste the core engine code. - Create a HTML file named
src/dashboard.htmland paste the dashboard interface code. - Required Step: On the left-hand menu, click the + next to Services in the left sidebar menu. Scroll down, select Gmail API, and click Add. (The script will fail to execute if this service is missing).
- Edit the
CONFIGblock at the top ofsrc/staticvoid.jsto define the targeted spam patterns and whitelist conditions. - Save the project files.
To configure StaticVoid to run automatically in the background:
- Click the Triggers icon (the clock graphic) in the left sidebar menu.
- Click the Add Trigger button in the bottom right corner.
- Set the function to run to
main. - Set the deployment to
Head. - Select Time-driven for the event source.
- Choose the preferred interval (e.g., an Hour timer or Minutes timer).
- Save the trigger settings.
This project is licensed under the GNU GPLv3 License.
Note: This project is a heavily modified fork of the original Spam Zero script, upgraded to utilize REST API functionality, modular configuration blocks, and advanced payload parsing techniques.