Fighting Spam with Gmail

Peter Rukavina

Remember a few weeks ago when I lamented the dramatic uptick in the amount of spam I was getting. Well I got rid of it. All of it. Here’s how.

First, I modified the procmail settings on our mail server to redirect all of my incoming email to my Gmail account, except email coming back from Gmail itself:

:0
* !^X-Gmail-Received: .*
! XXXXXX@gmail.com

Next, I modified my Gmail account so that under the “Forwarding and POP” section it’s set to “Forward a copy of incoming mail to…” my actual address, and “archive Gmail’s copy.”

The effect of these two changes is that all incoming email gets redirected to Gmail where spam is stripped out (very, very effectively) and non-spam is forwarded back to me where, because of the procmail rule, it’s not forwarded to Gmail and I pick it up from my IMAP server, using my regular old mail client.

In addition to the spam that Gmail’s filtering out, I’m also running Spamassassin locally, and using Apple’s Mail.app anti-junk mail features.

In addition to the spam-fighting properties of this solution, I also get a searchable backup of all my incoming email at Gmail.

This has all been in place for 3 days now, and I haven’t seen a single spam message in my inbox yet.

Comments

Submitted by Chris Corrigan on

Permalink

That is one damn smart hack Peter. Sharp, easy and true, and with the added back up of the searchable archive.

Submitted by Ken on

Permalink

Can you somehow bcc all your sent mail thru google to archive it as well? You would have a complete backup system on hot standby in Google.

Add new comment

Plain text

  • Allowed HTML tags: <b> <i> <em> <strong> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). You can subscribe to an RSS feed of posts, an RSS feed of comments, or receive a daily digests of posts by email.

Search