Gmail – How to auto-delete some spam from Gmail

gmailgmail-filtersspam-prevention

I really like GMail's spam filters. However, they occasionally catch not-spam so I like to quickly scan the contents of spam folder every so often, marking "not spam" to the few messages that aren't and deleting the rest so I know what I've checked.

In order to make looking through the spam filter easier, is it possible to create a gmail filter that would act like this and auto-delete incoming mail?

If GMail thinks this is spam AND contains 'Vigara' or 'Cilais'  THEN delete forever.

Just a quick note, I intentionally misspelled the drug names, that is common for the 400+ messages per day that I'm seeing.

Best Answer

I forward all my mail from one of my Gmail accounts to another Gmail account, including what Gmail would normally filter to the Spam folder. I use the is:spam query with the Never send it to Spam rule in the inbound filter to allow spam to be forwarded. Do note the use of is rather than in.

Therefore, I imagine you could do the same with the following filter:

Contains is:spam (vigara OR cilais), Action Delete it.

If you wanted to apply the rule universally, you could instead use:

Contains (is:spam OR -is:spam) (vigara OR cilais), Action Delete it.

Note that Delete it automatically implies Never send it to Spam so you don't need to check the latter check box. In fact, if you check it, Gmail will uncheck it automatically. I am uncertain as to whether this will impact Gmail's internal spam detection heuristics, but I find that improbable.

Caveat: you cannot delete permanently from a filter rule (I imagine Google believes the risk too great and not worth the potential increase in support costs), so those messages would end up in your Trash and get purged after 30 days. This may still be a better situation to find yourself in, depending on your preferences and the volume of spam you get (which could now make it harder for you to recover messages deleted by mistakes).

If cluttering your Trash is not desirable, you could filter those messages to a temporary label instead, then use an Apps Script to periodically delete "old" filtered spam from that label. That would ensure that the top of your Trash is clutter-free. If the volume of spam you receive is limited however, deleting might work just fine.