See mantis #2379 for some useful scripts that work with this. Note that I added another configuration parameter in addition to the patch to allow for legacy behavior in the absence of new configuration settings.