stib's guff

 
« Back to blog

How to fix "unsupported" plugins after upgrading Mail.app

Screen_shot_2011-03-22_at_12
Almost every time Apple releases an update of Mail the plugins that you may have installed (like GrowlMail or Letterbox or MailFollowUp) get broken. The reason being is that in Mail's info.plist file (a little hidden file that contains some preferences for the application) there is a UUID (Universally Unique Identifier - a fancy name for a serial number) that identifies each version of Mail, and if the plugins don't have that UUID in their info.plist then Mail refuses to load them at startup.

The good news is that you can hack the info.plist for your plugins pretty easily, and without breaking things. You simply add the new UUID for Mail to the plugin. The down side is that if your plugin isn't actually compatible then the plugin might actually not work (you can solve that by uninstalling it).

Here's two ways of doing it.

The command line way (updated as of 22/3/2011 OS X 10.6.7)

…is easy, basically using defaults to grab the UUID from mail and message.framework, and write it to the plugin:

newMailUUID=$(defaults read /Applications/Mail.app/Contents/Info PluginCompatibilityUUID);
newMsgUUID=$(defaults read /System/Library/Frameworks/Message.framework/Resources/Info PluginCompatibilityUUID);
cd ~/Library/Mail/Bundles
for i in *
do defaults write "$i"/Contents/Info SupportedPluginCompatibilityUUIDs -array-add "$newMailUUID";
defaults write "$i"/Contents/Info SupportedPluginCompatibilityUUIDs -array-add "$newMsgUUID";

mv ~/Library/Mail/Bundles

done

This is making the assumption that your Mail install is a normal one with the defaults in the Library folder in your Home folder. What the script does is to add the UUIDs to all the bundles it finds in that folder.

Now if you've already fired up Mail and it has hadd a hissy fit about the plugins that are there you'll find that they have been moved to a folder called Bundles (Disabled) or Bundles (Disabled 1) etc. Just drag them back into the Bundles folder before you run that script.

Another gotcha is that the Bundles might not let you change them. If you have admin privileges you can do this to give you write permission on the info.plist files that you need to change

~/Library/Mail/Bundles
for i in *
do sudo chmod a+rw "$i"/Contents/Info.plist
done

you'll need to type your password.


the gui way

If you're a beastly coward and want to use GUI apps, here 'tis, in painful detail.

There are two UUIDs you need to add to your plugin. One for Mail.app and one for the Message.framework. The UUID for Mail.app is found inside the application itself. Right click it in the finder and choose show package contents.

Showpackagecontents


Look for info.plist in the folder that opens up:

Infoplist
Now if you have Apple's Developer tools installed you can open the plist file in the Property List Editor application (Developer tools came with your mac OS disc as an optional install, or you can download it (after signing up)). Otherwise, don't be a'feared it's just an xml file, there are plenty of XML editors out there, or you can just open it in a text editor.

In the plist editor the bit you're looking for looks like this:

Uuid-mail
if you double-click on the number (it's a hex number that's why there are As and Bs and Cs etc) on the right you can copy it to the clipboard.

In a text editor it's a bit more hard to find, but it should look like this (the text editor I'm using below is text wrangler - very recommended):

Tw
Just search for UUID, and it will be inside the tag.

For Mail 4.3 (the current version as of 17th of June 2010) the UUID is the one shown above: B842F7D0-4D81-4DDF-A672-129CA5B32D57 so you can just copy it from here).

Now we want to add that UUID to the plugin that we want to enable. In your home directory in the Library folder theres's a folder called mail, that has all your mail stuff. Inside it there should be a folder called Bundles, which is where your plugins live, and there may be one or more called Bundles (Disabled x) where mail will put any plugins it finds that it thinks are incompatible (to go straight there copy ~/Library/Mail/ switch to Finder and hit shift+apple+G, then paste).

Screenshot_2010-06-17_14-12-13

To add the new UUID for mail to these bundles you have to find their info.plist files. For some mailbundle files you can just open them like a regular folder, for others you have to do the right-click> show package contents dance. I dunno why. Once you've opened up the info.plist file find the key for SupportedPluginCompatibilityUUIDs. Here's what it looks like:

Screenshot_2010-06-17_14-15-15
if you click on any of the items a plus sign will appear at the right, allowing you to add a new key.

Screenshot_2010-06-17_14-16-52
Hit it, and paste in the UUID you copied from mail's info.plist.
In a text editor look for SupportedPluginCompatibilityUUIDs. it's not too hard.

Screenshot_2010-06-17_14-17-59
add a tag and paste in the UUID (to make sure you don't bork the tag, copy one of the existing tag, and paste over the hex number inside it).

Now we have to add the Message.framework UUID to our plugin's SupportedPluginCompatibilityUUIDs key. It's found in /System/Library/Frameworks/Message.framework/Versions/Current/Resources/ (copy this and hit shift+apple+G in finder then paste to go straight there). Do the same thing as you did with mail.app's info.plist. Find the PluginCompatibilityUUID key, copy its value and paste it into the info.plist file for your plugin, where you added the mail UUID. Currently the UUID you need is E71BD599-351A-42C5-9B63-EA5C47F7CE8E

Now you need to move the newly hacked mailbundle files out of the Bundles (Disabled) folder and into the Bundles folder, restart Mail and you're good to go.

-stib

Posted by email 

Comments (4)

Nov 10, 2010
braindump liked this post.
Mar 21, 2011
Bad Horse said...
You can also just edit the Info.plist files with vi or emacs or the text editor of your choice, as long as it writes them back as plain text. Use the "defaults read" commands to get the correct UUID's, then just copy them from a shell window and paste them into the Info.plist file right next to all the others, and wrap them in string and /string tags. Works like a charm and way easier than mucking about with defaults write commands.
May 25, 2011
Ben Dobuzz said...
Just now: after update to Growl 1.2 2 GrowlMail 1.2.3 I needed to do the UUID update Issue again ...
here's what it took me doing it for my lokal (Single User) Installation:

1.) Install GrowlMail AND DO NOT start Mail afterwards, but type in terminal ...

newMailUUID=$(defaults read /Applications/Mail.app/Contents/Info PluginCompatibilityUUID);
newMsgUUID=$(defaults read /System/Library/Frameworks/Message.framework/Resources/Info PluginCompatibilityUUID);
sudo defaults write ~/Library/Mail/Bundles/GrowlMail.mailbundle/Contents/Info SupportedPluginCompatibilityUUIDs -array-add "$newMailUUID"
sudo defaults write ~/Library/Mail/Bundles/GrowlMail.mailbundle/Contents/Info SupportedPluginCompatibilityUUIDs -array-add "$newMsgUUID"
sudo chmod a+rw ~/Library/Mail/Bundles/GrowlMail.mailbundle/Contents/Info.plist

Greetings from Kiel,

Ben

Leave a comment...