How can I limit the headphone max volume on OS X? So I hurt my ears from excessively loud music last week at work. I'm well aware of the volume down key of course, but I tend to crank it up too much throughout the day without noticing it.  

I need a limiter and it needs to be system-wide, since I listen to various other sound sources aside from iTunes. This isn't really an issue on my phone, since I can set a volume limit in the iOS settings.

Is there an equivalent built-in or third-party fix for OS X Lion?
I now got a working solution based on one of the links in Michiel's answer, but let's spell it out more clearly.

What I did was to 


Download volimiter, a faceless CLI application. 
Pair it upp with Lingon, a launchdaemon manager.
Set volimiter to launch on login with preferred setting:

volimiter .6


.6 means 60% of volume.

Works terrific!