running a content_filter upon reinjection of a message with sendmail command
Here's what I want to do:
1. Email is received for an address I have set to forward emails, let's call it [hidden email].
2. Postfix pipes the email through a command postforward, which in turn runs the email through postsrsd, to make spf and such validate (especially when forwarding to an email address I don't host).
3. Postforward reinjects the email with sendmail, now with a return_path of <something>@srs.example.org.
4. All of this works up to this point, but what I want to do next is send emails through to a dkim signing program, to sign emails from srs.example.org so that the dkim signature validates as well.
Right now I'm trying to use dkimproxy as a content filter which is set to sign all messages from srs.example.org, but it seems that the cleanup daemon doesn't run on reinjected mails. I'm assuming there's a good reason for this, but it means that emails reinjected with postforward aren't going to processed by... just about anything as far as I can tell, so I can't get it to sign them.
I've tried several options to get cleanup to run on the reinjected mails, including simply piping emails to postforward (alias: "|/usr/bin/postforward email"), changing out email for a local alias that then maps to said email, and changing that out for a virtual alias that maps to the email as well.
Any thoughts on how this can be accomplished?