iCloud syncing of Mail rules

I have a personal account setup on three different Macs—my own MacBook Air, an iMac that serves as our home server and the kid’s mini. In my account on the iMac, I had Mail running with an elaborate set of rules, including those related to spam handling.

This morning, I woke up to discover loads of unfiltered messages in Mail on my iPhone. I checked the rules panel in Mail on the iMac and discovered all my custom rules were gone.

Continue reading iCloud syncing of Mail rules

How to upload Skitch images to Amazon S3 using Dropzone

Like many people, I’ve long used Skitch to snap, annotate and share screenshots. Sharing involves Skitch uploading the image somewhere, and putting the destination URL on the clipboard for your immediate use.

In addition to Skitch.com, the original product allowed you to specify other upload destinations, including your own FTP or SFTP server. And over time, they added other upload options like WebDAV and Flickr.

Continue reading How to upload Skitch images to Amazon S3 using Dropzone

Mysterious problem with my Mac

I have an 11″ MacBook Air that I transport between home and office each day. In both locations I connect MBA to a 27″ Thunderbolt Display. And connected to each of those Cinema Displays are two 2.5 inch hard drives—a time machine drive, and a bootable backup drive.

Both the time machine and bootable backup drives at the office are encrypted, and the encryption passwords are located in my keychain. So when I connect the MacBook Air, they automatically mount and become ready for use.

The problem

From time to time, while using the MBA, I’ll completely lose access to application interfaces, making the computer all but unusable. I can thankfully still restart the computer by clicking on the Apple menu and choosing restart. If any application, however, requires anything other than mouse interaction to quit, then I’m stuck and have to force-restart the computer.

Although it’s not the only time this happens, the action that most reliably seems to triggers the problem is the mounting of a DMG volume that would need to prompt the user (like when I’m installing an application, or when an app is performing a self-update).

The only other clues I have are the following:

  1. When the computer is shutting down and the final gray screen appears, I’ll often see a dialog box asking me to enter the Time Machine disk password.

  2. Other times, I’ll see a dialog asking me to unlock the back-up drive (and I usually see this dialog when first accessing my account). If I enter the password in this dialog, it’ll simply shake at me. Canceling is the only way past.

<

p>

In both cases, the drive (Time Machine or Bootable Backup) were already mounted.

What I suspect is happening

I think the problem is due to some timing issues related to how I connect my computer.

I normally first connect the Thunderbolt display’s power to the MBA, and then connect the Thunderbolt cable. I then wake the computer using the Apple bluetooth keyboard. To disconnect, I simply dismount all drives, and pull the Thunderbolt cable out (putting the machine to sleep).

I’m guessing that at some point between connecting the Thunderbolt cable and actually unlocking the screen and getting into my account, the OS tries to mount these volumes and prompts for a password. But then my account is accessed, and via the keychain the volumes are unlocked—but these original prompts are somehow staying alive, and later interrupt the system when other volume-related prompts are delivered (like when a DMG volume mounts).

Also to note, when I happen to remember to open the MBA and unlock the screen before connecting the Thunderbolt display (and then re-closing to use only the 27″ display), I’ve not noticed this problem happening.

This is one of those problems that I imagine is so obscure, that Apple would never get around to fixing it (if they even know about it.) So I’m hoping by posting this to my blog, perhaps some others experiencing it will find their way here via Google, and leave a comment.

Silent Email Filtering Makes iCloud an Unreliable Option

Michael Tsai

Apple deletes some of the false positives outright. They never even appear in the Junk mailbox. This has been going on for many years. It’s also no longer possible to turn off Apple’s server-side filtering, e.g. if you prefer to use another filter such as SpamSieve. These days it’s easy and inexpensive to host e-mail on your own domain, and there are free e-mail services that are better than Apple’s, so I see little reason to use iCloud for e-mail.

I’ve been telling friends and family for years to think twice before using a Gmail or iCloud email address — or even worse, the email address provided by one’s ISP. The problem is lock-in — once the world knows you @gmail.com or @earthlink.net, it’s not easy to change when you become concerned about Gmail account hacking, or when your ISP goes belly up.

