EmailRouting (move mail to queues based on domain)

Hi All,

I am using fetchmail to pop copies of our support mails from an inbox on
our mailserver, into the various support queues, based upon the domain.
To achieve this, I’m using the example at
http://wiki.bestpractical.com/view/EmailRouting

Unfortunately, this only works for mail which comes from any of the
domains that are specified, and not to (or cc) any of those domains.
My understanding is that the Transaction object contains Addresses and a
NiceHeader which could be used for this purpose.

My knowledge of the internals of RT, and of the Perl language itself is
rather limited, and thus far my attempts to modify this example scrip to
do what I want have failed.

Has anybody made a similar scrip to do this already? Or is someone more
knowledgeable than I, able to modify the example code given, in order to
check the To and Cc addresses domains as well?

Any assistance in this matter, greatly appreciated.

Regards,

David B.