OpenSMTPD filter to enforce the Sender Policy Framework.
Go >= 1.22 is required.
git clone https://netsend.nl/opensmtpd-filter-spf.git
cd opensmtpd-filter-spf
go build -o filter-spf
install -m555 -gbin filter-spf /usr/local/libexec/smtpd/
useradd -d /var/empty -s /sbin/nologin _spf
Define the filter and add it to your listen directives.
smtpd.conf:
filter "spf" proc-exec "filter-spf" user _spf group _spf
listen on egress filter { spf }
Browse the source code here or on GitHub or clone the repository:
$ git clone https://netsend.nl/opensmtpd-filter-spf.git