roehling / postsrsd

Postfix Sender Rewriting Scheme daemon
327 stars 39 forks source link

Move milter state creation from connect callback to envfrom #157

Closed rhansen closed 1 year ago

rhansen commented 1 year ago

If IPv6 support is not enabled in libmilter, the connect callback is not called when an IPv6 client connects. Work around the issue by moving state initialization from the connect callback to the envelope-from callback.

Note that the state is now per-message, not per-connection, so it must be cleaned up in the end-of-message callback, in the abort callback, and in any other callback that finalizes message handling (e.g., tempfail).

Fixes #156

roehling commented 1 year ago

Thanks. This is probably a better solution than my initial idea of patching IPv6 support in libmilter.