A real random fortune signature for Mail.app

May 25, '04 09:55:00AM

Contributed by: taxi

Okay, I've read all of the hints about random signatures in Mail.app (like this one), and wasn't happy with any of them. What I want is something that generates new signatures every so often (preferably every time a new message is created, but every minute or five will do, if it doesn't chew too much CPU). So, I came up with the following AppleScript:

set fortune to do shell script "/path/to/fortune"
tell application "Mail"
  set content of signatures to "-- 
Real Name <email@domain.net>

" & fortune
end tell
This can be run from the Scripts menu (Save to ~/Library/Scripts/Mail), or saved as an application and run from the Finder, or put it in your crontab (Get Cronnix!). This works if you only have one signature -- someone else may care to improve it for multiple signatures. Maybe even create a fortune'd signature for every account, with the name and address grabbed from the account. Now that might be cool.

[robg adds: As noted in the linked hint, you'll have to install fortune yourself.]

Comments (19)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20040523090605560