Rpolicyd is a project mainly written in Ruby, it's free.
Postfix delegation policy written in ruby
This was my first ruby code, you will find a lot of "strange things"