roehling / postsrsd

Postfix Sender Rewriting Scheme daemon
319 stars 38 forks source link

Add milter service for SRS sender rewriting #123

Closed jeredfloyd closed 1 year ago

jeredfloyd commented 2 years ago

This changeset introduces an optional milter service for SRS sender rewriting, which can run on an inet or unix socket. This makes sender rewriting a great deal more configurable as milters can be selectively run in Postfix, and so rewriting the envelope of inbound regular mail (for example) is easily avoided.

The milter is based on the template provided in the sendmail devel documentation. It only provides the SRS sender path, as processing recipient message headers is substantially more tricky and best implemented by the existing canonical(8) TCP table. (There is no problem with recipient rewriting always being attempted on mail flows.)

I'm not familiar with CMake so may have the idioms wrong, but this builds, installs, and runs successfully on Fedora 35.

jeredfloyd commented 2 years ago

Added fixes for the CI failures.

jeredfloyd commented 2 years ago

sigh this passes clang-format 13, but the action is 11 -- but I think I see the error. Will patch and try again...

jeredfloyd commented 2 years ago

I believe this should pass the clang-format CI now.

jeredfloyd commented 2 years ago

I've confirmed that this builds for EL7, EL8, and Fedora 35, 36, and rawhide; packages can be installed and tested from here: https://copr.fedorainfracloud.org/coprs/jered/postsrsd/

timkgh commented 1 year ago

@roehling any chance to land this PR?

roehling commented 1 year ago

I have started working on a PostSRSd version 2.0, which will also include milter support. It's not functional yet, but it's getting there.

timkgh commented 1 year ago

I have started working on a PostSRSd version 2.0, which will also include milter support. It's not functional yet, but it's getting there.

Great news! The natural next question is the timeframe :)

roehling commented 1 year ago

I won't make any promises, as I'm doing this in my spare time (which is not as plentiful as it used to be back in the days), but by the end of the year is not totally unrealistic. If people are willing to test-drive the new implementation in a non-production environment to find and squash bugs, I can also cut early alpha and beta releases.

timkgh commented 1 year ago

I'm sure there is interest in trying early versions.

roehling commented 1 year ago

https://github.com/roehling/postsrsd/releases/tag/2.0.0a1