Today while playing around with the new Apple Mail’s IMAP IDLE feature (which still doesn’t quit work I think) I discovered an interesting bit in the Preferences window.
Apparently Google succeeded in placing a link to it’s own help page into the Accounts settings in Leopard’s If this is placed there by Apple or via an integrated feature that lets email providers include Help links there, is unknown to me.
But still interesting and quite clever!

Since I sometimes had very poor Internet connections over the last few month I thought about how I could lower the data transfer volume on my Mac. One of the things that already bothered me since ages is that Exchange accounts in Apple Mail always sync the Public Folders. I never want to read those items and they are really useless.

After a bit of searching around I found two solutions that worked for me. One is only applicable if you are a Domain Administrator on the Exchange server, the other one is not so elegant but also works if you just have a mail account.

As Domain Administrator

  1. Log into the Exchange server and open the “Active Directory Users and Computers” management console.
  2. Find your acoount, click on “Properties” and select the “Exchange Features” tab
  3. Select “IMAP4” and click on “Properties”
  4. Disable “Use protocol defaults” and uncheck “Include all public folders when a folder list is requested”

Now give the Exchange some time to get the changes. After a while the Public Folders shouldn’t be displayed any more and when syncing this IMAP account they are left out as well.

On your local account

  1. Quit Mail
  2. Go to ~/Library/Mail/ (that’s the Library folder in your home directory) and find the folder that holds all the folders & messages for the Exchange account.
  3. Delete all the contents of “Public Folders” (always back-up first, before you delete 😉 )
  4. Select “Public Folders” and press CMD+I to get the Info. (or CTRL+click on it and select “Get Info”)
  5. Now under “Ownership & Permissions” set the folder to “No Access”
  6. Start Mail and observe the beauty of an Exchange IMAP account that doesn’t do useless Public Folders syncing!

Inspired by a blog post from Adrian Sutton and the comments beneath it I am now documenting how I train Spamassassin from within Apple Mail.
The setup is fairly straight forward but implies that you at least have a working Spamassassin instance running somewhere and know your way around UNIX a little bit. So I’m just going to explain the rough details to get you going.

  1. Switch on the bayes database for SA. On my Debian box this is done via putting the line use_bayes 1 in the file /etc/spamassassin/ After that restart SA (eg. /etc/init.d/spamassassin restart)
  2. Let SA put all your Junk Messages in the folder “Junk” in your IMAP Account
  3. Let Apple Mail put all your Junk Messages in the folger “Junk” in your IMAP Account
  4. Install a little Cronjob to have SA learn Spam from your Junk folder and Ham (=not Spam) from your Inbox. The following is my script:
    echo "----learn spam----"
    sa-learn --spam /var/opt/vmail/*
    echo "----learn ham----"
    sa-learn --ham /var/opt/vmail/*

    Note: those are just 4 lines, the blog just wrapps the two ‘sa-learn’ lines because of limited horizontal space. Of course you have to change the path to the real location of your ‘Junk’ folder.
  5. Last thing to do is installing the cronjob. Mine looks like this:
    0 */4 * * * /path_to_your/script > /dev/null 2>&1

Actually my setup involves learning from 4 different user accounts, who all use Apple Mail just to get more Ham- & Spam-volume faster.
I hope this is helpfull to you. It works perfectly on my server for over a month now.

While searching for an easy way to do server side Spam filtering, so I don’t have to bear with all those spams when looking at my Inbox with Webmail, I found IMAP Spam begone. It’s a python script that scans your Inbox for new messages and hands them to Spamassasin to check their spam status and copies them to a pre-defined folder in your Maildir if it is found to be a spam message. Client side spam filtering is done with Apple Mail on my iBook which works very good for me. So there is a second layer of filtering in place in case something still gets through.

Although is rather old and hasn’t been updatet in about three years it works very conveniently and tags nearly all of my Spams, moves them to my Junk folder and deletes them from my Inbox. The script is called from a cronjob and run every 10 minutes so there is a slight chance that I still find Spams in my Webmail before is able to run and delete them.

The reason I settled for this “external” integration of Spamassasin via is that I didn’t want to mess around with the transport rules of my MTA because of the chance to do something not all users are happy with. With IMAP Spam begone I have an individual solution that works for me without altering the way all the other people experience the mail service.

Below you’ll find the command line options I have running, for further explanations please refer to the projects homepage. --spaminbox INBOX.Junk --spamc --delete --nostats --expunge

Update: Since the ISBG site seems to be down currently, I’ll provide a download link for the script here.