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
    This question originates from the beginning of 2011. @Michael: do you find any of the answers fit to answer your question? If yes, please flag as such, as you do on Stack Overflow as well. – Jacob Jan Tuinstra Jan 15 '13 at 19:51
  • I've achieved something similar to this, auto schedule gmail deletion for a specific label, just have a look step by step instructions video youtube.com/watch?v=3IS3IuSWp0I – Yasitha Waduge Nov 16 '13 at 12:43

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.

| improve this answer | |

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


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

| improve this answer | |
  • 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. – Leigh Brenecki Jun 27 '14 at 8:47

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.

| improve this answer | |

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:


| improve this answer | |
  • Thanks for sharing. Please make sure to answer the question. Try to earn as much as 50 reputation and you will be able to add comments (faq). I've given you a head start. – Jacob Jan Tuinstra Dec 6 '12 at 20:28

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.

| improve this answer | |
  • 1
    How is your answer different to the ones already given? – Jacob Jan Tuinstra Jan 15 '13 at 19:55

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