Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
spfd grpcso local applications can evaluate SPF through the versioned unaryspf.v1.SPFService/CheckAPI. Postfix and gRPC run as separate processes using the same executable. SPF outcomes, including fail/temperror/permerror, are returned as typed results; malformed requests, overload, and caller cancellation use gRPC status codes.The implementation includes shared identity handling, bounded evaluations and connections, caller/server deadlines, standard health RPCs, and graceful shutdown with forced closure of unfinished HTTP/2 handshakes. It also adds pinned protobuf generation with a CI drift check, a Go client example, an independent systemd unit, and a deterministic binary smoke test.
Review sequence
520f249: API contract and generated bindings.881f8de: Shared identity helpers; preserve existing CLI/Postfix behavior.dfc4068: Evaluation adapter, validation, and result mapping.74bda02: Runnable server, limits, health, and shutdown tests.fcfc8f9: Deployment, documentation, client example, and smoke test.Validation
go test ./...go test -race -count=1 -timeout=60s ./...go vet ./...,go mod verify, andgo mod tidy -diffgovulncheckv1.8.0: no vulnerabilities found.Linux systemd validation is configured in CI; it was not run on the macOS development host.
Deployment scope
The initial endpoint accepts loopback TCP or Unix sockets only and has no TLS/client authentication. Mail acceptance policy remains with the caller. Existing Postfix deployment configuration is preserved. Existing benchmark reports do not establish gRPC capacity. See
deploy/GRPC.mdandapi/spf/v1/README.mdfor usage and contract details.