Previous Next  Up  Table of Contents  SpamSieve Home

5.5.7   Setting up a Spam Filtering Drone

As described in the Correct All Mistakes section, you need to tell SpamSieve about messages that it misclassified so that it can learn from them. Also, the sooner you correct SpamSieve the better. This presents a problem if you’re going to be away from your Mac for a while, e.g. if you’re on a trip and using your iPhone or Web mail. With the normal setup, you can leave SpamSieve running on your Mac at home, and it will clean the spam out of your inbox, but aside from remote-controlling your Mac there’s no way to train SpamSieve.

The drone setup lets you run SpamSieve on one Mac and train it from other Macs, PCs, or iPhones. This setup requires Apple Mail, and it’s based on a tutorial from MacMerc.

Here’s an outline of how it works:

To setup the spam filtering drone:

  1. Make sure that all the computers are set to connect to your mail account via IMAP (or MobileMe). These instructions assume that you have a single IMAP account. If you have more than one, this sort of setup will still work, but it will be more complicated.

  2. This optional step will hopefully keep SpamSieve running if there’s a power failure while you’re away from your drone Mac. Open System Preferences. In the Accounts pane, set Mail as a login item for your account. Under Login Options, enable automatic login. In the Energy Saver pane, set it to Restart automatically after a power failure.

  3. Follow the normal SpamSieve setup procedure in the Setting up Apple Mail section, with one change: in Step 2, create the new Spam mailbox in your IMAP account instead of in On My Mac.

  4. Create two more mailboxes in your IMAP account: TrainGood and TrainSpam.

  5. Open Script Editor and paste in the following script:

    on perform_mail_action(info)
        tell application "Mail"
            set _mailbox to mailbox "TrainSpam" of account "AccountName"
            repeat with _message in messages of _mailbox
                set _source to _message's source
                tell application "SpamSieve" to add spam message _source
                set _message's mailbox to mailbox "Spam" of account "AccountName"
            end repeat
        end tell
    end perform_mail_action
    

    Change the two occurrences of AccountName to the name (description) of your mail account. Save the script somewhere on your Mac, and call the file RemoteSpamTraining.scpt.

  6. Go to Mail’s Preferences window and create a new rule at the top of the list called Remote Spam Training. The conditions should say:

    Account AccountName

    The actions should say:

    Run AppleScript […]RemoteSpamTraining.scpt

    Rather than typing the path to the script file, you can click the Choose… button and select the file that you created in Step 5.

  7. Open Script Editor and paste in the following script:

    on perform_mail_action(info)
        tell application "Mail"
            set _mailbox to mailbox "TrainGood" of account "AccountName"
            repeat with _message in messages of _mailbox
                set _source to _message's source
                tell application "SpamSieve" to add good message _source
                set _message's mailbox to mailbox "INBOX" of account "AccountName"
            end repeat
        end tell
    end perform_mail_action
    

    Change the two occurrences of AccountName to the name (description) of your mail account. Save the script somewhere on your Mac, and call the file RemoteGoodTraining.scpt.

  8. Go to Mail’s Preferences window and create a new rule at the top of the list called Remote Good Training. The conditions should say:

    Account AccountName

    The actions should say:

    Run AppleScript […]RemoteGoodTraining.scpt

    Rather than typing the path to the script file, you can click the Choose… button and select the file that you created in Step 7.

Previous Next  Up  Table of Contents  SpamSieve Home