Skip to content

Instantly share code, notes, and snippets.

@rgthree
Last active November 30, 2015 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rgthree/6b92a0089db465c8205a to your computer and use it in GitHub Desktop.
Save rgthree/6b92a0089db465c8205a to your computer and use it in GitHub Desktop.
"Mailer" Gmail Filter
var filter;
filter = '' +
'-is:chat ' +
'-from:me ' +
// Only when we haven't applied a userlabel already; this works well as the last rule in your filters list
'has:nouserlabels ' +
'{"Order Number" "Order No" "Subtotal" "Shipping Address" "Billing Address" "Thank you for shopping" "Thank you for your order" "Shipping Confirmation" "has shipped"} ' +
'';
console.log("---------------\n RETAIL FILTER: \n" + filter.replace(/\s+/g, ' '));
filter = '' +
'-is:chat ' +
'-from:me ' +
// Only when we haven't applied a userlabel already; this works well as the last rule in your filters list
'has:nouserlabels ' +
'{ ' +
// Uber, minus recipets
' (from:uber -subject:{receipt (your {trip ride})}) ' +
// Untapped toasts cheers
' (from:@untappd.com subject:{toast cheers comment}) ' +
// Noreply minus any reciepts/payment
' (' +
' {replyto:{noreply no-reply do-not-reply} from:{noreply no-reply do-not-reply}}' +
' -{subject:"you sent $" "Payment Info" "Confirmation" "RECEIPT" "Order Number" "Order No" "Order #" "Transaction"} ' +
' )' +
// Lists :(
' list:{ ' +
' mcsv.net' +
' lists.psu.edu' +
' } ' +
// Or, finally, from specific emails
' from:{ ' +
' info ' +
' chromium-discuss ' +
' notifications ' +
' newsletter ' +
' newsletters ' +
' alerts ' +
' googleplay ' +
' engagemsg ' +
' alumni ' +
' account@yamaha.com ' +
' hello@yerdle.com ' +
' (auto eventbrite.com) ' +
' email.newegg.com ' +
' mail.moosejaw.com ' +
' emails.gamefly.com ' +
' deals@livingsocial.com ' +
' email.americanexpress.com ' +
' listings@redfin.com ' +
' email.glassdoor.com ' +
' news.spotifymail.com ' +
' bounce@vsobr.com ' +
' team@mint.com ' +
' nextdoor@nextdoor.com ' +
' mail.fidelity.com ' +
' email.chase.com ' +
' mcsv.net ' +
' pinbot@pinterest.com ' +
' community@yerdle.com ' +
' omnimagnet.net ' +
' bovada.lv ' +
' invite@eventbrite.com ' +
' customer_research ' +
' communications ' +
' marketing ' +
' email.amexnetwork.com ' +
' paragonproperties ' +
' overhalfsale.com ' +
' cmail20.com ' +
' forums@sitepoint.com ' +
' goodrichresidential ' +
' senchacon.com ' +
' mlspin.net ' +
' goodhands.allstate.com ' +
' hello@getpocket.com ' +
' ({jobs-listings auto jobs member} linkedin.com) ' +
' orders@eat.grubhub.com ' +
' discoverbank@dfs.discover.com' +
' welcome.aexp.com' +
' ezpassma.com' +
' nationalgrid-onlineservice@us.ngrid.com' +
' email.iheart.com' +
' dropboxmail.com' +
' wordpress@blog.regisgaughan.com' +
' votenet.com' +
' eversourceebillnotification' +
' newsdigest@insideapple.apple.com' +
' vip@eat24hrs.com' +
' espnfantasy@fantasygames.go.com' +
' americanexpress@member.americanexpress.com' +
' } ' +
'} ';
console.log("---------------\n MAILER FILTER: \n" + filter.replace(/\s+/g, ' '));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment