Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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

Is it possible to setup a filter in Gmail to delete message older than 1 month?

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

share|improve this question

migrated from superuser.com Mar 22 '11 at 19:26

This question came from our site for computer enthusiasts and power users.

marked as duplicate by Alex, ChrisF Jan 15 '13 at 20:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
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 Chinthaka Nov 16 '13 at 12:43

5 Answers 5

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.

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

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

share|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

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

share|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. –  Al E. Dec 6 '12 at 20:07
    
You can create a filter with this search :D –  rderoldan1 Jan 29 at 21:23
1  
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. –  Adam Brenecki Jun 27 at 8:47

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.

share|improve this answer

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.

share|improve this answer

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