I want to use postfwd or similar to limit the hourly rate of messages outbound from a mailing list server on the same system. Since local messages are injected with postdrop and bypass smtp, no amount of playing with smptd restrictions rules is going to work, it seems to me. I am coming to the conclusion that all the answers on forums about this are implicitly assuming mail comes from external sources.
How does one go about rate limiting, and applying policy to outbound mail generated locally?
Do I have to write a custom after queue content filter? If so, are there examples of how to do this to incorporate the postfwd machinery?
It would appear that the answer is to use a non smptd milter. The GNU mailfromd program is suitable for the job.