1

With a Gmail username@gmail.com address, you'll also receive email sent to username+label@gmail.com addresses, very handy for creating filters.

I often username+website@gmail.com when signing up to websites, so if I end up getting lots of spam sent to that address, I know who to blame.

But what's a good way to find a list of all username+anything@ addresses in my Gmail spam folder?

I'd prefer to do this within the web client if possible. Next best is using external client such as Outlook or Opera mail but without having to download lots of mail if possible. I don't really want to download spam emails.

migrated from superuser.com Jun 27 '11 at 15:51

This question came from our site for computer enthusiasts and power users.

1

Not sure it can be done on the web client as it strips away all labels when a message goes into the spam folder.

As for not wanting to DL a bunch of spam, I'd use IMAPv4 instead of POP in your preferred e-mail client. All messages stay on the server, it just downloads headers.

1

In the end I made a simple Python script.

Using imaplib and email, it gets a list of emails in your [Gmail]/Spam folder, and lists those containing username+ in the "To" field.

Get it here:

https://github.com/hugovk/gmail/blob/master/spamify.py

  • 1
    @pnuts Accepted! – Hugo Nov 14 '17 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.