New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

How to make SPF and Forwarders to work with Postfix and Postfix upgrade

Started by Igor S., July 28, 2016, 09:37:11 AM

Previous topic - Next topic

Igor S.

Hi, this is little how-to for upgrading Postfix and make this works with the SPF  and forwarders.

It was tested with MariaDB (for MySQL should be installed mysql-devel and mysql-libs I guess):
Upgrade to latest stable 3.1.1 (at the 28.07.2016)

#make config backup#
cp -rf /etc/postfix /etc/postfix_backup
#Install dependence (will need to build) #
yum -y install MariaDB-shared MariaDB-devel cmake
# Removing unused parameter #
sed -i '/^.*smtpd_bind_address.*$/d' /etc/postfix/master.cf
# Get latest Postfix #
cd /tmp
wget http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-3.1.1.tar.gz
tar -xf  postfix-3.1.1.tar.gz
cd postfix-3.1.1

# Make makefile with mysql and install #
make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -I/usr/include/sasl -DUSE_SSL -I/usr/include/openssl/ -DUSE_CYRUS_SASL -DUSE_TLS' 'AUXLIBS_MYSQL=-L/usr/lib64/mysql/plugin -lmysqlclient -lz -lm -L/usr/lib64/sasl2/ -lsasl2 -lcrypto -L/usr/lib64/openssl/engines/ -lssl
make
sh postfix-install -non-interactive


Make forwarders  works with SPF (SRS)
cd /tmp
wget https://github.com/roehling/postsrsd/archive/master.zip
unzip master.zip
cd postsrsd-master/
make
make install
chkconfig postsrsd on

# add required params for SPF+SRS #
postconf -e "sender_canonical_maps = tcp:127.0.0.1:10001"
postconf -e "sender_canonical_classes = envelope_sender"
postconf -e "recipient_canonical_maps = tcp:127.0.0.1:10002"
postconf -e "recipient_canonical_classes = envelope_recipient"

/etc/init.d/postfix restart
/etc/init.d/postsrsd restart


If something went wrong

yum -y reinstall postfix
cp -rf /etc/postfix_backup /etc/postfix



You can ask me to solve any problem with your server for some money in pm  ;)






Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions

Get Fast Support Here
http://centos-webpanel.com/support-services