This Google Apps Scripts filter will automatically move all future emails with the header
X-PHISHTEST
to trash.
- Go to Google Apps Script
- Add a new script and copy paste the content from the sibling file
- Test run the script, go to View in the menu bar and click Logs
- If there's no errors it should be blank, OR a verbose message that it removed a phishing email.
If you want to run the script every hour, click this button and enable the script.
Done!
Instead of
moveToTrash()
there's alsomoveToSpam()
which works nicely