Here comes something new again ;-) Internet.nl pushed me to do some additional adjustments to my installation to be able to run TLSv1.3 ("side effect") and disable client renegotiation, which may(!) by misused for DoS attacks against mailserver infrastructures. Therefor I was required to backport OpenSSL and Postfix from Debian 10 (which just has been released and be waiting for PMG to be updated to and with Debian 10 is not my strength^^).
So I start with a warning again! Please consider, if you like to use my adjustments in your productive installation as it may break your setup. This is no official backport. Although I tested it, it may break either your setup or your possibility to update to Debian 10 lateron. So be careful and reconsider your decisions.
So I describe below once the way on how to build your own packages and once the way on how to use my built packages.
Here the long way, if you like to do it your own way:
This way required some adjustments on source.list to include the stretch-backports packages as it was a required dependency:
/etc/apt/sources.list:
Debian introduce with OpenSSL 1.1.1 a minimum TLS version and a more strict cipher suite set, requiring me to adjust openssl.conf to still provide TLSv1 and TLSv1.1 as with my TLS setup optimization I sadly got known, that there are still big companies out there, which require that old and insecure protocols and cipher suites and a weak encryption is still better than no encryption (which is the alternative, if I don't support this weak encryption: the connection is closed and reestablished as plain connection). Once done TLSv1.3 directly got available without further action (that was really cool):
/etc/ssl/openssl.cnf (changing the last three lines to this):
Then I need to add the TLS Option for disabling (client) renegotiation to the main.cf.in template file (alternative would be to use the hex value of the TLS Option from the used OpenSSL version, but that's not recommended, as the hex values may change and result in unpredictable behaviors). This change first got active once I synced the settings and postfix got restarted by the sync script:
/etc/pmg/templates/main.cf.in (add to the TLS settings as tested and mentioned in previous posts, e.g. directly after tls_preempt_cipherlist):
Here the short way, if you would like to use my built packages:
As some readers may remember, that I recently tried to combine PMG with rspamd, which looked fine, but it wasn't the solution for me. At that time I was required to built my own Postfix backport to be able to prevent double calls of my mitered rspamd, so I already trained myself on how to build backports. I was also allowed to post this unofficial backport URL to the Debian Postfix Wiki page. I used this location to place my new backported Postfix version as well as backported OpenSSL version, so this location is public and can be used by everyone, for sure also for my commercial test installation.
Steps performed:
The adjustments to openssl.cnf and main.cf.in are absolutely the same as above.
Another new feature comes below.
So I start with a warning again! Please consider, if you like to use my adjustments in your productive installation as it may break your setup. This is no official backport. Although I tested it, it may break either your setup or your possibility to update to Debian 10 lateron. So be careful and reconsider your decisions.
So I describe below once the way on how to build your own packages and once the way on how to use my built packages.
Here the long way, if you like to do it your own way:
Code:
mkdir /backports
cd /backports
apt-get install packaging-dev debian-keyring devscripts equivs
vi /etc/apt/sources.list
apt-get update
apt-get -t stretch-backports install debhelper
dget -x http://deb.debian.org/debian/pool/main/o/openssl/openssl_1.1.1c-1.dsc
cd openssl-1.1.1c
mk-build-deps --install --remove
dch --local ~bpo9+ --distribution stretch-backports "Rebuild for stretch-backports."
fakeroot debian/rules binary
dpkg-buildpackage -us -uc
apt install ../openssl_1.1.1c-1~bpo9+1_amd64.deb ../libssl1.1_1.1.1c-1~bpo9+1_amd64.deb
vi /etc/ssl/openssl.cnf
apt-get autoremove --purge
cd /backports
apt install ../libssl-dev_1.1.1c-1~bpo9+1_amd64.deb
dget -x http://deb.debian.org/debian/pool/main/p/postfix/postfix_3.4.5-1.dsc
cd postfix-3.4.5
mk-build-deps --install --remove
dch --local ~bpo9+ --distribution stretch-backports "Rebuild for stretch-backports."
fakeroot debian/rules binary
dpkg-source --commit
dpkg-buildpackage -us -uc
apt install ../postfix_3.4.5-1~bpo9+1_amd64.deb
vi /etc/pmg/templates/main.cf.in
pmgconfig sync --restart 1
This way required some adjustments on source.list to include the stretch-backports packages as it was a required dependency:
/etc/apt/sources.list:
Code:
deb http://ftp.de.debian.org/debian stretch main contrib
deb http://ftp.de.debian.org/debian stretch-updates main contrib
# security updates
deb http://security.debian.org stretch/updates main contrib
deb http://deb.avast.com/lin/repo debian-stretch release
deb http://deb.debian.org/debian stretch-backports main
Debian introduce with OpenSSL 1.1.1 a minimum TLS version and a more strict cipher suite set, requiring me to adjust openssl.conf to still provide TLSv1 and TLSv1.1 as with my TLS setup optimization I sadly got known, that there are still big companies out there, which require that old and insecure protocols and cipher suites and a weak encryption is still better than no encryption (which is the alternative, if I don't support this weak encryption: the connection is closed and reestablished as plain connection). Once done TLSv1.3 directly got available without further action (that was really cool):
/etc/ssl/openssl.cnf (changing the last three lines to this):
Code:
[system_default_sect]
MinProtocol = None
CipherString = DEFAULT
Then I need to add the TLS Option for disabling (client) renegotiation to the main.cf.in template file (alternative would be to use the hex value of the TLS Option from the used OpenSSL version, but that's not recommended, as the hex values may change and result in unpredictable behaviors). This change first got active once I synced the settings and postfix got restarted by the sync script:
/etc/pmg/templates/main.cf.in (add to the TLS settings as tested and mentioned in previous posts, e.g. directly after tls_preempt_cipherlist):
Code:
tls_ssl_options = NO_RENEGOTIATION
Here the short way, if you would like to use my built packages:
As some readers may remember, that I recently tried to combine PMG with rspamd, which looked fine, but it wasn't the solution for me. At that time I was required to built my own Postfix backport to be able to prevent double calls of my mitered rspamd, so I already trained myself on how to build backports. I was also allowed to post this unofficial backport URL to the Debian Postfix Wiki page. I used this location to place my new backported Postfix version as well as backported OpenSSL version, so this location is public and can be used by everyone, for sure also for my commercial test installation.
Steps performed:
Code:
wget -r -l1 --no-parent -A.deb https://www.heutger.net/backports/
cd www.heutger.net/backports
apt install ./openssl_1.1.1c-1~bpo9+1_amd64.deb ./libssl1.1_1.1.1c-1~bpo9+1_amd64.deb
vi /etc/ssl/openssl.cnf
apt install ./postfix_3.4.5-1~bpo9+1_amd64.deb
vi /etc/pmg/templates/main.cf.in
pmgconfig sync --restart 1
The adjustments to openssl.cnf and main.cf.in are absolutely the same as above.
Another new feature comes below.