21

Possible Duplicate:
Webapp to delete certain Gmail messages older than n days?

The reason I need that is because I need to subscribe to some open source project mail list and I don't need to archive older messages.

1
12

No, because Gmail filters act when the message is received. You can't get Gmail filters to act on messages at other times.

At best, you'll need a search like this:

label:bulk before:2011/2/22

You could probably save a link (and then edit the date) or make yourself a bookmarklet that can dynamically put the date in for you.

But you can't do it with a filter.

0
7

Now you can, Gmail added new search operator on 2012.11.14 http://gmailblog.blogspot.com/2012/11/search-for-emails-by-size-and-more-in.html

older_than:1m


Detail: http://support.google.com/mail/bin/answer.py?hl=en&answer=7190

Similar to older and newer, but allows relative dates using d, m, and y for day, month, and year

3
  • 4
    Yes, that's fine for search, but filters act on messages as they come in. The OP is looking for something that happens automatically. A search, no matter how fancy, is something that a person needs to initiate.
    – ale
    Dec 6 '12 at 20:07
  • 1
    You can create a filter with this search :D
    – rderoldan1
    Jan 29 '14 at 21:23
  • 2
    You can create a filter with this search, but it won't ever match anything, since (as @AlE. points out) the filters are only applied when the email first comes in to the mailbox. At least, all the test filters I've created with older_than haven't done anything. Jun 27 '14 at 8:47
3

You could connect to gmail with an IMAP client (Thunderbird, Outlook, etc), and create a rule from there. The gmail options don't have an option for this.

2

Unfortunately, Gmail filters (rules) only applies on incoming mails, not mails already in the inbox. You can still do a search and manually clean up your inbox by using a very specific search.

Let's say that all your emails you don't want to keep forever are labeled Newsletters. To display all emails labeled Newsletters that are older than 2 months, use the following search query

*label:Newsletters older_than:2m*

You can replace the older_than parameters to something else like 7d

  • d: days
  • m: months
  • y: years

I guess a Google Apps Script could be able to take care of this, but I don't have experience (yet) on that matter.

0
1

I guess You could create a script on google apps that runs everyday and removes older messages from gmail. There's an example on how to access to gmail and create statistics:

https://developers.google.com/apps-script/articles/gmail-stats

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.