Skip to content

matthewbaggett/email-deleter

Repository files navigation

Matt's Email Deleter

Build Status

What? Why?

So my 15 year old Gmail for Business account has about a trillion frigging emails in it that I don't care about any more.

And deleting 10k+ emails through the UI doesn't work.

So I'll delete 'em automatically over imap I guess?

Running it

docker run --rm \
    --env USERNAME=you@gmail.com \
    --env PASSWORD=changeme \
    --env IMAP_SERVER=imap.gmail.com \
    --env IMAP_PORT=993 \
    --env IMAP_FLAGS="/imap/ssl/novalidate-cert" \
    --env FROM_BEFORE="2016-12-31" \
    matthewbaggett/email-deleter \
    bin/email-deleter

or use the provided example docker-compose.yml

version: '2.4'
services:
  email-deleter:
    image: matthewbaggett/email-deleter
    environment:
      USERNAME: matthew@baggett.me
      PASSWORD: changeme
      IMAP_SERVER: imap.gmail.com
      IMAP_PORT: 993
      IMAP_FLAGS: "/imap/ssl/novalidate-cert"
      FROM_BEFORE: "2016-12-31"

Why novalidate-cert?

Because Google's Gmail product doesn't like PHP's ancient imap library's SSL gubbins and throws an error when we try to connect. Also because I'm a bad person and in this context I don't care.

About

Delete emails out of Gmail programatically.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published