Gmail – Import MBOX file to Gmail, but pass it through spam filter

gmailspam-preventionthunderbird

I have an MBOX file of an old email account that I wanted to merge into Gmail as an alias.

However, this MBOX file has a bunch of spam emails in it that I want to basically verify and discard.

If I import emails to Gmail are they passed through the spam filter and put into the SPAM folder if they're spam?

Hoping so! I was just planning to import them using an IMAP client by dragging them into the inbox or something.

An alternate plan would be to import them all into another Gmail account and then import THAT somehow to Gmail using Gmail's tools, but I wasn't sure what might/would trigger the spam filtering.

Best Answer

I'm not at all sure that Google's spam filters would be triggered by an import. SPAM filtering is normally done at the receipt time.

There are, however, Linux tools you can train with a bunch of emails, still don't think you would be able to use that to clean out the existing MBOX though.

You could instead try opening the file in Thunderbird or another client that directly supports MBOX format and manually clean it out that way but it might be a lot of work.

The final choice is to use this Python script that someone has written to filter SPAM out of MBOX files. I've not tried it and I strongly recommend taking a copy of the MBOX file before trying it.