Closed rhansen closed 1 year ago
This sort of diagnostics is already provided by the postmap
tool, so I'd rather avoid the additional code complication that comes with this feature. For reference, the CI runs this code to verify that PostSRSd can communicate with Postfix:
postmap -q test@otherdomain.com socketmap:unix:/var/spool/postfix/srs:forward | tee /tmp/srs-alias.txt
postmap -q "$(cat /tmp/srs-alias.txt)" socketmap:unix:/var/spool/postfix/srs:reverse
I'm embarrassed to admit that I didn't think of that. :facepalm: Please pretend that this pull request never happened.
I found this to be useful during Postfix config testing and thought others might want it too. The approach I took isn't the cleanest; any refactoring suggestions would be appreciated (if this is something you're interested in merging).