I got frustrated with the amount of daily spam in my Gmail “Promotions” tab – especially since it made searching for email basically impossible. While there are services that will help me unsubscribe from all the mailing lists I’m signed up to, they wanted unfettered access to my Google account, which I would never give.
I wrote an open source tool called hatchet which will access your Gmail account using IMAP, find the latest unsubscribe link for each unique email sender, and write it all to a csv/spreadsheet file.
It’s open source and doesn’t require any external service.