Regarding spam, since setting up my own home-based filtering system, I’ve had absolutely no need for the types of server-side filtering services offered by Gmail and iCloud.

(And for a bit of added security, I have the incoming messages on my publicly-visible email addresses redirected into an email account on a domain that nobody knows about. So if anybody ever hacked into one of my known email accounts, they wouldn’t find anything there.)

Getting rid of those annoying “Open With…” duplicates

Getting rid of Open With duplicates – All this

“This is the problem: You want to open a file using something other than the default application. You right-click its icon in the Finder, choose Open With, and a submenu pops up with an absurd number of duplicate entries.”

Dr. Drang solves a problem I’ve had for the longest time. His solution involves doing things at the Unix level in Mac OS X. For the not-quite-so-geeky people like myself, here’s a Keyboard Maestro script that you can download that does the same thing, and is configured to run daily at 5:30am.

Fast access to the previous month's time report in Harvest

This article shows you how to use Keyboard Maestro to automatically access your Harvest timesheet report for the previous month. Enjoy!

At the beginning of each month, I invoice Makalu’s clients for the work we did in the previous month. We track our time at Harvest, and in order to see how many hours need to be invoiced I go to their website and click on “Report”→”Month”→”Left Arrow”. All in all, four steps.

Being lazy, I’d like to reduce this to one step.

With the help of our system administrator and unix wizard, Niall O Broin, I created a Keyboard Maestro macro that executes the following shell script, resulting in Safari opening the right URL to access the full report for the previous month. (Niall complained that OS X’s date function was trickier to deal with than the GNU function. Whatever.)

open -a /Applications/Safari.app https://makalu.harvestapp.com/reports?from=$(date -v -1m -v -$(date +%d)d -v +1d +%Y%m%d)&till=$(date -v -$(date +%d)d +%Y%m%d)&kind=month

If you use this script, you’ll want to replace the “makalu” in the URL with your own company’s unique identifier at Harvest.

A weekly planner—the missing killer feature from Things

Update — Since writing this article, I’ve switched back to OmniFocus.


When CulturedCode finally announced the public availability of their cloud-based syncing system, I decided to switch back to Things, from OmniFocus, for my task-management tool. Although I’m quite happy with the switch, there’s one killer feature that (for me) is missing from the app, which I’ll describe in this article. Continue reading A weekly planner—the missing killer feature from Things

Deleting old spam messages with AppleScript

Recently, I blogged about setting up my own “server-side” spam filtering system based on a home-based iMac running Mail with SpamSieve. I’m super-happy with the setup, as it’s keeping my inbox spam-free on my MacBook Air, iPhone and iPad.

The only feature I found missing in this setup, with respect to Apple’s own junk mail filter, was the ability to automatically delete old spam messages after a certain number of days.

The SpamSieve manual describes one option for doing this, but it involves renaming your Spam folder, re-enabling Mail’s junk mail feature, and setting some advanced options.

What I really wanted was an AppleScript that I could schedule to run periodically from Keyboard Maestro, that would automatically delete messages in my Spam folder older than 30 days.

Doing some Googling, I found this article at Macworld, that referenced an AppleScript for generally moving messages between folders. I hacked and simplified the script as follows:

  • It cleans only one folder, my Spam folder, rather than a list of folders.
  • It sends a message to Growl, alerting me to the number of messages that were deleted.

I setup a Keyboard Maestro task to run this script each morning at 6:00 am, and it’s working great!

In case you’re interested, here’s the AppleScript. (And for the record, I know very little about AppleScript, so I’ll update this code as soon as the wizards out there point out the problems/improvements that surely exist.)

set DestinFolderName to "" -- mailbox to move messages to. If you want to just delete them, leave it blank.
set StaleTime to 30 -- days old the message must be before moved or deleted
set ShowMailboxesProgress to false -- determines if you want the "Processing" box displayed for each mailbox
set CountMessages to 0

