Tyler Montney
2021-10-08 01:29:15 UTC
Trying to compile from source to get a more recent version of Postfix (the repo version is from 2019). My goal is to compile Postfix with TLS, LDAP (really Active Directory), and Dovecot SASL support. Here's what I've done to prep my Ubuntu 18 server:
########################################
sudo groupadd -g 32 postfix
sudo groupadd -g 33 postdrop
sudo useradd -c "Postfix Daemon User" -d /var/spool/postfix -g postfix -s /bin/false -u 32 postfix
sudo mkdir /srv/mail
sudo chown -v postfix:postfix /srv/mail
wget http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-3.6.2.tar.gz
tar xzf postfix-3.6.2.tar.gz
sudo apt-get install libdb-dev gcc m4 make libsasl2-dev openssl libssl-dev libldb-dev libldap2- dev
cd postfix-3.6.2/
make makefiles CCARGS="-I/usr/include/openssl -I/usr/include/sasl/ -DUSE_TLS -DHAS_LDAP -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DDEF_SERVER_SASL_TYPE=\"dovecot\"" AUXLIBS="-lssl -lcrypto -lldap -llber -lsasl2"
make
sudo make install
########################################
I've seen two suggestions on similar results, neither help:
1) sed -i '/<linux/i #define HAS_CLOSEFROM' src/util/sys_defs.h
2) https://www.mail-archive.com/postfix-***@postfix.org/msg92244.html
########################################
sudo groupadd -g 32 postfix
sudo groupadd -g 33 postdrop
sudo useradd -c "Postfix Daemon User" -d /var/spool/postfix -g postfix -s /bin/false -u 32 postfix
sudo mkdir /srv/mail
sudo chown -v postfix:postfix /srv/mail
wget http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-3.6.2.tar.gz
tar xzf postfix-3.6.2.tar.gz
sudo apt-get install libdb-dev gcc m4 make libsasl2-dev openssl libssl-dev libldb-dev libldap2- dev
cd postfix-3.6.2/
make makefiles CCARGS="-I/usr/include/openssl -I/usr/include/sasl/ -DUSE_TLS -DHAS_LDAP -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DDEF_SERVER_SASL_TYPE=\"dovecot\"" AUXLIBS="-lssl -lcrypto -lldap -llber -lsasl2"
make
sudo make install
########################################
I've seen two suggestions on similar results, neither help:
1) sed -i '/<linux/i #define HAS_CLOSEFROM' src/util/sys_defs.h
2) https://www.mail-archive.com/postfix-***@postfix.org/msg92244.html