roehling / postsrsd

Postfix Sender Rewriting Scheme daemon
324 stars 39 forks source link

New -f and -r diagnostic options (forward/reverse an address) #158

Closed rhansen closed 1 year ago

rhansen commented 1 year ago

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).

roehling commented 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
rhansen commented 1 year ago

I'm embarrassed to admit that I didn't think of that. :facepalm: Please pretend that this pull request never happened.