tell application "Mail"
    set thisAccount to account "Your IMAP or POP Account Name"
    set accountName to the name of thisAccount
    set mailboxName to the name of mailbox "Spam" in thisAccount
    if ShowMailboxesProgress then
        display dialog "Processing folder " & mailboxName & " in account " & accountName
    end if
    try
        set messages_list to every message of mailbox mailboxName in thisAccount
        set NumItems to number of items in messages_list
        -- display dialog "Number of items" & NumItems
        repeat with i from 1 to number of items in messages_list
            set theMessage to item i of messages_list
            set difference to ((current date) - (date sent of theMessage)) div days
            if difference is greater than StaleTime then
                if DestinFolderName is not equal to "" then
                    move theMessage to mailbox DestinFolderName in thisAccount
                else
                    delete theMessage
                    set CountMessages to CountMessages + 1
                end if

            end if
        end repeat
    end try
    tell application "Growl"
        set the allNotificationsList to {"Cleaned up spam folder"}
        set the enabledNotificationsList to {"Cleaned up spam folder"}
        register as application "Spam Folder Cleanup" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "SpamSieve"
        notify with name "Cleaned up spam folder" title "Cleaned up spam folder" description "I just deleted " & CountMessages & " messages in the Spam folder older than " & StaleTime & " days." application name "Spam Folder Cleanup"
    end tell
    -- display dialog "Finished!"
end tell
quit

Encrypting external USB bootable backup drives with Disk Utilities

For the past several years, I’ve maintained (using the excellent SuperDuper!) two bootable backups for my Mac, providing immediate, redundant recovery in case of the loss of the Mac’s internal drive. And also for the past several years, these bootable backups have taken the form of small (usually Western Digital) 2.5″ bus-power USB drives.

Since upgrading to Lion, I’ve also been happy to be able to encrypt these external drives using Apple’s Disk Utilities, allowing me to keep one disk at the office, and one at home. (Break-ins and theft are a major problem here in Spain, so knowing my backup disk at work is encrypted gives me piece of mind.)

Upgrading my MacBook Air

Recently I upgraded from a 2011 to 2012 11″ MacBook Air, and as part of that upgrade, also needed to upgrade my external bootable drives; the old ones were 256GB, matching the internal SSD of the 2011 Air, while I’d need 500GB drives to match the internal SSD of the new Air.

Can’t encrypt the G-Drive Slim

So off I went shopping to the official Apple Store in Marbella, where I was excited to see that they’d lowered the price of the tiny 500GB G-Drive Slim to 69 €. I bought two.

I ended up having to return them, though, when I discovered that Disk Utilities couldn’t encrypt the drives, failing with the following error:

MediaKit reports block size error, usually caused by not being a multiple of 512.

I emailed G-Technology support, asking if they knew why I was getting that error when trying to encrypt the drive with Disk Utilities, and got this goofy reply from Gene Gilbert:

Thanks for your email. The easiest way to do protected files on the drive is to create a Disk Image in Disk Utility, then you can add files to the disk image, and will require a password to open. The other option is to use File Vault, but that does the whole system. Other than that, it would require a third-party solution.

I replied asking if they’d mind addressing the question I actually asked, and didn’t hear back.

Apple don’t sell USB 3 drives?

The Apple Store staff allowed me to return the drives (but only after first assuming I know nothing of what I’m talking about. Took a few minutes to clear that up.) I then purchased the tried and true Western Digital Passport for Mac 2.5″ drives.

Got home, unpacked them, connected to the new Air, encrypted, and started backing up.

Waiting for SuperDuper! to do its thing, I surfed on over to the Tech Specs page at Apple, to learn more about the new Air I’d bought. (I know what you’re thinking…) Then I see it:

USB 3 ports

I look over at the Western Digital box, and see “USB 2”. Darn.

So, back off to Apple I go, to figure out how I’d missed the USB 3 drives, and there I discover they have no USB 3 drives. Maybe they’re so new…

But then back home, visiting Pixmania.com, I get the impression that outside the world of Apple, there’s nothing but USB 3 drives! So back on the scooter I jump, and scoot on up to FNAC, where I discover the exact same Western Digital drives, for the exact same price, but with USB 3!

I bought two, having gotten the agreement from Apple that I can return their’s with no other reason than that I found a better option somewhere else.

Disk Utilities crashes when encrypting the drives

I get back home with the new USB 3 Western Digital drives, let out a small sigh when I see they have yet another variation of USB connector, hooked them up to the Air, and fired up Disk Utilities.

