How to get installed Postfix 3.4+ with SNI support on CentOS 7/8

I cannot agree more! It might cause issues, which would need some experience to fix it. We would like to point out, that we wouldn’t be able to support it. However, if you feel you want to try, go ahead and let us know how did it go. I would backed up /etc/postfix, /etc/webmin and actually complete /etc directory first.

Remember, that you could always go back to stock Postfix by swapping the packages back by using yum/dnf command.

Note: Only upcoming Virtualmin 6.10+ release will have SNI support for Postfix 3.4+.

Reasons?

I am posting this in a good faith, believing that CentOS 7 and CentOS 8 users would want SNI support in Postfix sooner than EOL (2024 and 2029).

Warning!

The following instructions, at the moment, were only tested on debug machine without deep testing. However, quick tests show that everything is going to work just fine.

How to get Postfix 3.5+ on CentOS 7 with SNI support?

  1. Install GhettoForge repos for CentOS 7 first by running the following command:
    yum --nogpg install https://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el7.noarch.rpm
  2. Enable conflicting repo, that replaces default packages from CentOS 7 by running:
    yum-config-manager --enable gf-plus
  3. Limit installable candidates to Postfix only by running:
    yum-config-manager --save --setopt=gf-plus.includepkgs=postfix*
  4. Swap default Postfix 2.x with latest Postfix 3.x by running:
    yum clean all && yum swap -- remove postfix -- install postfix3

How to get Postfix 3.5+ on CentOS 8 with SNI support?

  1. Install GhettoForge repos for CentOS 8 first by running the following command:
    dnf --nogpg install https://mirror.ghettoforge.org/distributions/gf/el/8/gf/x86_64/gf-release-8-11.gf.el8.noarch.rpm
  2. Enable conflicting repo, that replaces default packages from CentOS 8 by running:
    dnf config-manager --enable gf-plus
  3. Limit installable candidates to Postfix only by running:
    dnf config-manager --save --setopt=gf-plus.includepkgs=postfix*
  4. Swap default Postfix 2.x with latest Postfix 3.x by running:
    dnf clean all && dnf swap postfix postfix3
  5. Update lib path for new package by running:
    sed -i -e 's/\/usr\/lib64\/postfix/\/usr\/lib\/postfix/g' /etc/postfix/main.cf

After doing the steps above, check Postfix version by running:

postconf -d mail_version

image
Restart Postfix service and check on status to make sure it’s working as expected:

systemctl restart postfix && systemctl status postfix

Finally, manually edit /etc/webmin/postfix/version, if you’re running Webmin 1.953 and below.