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.

3 Answers
3

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.

I'm not sure I understand, are you say I can do this all in one account? If so, than that runs into the same problem that @Fogest has, which is that "in" and "is" words won't work on incoming mail.
–
kbyrdSep 14 '12 at 19:18

1

It works for me on incoming mail. I opened with that statement about forwarding to illustrate how I currently use the is operating to process incoming spam (marking it as not spam).
–
PhongSep 14 '12 at 20:44

2

I just tried this and it appears to work! I'll go a few more hours or so and if it all behaves the way I want, I'll mark this as the correct answer. As a side note, the reason I'm getting so many of these is that this account is the default for all unkown addresses for my domain (*@mydomain.com), I do that so I can receive and filter <username>-<foldername>@mydomain.com. I've been using the '-' extension for years and it's too painful to switch to '+' in all the various places.
–
kbyrdSep 16 '12 at 18:23

1

Good deal. I know it's confusing because Gmail warns you that is will never match on incoming mail, but it's a lie :) At worst I imagine that could mean the rule may stop working in the future.
–
PhongSep 16 '12 at 22:10

This won't affect incoming mail. Gmail won't let you use labels (in:spam) to affect incoming mail. I have updated my question to make it clear I'd like to affect incoming mail so it never hits the spam folder.
–
kbyrdSep 12 '12 at 20:01

@kbyrd Same idea, just use in:inbox rather than in:spam.
–
FogestSep 12 '12 at 20:05

@kbyrd If GMail thinks something is spam it moves it to the spam folder. Of course you could use some other filters and move all the emails from spam to the another folder such as the inbox, and then sort that folder, and move the stuff you don't want in it to another folder. It's hard to change how GMail works.
–
FogestSep 12 '12 at 20:15

1

Correct me if I'm wrong, but it looks like the original poster wants something like an Outlook rule, where you can specify that if an email meets a specific criteria (in this case flagged as spam and containing specific words) that it gets permanently deleted, not just moved to spam. I was just wondering this myself today, so I'm interested to know if anyone knows how to do it.
–
techturtleSep 12 '12 at 20:54

This is closes to what I want. It gives me a quick way to constantly clean up the obvious stuff. I should point out that you need to be in "Classic Inbox" view to see the multiple inboxes. This doesn't work with "Priority" inbox types.
–
kbyrdSep 13 '12 at 15:25