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.
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.
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.
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
older_than
haven't done anything.
Commented
Jun 27, 2014 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.
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
I guess a Google Apps Script could be able to take care of this, but I don't have experience (yet) on that matter.
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