Is there some good way to limit outbound mail in postfix? Exactly, I want to limit number of send messages by domain per some time interval.

Imaginary example:

I have email accounts in 3 different domains: tld1, tld2 and tld3. It is not relevant how many accounts in what domain.
All accounts in tld1 can send at most 20 messages per hour.
All accounts in tld2 can send at most 10 messages per hour.
All accounts in tld3 can send at most 25 messages per hour.

Does that can be done? And how?