I selected “Mac OS Extended (Journaled, Encrypted)” and started the format process. About the time it read, “Waiting for logical volume to mount” or something like that… crash.

Started it again, tried to format. Crash.

Oddly, though, it did seem as if the encrypted volume was actually created and mounted. So I ran the “Verify” process, which… failed.

Oh crap, I’m thinking. Another drive that can’t be encrypted.

But before returning these drives, and becoming the most famous drive-returning dude in Marbella, I decided to just see if I could backup, and then boot from the thing.

So I ran SuperDuper!, rebooted, and … success!

Curious, I returned to Disk Utilities, and ran the “Verify” command on my encrypted external Time Machine drive, and one of the old USB 2 drives. In both cases, it returned the exact same verification failure.

So while I still don’t know why Disk Utilities crashes when encrypting these new disks, the verification error is apparently not evidence of Disk Utilities actually failing to format the drives.

I decided to blog about this, in case others run into this situation (since Google came up empty when I looked.)

Migrating from a 2011 to 2012 MacBook Air

My shiney new maxed-out 2012 11″ MacBook Air arrived yesterday, which I bought to replace my 2011 MacBook Air — providing a bit more breathing room in the area of memory and SSD space. (I can once again keep my Aperture photos together with the library file, rather than “relocating” off to an external drive. Yeah!)

For other people making the same migration, I’ve been noting the issues I ran into.

  • Migration. My intention was boot the new Air off one of my two USB bootable backup drives I’d previously maintained with SuperDuper!. It didn’t work! Trying to boot, I got a gray start-up screen with an error icon (circle with a line through it)!

    For a moment, I was pretty worried. I thought perhaps it was USB-related, since the new Airs have USB 3. I thought perhaps it was due to the fact that I encrypt my external bootable drives. I thought perhaps, due to very bad luck (not unusual for me), both drives were bad.

    I resorted to using Apple’s Migration Assistant utility, and was relieved to see my backup drives appear in the source volumes list. So I ran that, and the new Air was up and running about half an hour later.

    Turns out the bootable-disk problem was related to the operating system. The 2012 Airs run a newer version of the operating system, and can’t be booted by the version currently running on the 2011 Airs. I confirmed this by later updating one of my external drives (once running on the new Air), and then booting from it.

    Which reminds me — it’s easy to forget how fast an SSD is, until you boot from a 5400rpm USB drive. I’ll be upgrading those as soon as USB 3 drives are available.

    One final tidbit about drives — I actually tried to update my two external drives with new G-Drive Slims, which are very sleek and slim. Unfortunately, Disk Utilities can not encrypt those (it returns some kind of error related to bad block-sizes). I emailed G-Technology about this, and their suggestion was to “do file security with disk images”. Yeah.

  • Cloud backups. Backblaze seems to have migrated seamlessly without having to do the usual “transfer backup state”. Same with Arq.

  • Anti-theft software. Both Prey and Undercover required reinstalling. In the case of Prey, it first required a full uninstall. (You’re probably noticing I like redundancy.)

  • Daylite. I noticed that Daylite 4 stopped syncing with the server, claiming wrong username and password. I tried logging out and back in, from a remote location over the internet. The app never appeared to login, but then claimed that the “last sync” was “1 minute ago”. Strange — it now appears to be running normally, and syncing (and the server claims its sync’d), but manual triggering of the sync results in an authentication error.

  • Bluetooth devices. I had to delete and re-pair all my bluetooth mice and keyboards, from the Bluetooth Preferences.

  • iTunes Authorization. For the first time ever, I actually remembered to de-authorize iTunes on the old machine.

  • Software updates a-plenty. First time run of Software Update, and it listed about 10 things to download and install. Done.

  • 27″ Display hiccup. The first time I connected the Air to my 27″ Cinema Display, in a booted state but with no users logged in, none of the display-attached USB devices were recognized, and the display didn’t appear as a sound output device option. A restart fixed that.

  • Pow. Pow — an open-source utility released by 37signals, making it somewhat easy to run local Rails apps — didn’t get migrated, or some combination of Pow and whatever under-the-hood stuff it uses didn’t. To get this working again, I had to re-install Pow, upgrade from Xcode 4.2.x to 4.3.x, install the Xcode command line tools, install Homebrew, then install git, and holy-moly on it went! Finally got it working.

    Apart from booting from a USB drive, this turned out to be the only time-consuming migration issue.

