Author Topic: How to make SPF and Forwarders to work with Postfix and Postfix upgrade  (Read 6403 times)

0 Members and 1 Guest are viewing this topic.

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#
Code: [Select]
cp -rf /etc/postfix /etc/postfix_backup#Install dependence (will need to build) #
Code: [Select]
yum -y install MariaDB-shared MariaDB-devel cmake # Removing unused parameter #
Code: [Select]
sed -i '/^.*smtpd_bind_address.*$/d' /etc/postfix/ Get latest Postfix #
Code: [Select]
cd /tmp
tar -xf  postfix-3.1.1.tar.gz
cd postfix-3.1.1
# Make makefile with mysql and install #
Code: [Select]
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
sh postfix-install -non-interactive

Make forwarders  works with SPF (SRS)
Code: [Select]
cd /tmp
cd postsrsd-master/
make install
chkconfig postsrsd on
# add required params for SPF+SRS #
Code: [Select]
postconf -e "sender_canonical_maps = tcp:"
postconf -e "sender_canonical_classes = envelope_sender"
postconf -e "recipient_canonical_maps = tcp:"
postconf -e "recipient_canonical_classes = envelope_recipient"

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

If something went wrong

Code: [Select]
yum -y reinstall postfix
cp -rf /etc/postfix_backup /etc/postfix
« Last Edit: August 03, 2016, 07:43:13 AM by Igor S. »
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
Join our Development Team and get paid !

Installation Instructions
Get Fast Support Here