SRS for postfix Print

  • 0

Please note , below tutorial is for Centos that does not support Cmake

if you use a other distro please check if Cmake is installed and skip to the SRS postfix install step

This is just a tutorial how to enable SRS for email rewrite to work properly when using Dkim and other email security

first install needed files

yum install -y cmake3 unzip curl nano

Then we going fix Cmake3 so it can work as Cmake as not all programs reconise the install of Cmake3

alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
--family cmake

Lets continue the install of SRS postfix

mkdir -p /tmp/sr
cd /tmp/srs
curl -L -o master.zip https://github.com/roehling/postsrsd/archive/master.zip
unzip master.zip
cd postsrsd-master
make
make install

Edit the needed config file to get it working and to reroute the emails so it can be rewritten

nano /etc/postfix/main.cf

Add 4 new lines to the end of the file so it can start the rewrite

sender_canonical_maps = tcp:localhost:10001
sender_canonical_classes = envelope_sender
recipient_canonical_maps = tcp:localhost:10002
recipient_canonical_classes= envelope_recipient,header_recipient

Add the program as a service so it can start at boot, ignore warnings if you have them

systemctl enable postsrsd # to start it at boot
systemctl start postsrsd
systemctl restart postfix

if all done , check if it is running properly

systemctl status postsrsd

Thats all , congrats on installing SRS for email ,now your forwarded emails will pass SFP checks
Be sure to check out our MimeDefang guide to add anti abuse headers


Was dit antwoord nuttig?

« Terug