In this article I will show you how to use a Google Apps Script to mark certain messages as spam based on their headers.
This script basically checks the 5 newest inbox messages every 10 minutes looking for a specific header. If it finds that header it will mark the message as spam automatically. Of course, you can modify the code to fit your needs. Continue reading How to Filter Gmail Headers & Stop “Via” Spam