1
0
Fork 0
mirror of https://github.com/Luzifer/gmail-manage.git synced 2024-12-23 04:21:21 +00:00

Add sample config

This commit is contained in:
Knut Ahlers 2018-10-21 01:09:59 +02:00
parent 3e3cf696cd
commit a47e275c8b
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

54
config.sample.js Normal file
View file

@ -0,0 +1,54 @@
var config = {
// In here you will define queries to execute and delete threads
// matched. All threads are moved to trash so you have the chance
// to recover them but you should test the queries before!
cleanup_queries: [
"label:newsletter older_than:6m",
"older_than:10y",
],
// These filter definitions are applied inside your Gmail settings
// in the "Filters and Blocked Addresses" tab. Currently only the
// "query" criteria is supported. Also the actions are wrappers
// for the real API so you don't need to specify the label IDs in
// here but can use label names.
// All non-existent labels will be created during the apply-run.
filters: [
// Move LetsEncrypt mails to specific label
{
criteria: {
query: "from:@letsencrypt.org",
},
action: {
add_labels: ["LetsEncrypt"],
remove_labels: [labelInbox],
},
},
// Move Github mails to specific label
{
criteria: {
query: "from:github.com",
},
action: {
add_labels: ["Github"],
remove_labels: [labelInbox],
},
},
// Build a bigger multi-condition filter and delete those mails
{
criteria: {
query: "(" + [
"from:@example.com",
"from:news@annoying-sender.com",
].join(" OR ") + ")",
},
action: {
add_labels: [labelTrash],
},
},
],
}