Using GMail to Filter Spam
From Health and Survival Wiki
Contents |
Intro
My situation was this: I was getting disaffected about my POP3 e-mail accounts. The oldest ones were absolutely swamped with spam. The signal to noise ratio was so low I was certain I was losing real messages (at most, one a month, but still, irksome) in the spam. I would let my POP3 e-mail accounts sit for days, weeks, sometimes months until there was just too much to process through. Occasionally, I'd manage some sort of spring cleaning energy and just sit there for hours, carefully combing through the spam for the real mail, which was often just system-generated notification for me to know about something I already knew about.
Then I came upon a LifeHacker article about using Thunderbird with GMail's new IMAP feature, and figured the next logical step would be for me to forward my formerly POP3 account mail to a new GMail account (for IMAP services and spam scrubbing) and then configure Thunderbird to use GMail's IMAP with that account, additionally configuring Thunderbird to send mail through the GMail IMAP account as the former identities. With GMail's and Thunderbird's separate features supporting multiple identities and identity verification, all this is possible.
Read on for working notes (which I'll try to clean up for better usability).
Assumptions
- That you have a hosting arrangement where you can create unlimited POP3 accounts (mostly for the addresses you provide Google so they can contact you - 1 account per additional Google acount you configure)
- You are sufficiently geeky that you can follow the walkthroughs written for Thunderbird working via IMAP with GMail (by both Google and Lifehacker)
- Your POP3 provider can be configured to forward or bounce incoming mail to another account (the GMail account(s) you use to leverage this IMAP service)
Method
Principles here are to check your work. When you set up an account, or configure Thunderbird to use an account, or whatever, use yet another e-mail address (not one of the ones you're working with directly) to test sending to that third account and receiving from that third account. With new GMail accounts, be sure to check your various (at some points in this walkthrough, you may have two, but you'll end up with only one per GMail account) Spam folders for the test messages, as they can be filed that way sometimes, depending on your test message contents and other facotrs.
At every major step, verify that your hookups are working. In Thunderbird, watch the status messages in the lower left carefully when you test the Get Mail command, or when you send mail via Thunderbird through GMail. That status message can flicker quickly by, but if you look carefully, you may find it'll tell you something's wrong, and the fewer changes you've made since your last test, the fewer changes you'll have to double-check to fix whatever issue you may have.
Carefully set the POP3/IMAP settings you need in Thunderbird - both my POP3 host and GMail use non-standard usernames, GMail uses non-standard ports, and GMail uses SSL to protect the authentication step.
Create a fallthrough/fallback account
In case Google needs to contact you, or some other reason that you need to rely on POP3 instead of using this roundabout way, so that you don't end up creating an endless loop of configuration issues, create a fallback account with your POP3 provider, and set up Thunderbird to reach it. Use other e-mail accounts to test and make sure that you can both receive and reply to mail to that account. Be sure of this step so you have a fallback position, and so you can provide Google with alternate/secondary e-mail addresses as needed.
Create a GMail Account
This one's for your incoming, to be filtered, email. If you're used to having several different POP3 accounts, you'll probably want to have at least some of them be represented with GMail accounts. Depending on your POP3 host's capabilities, you may have trouble telling the difference between e-mails from different POP3 accounts sent to the same GMail account by your POP3 host provider. Each GMail account will roughly correspond to one account in the new Thunderbird configuration. Of course, depending on your purposes, you may wish to distill down to the essential number of accounts to be a responsible user of Google resources, though you may decide that you are doing Google a service by giving them more spam to work with.
Also, consider using a strong password. If you can use the free crypto technologies to create passwords and save them to a store you can get to anywhere (like on a USB key you carry, or potentially on-line, but be careful here as physical access to the encrypted file is the first part of a potentially successful attack to steal your secrets), you can safely store all of your passwords behind one password you remember. Be sure to remember that one password securely and faithfully, but it can help avoid having to remember hundreds or thousands of passwords. Also depending on your purposes and overall security, you may be comfortable letting Thunderbird remember this password. It's your choice, depending on security levels you're comfortable with.
Configure your POP3 account to forward to the new GMail Account
Configure your POP3 account to bounce or forward email to the new GMail account. It's hard to go into specifics, not knowing your host. Mine, Dreamhost, uses a control panel that makes it pretty trivial. You can even forward to other forwarding addresses, but this introduces a delay in getting your mail to the final destination.
Once this step is complete. Test by sending a test message to your POP3 account. Make sure the mail ends up in the proper GMail account.
You may want to use a third account to do this test so you don't end up with GMail hiding e-mail from you that you sent, thinking it a duplicate. Send the e-mail to your POP3 account from a third account and make sure it shows up in the proper records folders (i.e. your Sent Mail, your Outgoing Mail) on the way there, and that it ends up properly in the destination GMail account.
If you're using Dreamhost for this action and you want to try to keep your archive of old messages (in your POP3 account, most likely downloaded to your local computer), try to do the forwards/bounces first and THEN configure for forwarding. Otherwise you may get disk quota-based rejections since your now-forwarding account doesn't have a quota to work with.
Configure a new Thunderbird account to use your GMail IMAP Account
Follow Google's article and then LifeHacker's article.
Note that if you already have Thunderbird using multiple Outgoing (SMTP) servers for your other extant accounts, Thunderbird configuration will probably be missing settings for outgoing servers and look a little different from Google's and LifeHacker's walkthroughs. Just put that aside and deal with those settings after getting the IMAP settings set properly. Then you can go back and either create a new Outgoing profile or edit an existing one, depending on what makes sense.
Make sure to test as you go, and read carefully (especially the LifeHacker article) so you don't miss any details you might find helpful. Also give the whole LIfeHacker article at least one thorough read so you can know how Thunderbird actions/statuses map to GMail, and how Thunderbird's folders translate to labels in GMail.
Configure your GMail-hosted IMAP Account to use your old POP3 Address(es)
Use the Accounts tab under GMail's Account Settings to establish your ID as the POP3 Address. If everything's working, the verification message should show up on your Thunderbird view of your new IMAP account (via the forwarding you already set up). If you're lazy and don't want to set up multiple identities in Thunderbird, you can just set the reply-to address on your default identity, which is almost as good (assuming you're supporting just one incoming e-mail address on this IMAP account).
If you wish to use Thunderbird's support for multiple identities, you can send as your old POP3 identity, and it really isn't that much more difficult. Just be sure you've set up GMail to send as those identities first.
Follow-through
Now that everything's set up the way you like it, remain vigilant. With large configuration changes like these, it pays to keep on top of how they're working for a few days so you know what to expect and you can detect and avoid early issues.
Monitor carefully
You'll want to keep an eye on things after you're done. Make sure you check all the spam folders and all the trash folders and all the inboxes of your GMail accounts regularly so you know if legitimate messages are likely to slip away in your new configuration or not. If so, and you can't tolerate the risk, be ready to roll back to a safer postion for some or all of your now-forwarding accounts.
Personally, I'm keeping some of my accounts as POP3 accounts because I'd rather their material downloaded directly to my hard drive. This forward-through-GMail-IMAP-then-back-through-Thunderbird reconfiguration is purely for the non-vital e-mail I'm expecting that's already rife with spam.
I haven't yet seen any dropped legitimate messages that I can identify that were simply lost in this new configuration, but my incoming spam has already dropped dramatically. What I mean by this is that the mail that ends up in my Spam folder on the new GMail accounts is significantly diminished in numbers from what I'm used to seeing in Thunderbird from the plain POP3 accounts for the same addresses. This may be because GMail maintains some good block lists. I'm not sure, probably by host or IP address range.
Other related tips
- If you want to try to import all your old POP3 messages to your new GMail-hosted IMAP account, try out Mail Redirect 0.7.4. Use it to redirect your mail in your POP3 account to your GMail-hosted IMAP account before you set up the forwarding, as forwarding can sometimes quash your quota and ability to send further mail from that account. Also note that when I tried this, most of my old e-mail ended up straight in my Spam folder in the IMAP account, and some messages ended up being forwarded as empty (or maybe they were extra). I eventually decided to just store the old messages offline in Thunderbird's Local folders.
- Interestingly, Thunderbird seems to be getting pretty good at handling vast quantities of e-mail. After combining all my old e-mail into the one Local Inbox, I had just under 20,000 e-mails. Thunderbird was a little slow in adding 9,000 messages in one batch - the cleanup phase with the last messages took about 5 minutes of apparent lockup time for Thunderbird, but it recovered nicely without a restart once it was done reindexing or whatever it was doing.
- Especially for sending e-mail, be sure you have the correct outgoing (SMTP) server set. You can create additional outgoing profiles in Account Settings (all the way at the bottom, as "Outgoing Server (SMTP)", then click "Add" in the right-hand portion of the settings window). You can then set individual accounts in Thunderbird to use specific SMTP profiles in Account Settings (the main settings) for each account.
Multiple GMail boxes
If you want to configure GMail in multiple separate accounts, consider creating forwarding addresses for each one's Secondary/Fallback e-mail address, so you can provide a different secondary email address for each GMail account, and forward each successive secondary email address to the same primary fallback account that you already created. After all, that account should be pretty low traffic. This way you'd just have one extra fallback POP3 account configuration in Thunderbird for all of your secondary e-mail addresses that Google has.

