You are using an outdated browser which puts all net citizens at risk. As an incentive to upgrade to a current and thus much more secure product (we recommend the free Firefox browser), you won't be able to visit this site in its cute design, but in this rather boring printer-ready version only. Thank you for considering a browser update!


This blog article is out of date, check out sendmail-notifier instead.

This is a followup to the sendmail via Growl article a while ago.

growlnotify with Callback

Growl 1.3 has switched to the new GNTP (Growl Notification Transport Protocol) and it’s growlnotify companion now features limited support for “notification clicked” callbacks. Let’s see what we can do with this.

The old sendmail-via-growl script displayed messages piped to sendmail as Growl notifications. This is great for system messages from Cron which are usually short and text only. It’s not so useful for larger or HTML messages since Growl notifications are very limited when it comes to available space and styling options. Wouldn’t it be nice to just click on a Growl notification and then see a preview of the message?

Bye sendmail-via-growl, Hello sendgrowl

The new sendgrowl script does just that. Download sendgrowl, gunzip and save it as /usr/local/bin/sendgrowl, make it executable and then wire it up with sendgrowl --on. The original sendmail executables are renamed and symlinks to sendgrowl are created instead. To revert these changes, just call sendgrowl --off.

When a message hits sendmail now, it triggers a Growl notification. Click it within 10 seconds to see the entire message in a Quick Look preview window. The 10 seconds are hardcoded into growlnotify to keep it from hanging forever. However, if you miss this time frame, you can manually open the preview with sendgrowl -s {ID}. The ID is displayed in the Growl notification.

The sendgrowl script filters “X-” mail headers only, however, it’s certainly possible to chain in more sed commands to make the Growl notification more readable. Please add your improvements as comments.


You need a more comprehensive mail preview solution to develop webapps which send multipart messages? MockSMTP may be what you are looking for.

(Sven Schwyn)

(We are remaking our web presence and therefore comments are temporary disabled.)