How to batch process videos using HandBrake and Hazel

I’ve tried just about every video encoding product for MacOS X, and always keep returning to the venerable HandBrake.

Why haven’t I just stuck with HandBrake in the first place? One reason — its UI for batch converting videos sucks. Unlike all other products, you can’t just drag a bunch of videos into HandBrake. No, you have to chose them one at a time, and manually add them to the HandBrake queue.

Why haven’t I stuck with one of the other products? Because none of them have presets that are as good as HandBrake’s, and I couldn’t be bothered to learn the FFMPEG syntax. For example, all the presets in something like RoadMovie will change the resolution of the encoded video. HandBrake’s “Normal” preset will preserve the video’s original dimensions.

This weekend, with the help of Super-Makalu Justin Driscoll (@jdriscoll), I finally created a batch processing system, based on HandBrake. This article documents the setup.

What you need

  • (HandBrakeCLI). This is a version of HandBrake that can be run from the command line. Don’t expect the “doc” folder that comes with this utility to actually tell you how to install it. That’d be asking too much. Fire up Terminal, navigate to wherever HandBrakeCLI is, and move it to your /usr/bin directory with this command (you’ll be asked for your admin password).
  sudo mv ./HandBrakeCLI /usr/bin
  • Hazel. Hazel is a System Preference utility for the MacOS X, that allows you to schedule regular actions to be made on the contents of folders. Download and install.
  • This bash shell script, which you can copy and paste later from Pastie.

Basic idea

I have the following folder structure:

  /Users/mhenders/Hazel/Videos/input-ipod
  /Users/mhenders/Hazel/Videos/out-ipod
  /Users/mhenders/Hazel/Videos/processed

We’re going to tell Hazel to watch the “input-ipod” folder, and whenever it finds a new video file, to process that file with HandBrakeCLI, and then move the original into the “processed” folder.

Details

  • Once Hazel is installed, add the “input-ipod” folder to its watch list.
  • On that folder, create the following rule with two steps: (1) the first runs an embedded shell script (passing each video file to HandBrakeCLI for processing) and, (2) when done, move the original video to the “processed” folder, which you can later delete or whatever.

One setup, all you have to do is drop videos into the “input-ipod” folder, wait a few moments, and watch Hazel kick into action. I set this up on our 8-core iMac at home, and watched it blow through 100 videos. Yeah!

Caveats

The Hazel embedded script will fail if the original video has spaces in the name. So be sure to change “My Home Video.mov” to “My-Home-Video.mov” before dropping into the input folder. I haven’t taken the time to sort that out yet, but will update this blog when I do.

Enhancements

You’ll notice that I’ve named my watch folder “input-ipod”. As you can imagine, I have other input folders named “input-appletv” and “input-normal”, for dropping videos I want processed with HandBrake’s “AppleTV 2” and “Normal” presets. I modify the Hazel embedded script accordingly for those rules. A complete list of HandBrake’s presets can be found here.

Hope this article helps others wanting to do the same. If you do, I’d love for you to drop a “Hello” message in the comments below.

Daylite local offline database not present in Daylite Server

This post is about a critical problem that I’m having with MarketCircle’s Daylite product, and is mainly written for Google, so that other people who may have similar problems in the future will hopefully find a solution here.

Continue reading Daylite local offline database not present in Daylite Server

Needed: Scheduled disabling of the iPad’s cellular data connection.

As a consequence of the nightmare I’ve had with Vodafone trying to contract an iPad data plan, I happened to discover a more attractive alternative — the iPad pre-paid card from Orange.

Cellular internet access is enabled (and disabled) via the Cellular Data setting, within the General Preference. When enabled, the pre-paid card provides 3G access to the internet for 3.50€ per natural-day, charged against your pre-filled account balance.

For example, if I enable Cellular Data at 6 pm, I’ll have 3G internet access for 3.50€ until midnight, after which the next natural-day period starts (and another 3.50€ charged).

