Hello, I do believe the way you wrote your request is not possible to achieve. I believe you can not change internal Postifx logging system this way.
What you can do is modify Rspamd, make yourself lua script to parse header and use logger to write what you need into logs. After this you can analyze logs and connect internal Postifx message-id and your uuid provided by rspamd.
And for not breaking MC, make for yourself fork, track your changes in specific branche and before update always rebase and validate your changes.
On second thought, when you submit message into Postfix from your app, Postfix should reply to you something like “recieved for delivery message-id” so you should be able to save Postfix ID in your app and that’s all you need right?