Setting up SPF INBOUND

Install

slackware

slackpkg install python3
sbopkg -i python-pydns -i python-pyspf -i python-pypolicyd-spf
which policyd-spf
/usr/bin/policyd-spf -h
ls -alF /etc/python-policyd-spf/

Setup

configure the socket wrapper

#less pypolicyd-spf-2.0.2/policyd-spf.conf.commented
#cp -pi /etc/python-policyd-spf/policyd-spf.conf /etc/python-policyd-spf/policyd-spf.conf.dist
#grep -vE '^($|#)' /etc/python-policyd-spf/policyd-spf.conf.dist > /etc/python-policyd-spf/policyd-spf.conf
#vi /etc/python-policyd-spf/policyd-spf.conf

fix the error msg URL

cp -pi /usr/bin/policyd-spf /usr/bin/policyd-spf.dist
sed 's/openspf\.org/open-spf.org/g' /usr/bin/policyd-spf.dist > /usr/bin/policyd-spf
diff -bu /usr/bin/policyd-spf.dist /usr/bin/policyd-spf
chmod +x /usr/bin/policyd-spf

and finally see the Hardening Postfix guide

TODO

switch to spf-engine instead – url is obsolete and the guy does not plan to maintain it

pypolicyd_spf reference to URL openspf.net? https://answers.launchpad.net/pypolicyd-spf/+question/678947

Trash

slackware

sbopkg -i libspf2
ls -lhF /usr/include/spf2/spf.h
ldd /usr/lib64/libspf2.so

slackpkg install autoconf

cd policyd-1.0.1/
CFLAGS="-O2 -I/usr/include/spf2" LIBS="-L /usr/lib64 -lspf2" ./configure

netbsd

pkg_add libspf2
...got policyd for libspf2?

python2

slackpkg install python2
sbopkg -i python-pypolicyd-spf

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
which pip
mv /usr/bin/pip /usr/bin/pip2
pip2 install pyspf pydns

python3

python-pip python-setuptools
pip list
pip install wheel
pip install pyspf pypolicyd-spf
which policyd-spf
/usr/bin/policyd-spf -h

#wget https://launchpad.net/pypolicyd-spf/2.0/2.0.2/+download/pypolicyd-spf-2.0.2.tar.gz
#tar xzf pypolicyd-spf-2.0.2.tar.gz 
#cd pypolicyd-spf-2.0.2

Resources

Software http://www.open-spf.org/Software/

libspf2 - SPF Library - Home https://www.libspf2.org/

libspf2 - SPF Library - Download https://www.libspf2.org/download.html

Implementation of the Sender Policy Framework for SMTP authorization http://www.libspf2.org/ https://github.com/shevek/libspf2

DEPRECATED AS PATCH - SPF patch for Postfix http://www.ipnet6.org/postfix/spf/

Postfix SPF readme https://www.libspf2.org/patch/postfix-libspf2.README

Postfix http://www.en.sysadmin-cookbook.com/postfix/

Implementations http://www.open-spf.org/action_browse_id_Implementations_revision_106/

too painful with perl

SPF Postfix Server Setup using postfix-policyd-spf-perl https://wiki.mattrude.com/Sender_Policy_Framework_(SPF)#SPF_Postfix_Server_Setup_using_postfix-policyd-spf-perl

postfix-policyd-spf-perl https://launchpad.net/postfix-policyd-spf-perl/


HOME | GUIDES | BENCHMARKS | html