The pre-paid has proven attractive for a number of reasons:

  • As I’ve discovered, I’m nearly always on Wifi when using the iPad, and rarely need the 3G connectivity — and so, for me, the prepaid option is far more economical than Vodafone’s 37€ per month contracted service.

  • I like the full control I have over the spending — no more erroneous charges that require me to spend hours on a low-quality VOIP connection to an outsourced call center in South America to get resolved.

  • Recharging the card is easy — I can do it at any ATM machine, online at the Orange website, or even at the local grocery store.

<

p>But there’s one problem, and it’s a big one:

It’s easy to forget to turn the data connection back off when I’m finished with the iPad. This happened once to me, and within a matter of days, I’d unknowingly consumed my entire pre-paid balance.

Apple could solve this problem by adding an optional auto-disable setting to the Cellular Data preference. I’d implement such a setting like this.

(If I can get this article fireballed, perhaps it’ll get noticed by someone at Apple. In anticipation, wp-cache is enabled… 🙂

Startup disk recovery and repair — lessons learned.

Yesterday, the SSD startup drive in my OS X MacBook became extensively corrupted, such that the computer would no longer boot from it. The process of recovering and repairing the drive revealed a number of important lessons related to recovery preparedness.

Continue reading Startup disk recovery and repair — lessons learned.

Can’t cancel a Screen Sharing window. Skitch saves the day.

This morning I tried to connect from my MacBook to another Mac using OS X’s Screen Sharing application, and ended up staring at an unsuccessful connection window, that couldn’t be canceled. Skitch, the screenshot capture, annotation and upload tool, unexpectedly solved the problem.

Continue reading Can’t cancel a Screen Sharing window. Skitch saves the day.

Easier tweet authoring with LaunchBar.

Communicating well in 140 characters is one of the newer dimensions of “communication design,” and its importance was discussed at length some time ago by Rands in, “The Art of the Tweet.” Just like blog articles, I often draft tweets outside of my Twitter client, in a dedicated writing application. Since I sometimes have URLs, references and other text sitting alongside the drafted tweets, I really needed a quick and efficient way to count the characters of the tweets themselves.

Continue reading Easier tweet authoring with LaunchBar.

iTunes Killer Application — Better List Purchasing

I’ve been purchasing music from the Apple iTunes Store since it opened, and am sure that I’m single-handedly keeping them in business. Thinking about it (as a roaming mountain goat tried to climb into my car) this past weekend, it occured to me that the true value, for me, in the iTunes store is the discovery of new music, and the purchasing of blended lists of music (either iTunes Essential My Groove lists), or user-submitted playlists. I’ve discovered that I simply don’t have the time, nor the knowledge of my own music collection, to create interesting playlists. I’d much rather leverage the time and effort of those much better qualified.

But there’s a problem with the iTunes Store, that I believe represents a huge opportunity for Apple. And that is, probably with at least 80% of the playlists that I discover, I already own several of the songs in the collection, and end up not purchasing the list because I (a) don’t want to repurchase something I already own, and (b) don’t have the time to manually add the other songs to my shopping cart, and then later manually build the playlist in iTunes and add back the songs I already own.

Apple could solve this by detecting the songs I already own, and simply exclude those from the purchase (but not the list!) when I buy them from my shopping cart.

I’ve emailed Apple, and didn’t get a reply. The last time I blogged about Apple, I was contacted within days. So, let’s give it another try. 🙂

What's the world coming to?

Global Warming: You know it’s a problem. A big problem. And the kind of problem that just sort of creeps up on you. But how you fix it? Equally big problem. Who knows?

My email is sort of the same thing. I’ve spent the last hour cleaning, and my “Actionable Inbox” is down to 30 mails. My “Holding” box has 60. And my “Waiting for…” box also has 60. My Spam box has 4830 messages, accumulated over the last 30 days. (Spam Sieve report 99.5% accuracy, which means some 24 messages in there are probably good. I’m not going looking for them, though.)

So much of my time is now spent processing email. I’d hate to look at a graph of my email processing time per week, over the past five years, in fear of what that might indicate things will be like in another five years.

Maybe Donald Knuth got it right.