Dynamic Signature Fix

Restoring AppleScript for Signatures

Since the initial release of Mac OS X 10.4 "Tiger," Apple's own mail client has had a bug that annoyed me to no end. Under Panther, it was possible to set the text of email signatures via AppleScript. I used this capability to build a number of scripts to add Fortune quotes, system uptime, and assorted quips about the superiority of Mac OS X in general, all dynamically rotated on a scheduled basis. Every email I sent had a new quote and an up-to-the-minute report on my system's uptime. Geeky, but then I'm easily entertained...

Unfortunately starting with Tiger, this functionality was broken. The necessary methods are still exposed in Mail's AppleScript dictionary, but they simply don't work. Calling them results in an error message in the Console log and nothing more. At the time of this writing, Apple has released five updates to Tiger and a few assorted security patches along the way. Still, the underlying bug that prevents dynamically updated signatures had not yet been fixed.

Fortunately, through the magic of mailbundle's, Apple's bug can be patched even if Apple hasn't the inclination to do so.

A Trac installation with Wiki and bug tracker for DynSigFix can be found here.



For any users of LightHead Software's MailTunes: DSF wasn't able to completely restore signature functionality for MailTunes. While I'm still looking for a solution (with the assistance of the author of MailTunes), for now the following work around should allow you to use MailTunes with DSF.

First start Mail with MailTunes disabled. Go into Preferences and create a new signature named "Dynamic Signature" (without the quotes) and drag it into each of your email accounts. Quit and restart mail, then launch MailTunes and configure it to your liking. In some very limited tests, MailTunes appears to work fine once the signature is created.

I'll update this space if there are any futher developments with DSF and MailTunes. Special thanks (yet again!) to LightHead Software for their great work on MailTunes and the help trying to figure out what DSF is failing to fix.



Version 1.0 of DynSigFix used PyObjC to inject a patch into the running Starting with version 2.0, Mail is extended using Apple's own mailbundle functionality. There's no longer any need to launch anything other than Mail. The patching process is completely automatic and happens the first time Apple's Signature class is accessed.

Starting with version 2.0, this fix should work with both Intel and PowerPC based Macs. (Note that Intel is untested; reports of success or failure would be much appreciated.)



Latest Version: 2.0 (build 29)
Download Size: 98,024 bytes
Source Code:
License: GPL Version 2


Installation of DynSigFix is pretty straight forward. Note that if you use's excellent GPGMail plugin, you've already done most of the work.

Before DynSigFix will work, mail bundles must be enabled. If you have GPGMail working, you can safely skip this step. To enable mail bundles:

In Terminal, for all versions of Tiger, enter:
defaults write EnableBundles -bool true

Next, in 10.4.0 only, enter:
defaults write BundleCompatibilityVersion 1

Or in 10.4.1+, instead enter:
defaults write BundleCompatibilityVersion 2

Grateful thanks go out to the folks at Sen:te for figuring out how to enable mail bundles and for releasing the source code to GPGMail which allowed me to bundl-ize DynSigFix. And also, many thanks for the excellent GPGMail plugin!

Once mail bundles are enabled, copy the DynSigFix.mailbundle file to your ~/Library/Mail/Bundles/ directory. You may need create the Bundles subdirectory manually.

Finally, quit and restart All should be well, and DynSigFix will log a message to the Console (/Applications/Utilities/ to acknowledge its successful loading.


Source Code

Full source code for the latest release is available.

In order to build this application you will need Apple's Developer Tools installed. This software has only been tested on Tiger since it's unneeded on Panther or earlier versions of Mac OS X.

You can build and package DynSigFix in one step by running

If you mail any improvements to DynSigFix, please do send them back to me!



This software is released under the terms of the GNU General Public License (GPL) version 2.

Vanity, thy name is Domain.

Copyright © 2022 Zachary Bedell. All rights reserved.