I wasn't aware that most e-mail servers either deliver mail locally or forward mail remotely (and PostSRSd was built with the second type in mind) but not both. However, I have a mail server that either sends from local, delivers to local, or forwards from remote to remote (a fairly regular setup to accompany a web server I believe). Only when forwarding it should be using SRS rewriting.
To avoid rewriting when delivering to local, we can use the solution in https://github.com/roehling/postsrsd/discussions/76, but is not very elegant (for one, this starts a new smtpd service, and second, I can't use a UNIX socket for this somehow, in order to restrict access)
I wasn't aware that most e-mail servers either deliver mail locally or forward mail remotely (and PostSRSd was built with the second type in mind) but not both. However, I have a mail server that either sends from local, delivers to local, or forwards from remote to remote (a fairly regular setup to accompany a web server I believe). Only when forwarding it should be using SRS rewriting.
How can I use the milter setup to make this work?