Jump to: navigation, search

Difference between revisions of "Postfix3"

(Add instructions for switching back to stock postfix)
(Update for EL8 and 9, various minor fixes.)
 
(7 intermediate revisions by one user not shown)
Line 1: Line 1:
 
== Package Information - postfix3 ==
 
== Package Information - postfix3 ==
  
Postfix3 replaces the EL stock postfix packages and will always contain the latest version of postfix available.  These packages are backwards compatible with the EL stock postfix packages with the following caveats:
+
----
  
* Postfix 2.6 (EL 6) does not support the smtpd_relay_restrictions setting which was introduced in Postfix 2.10.  The default for this setting is not backwards compatible, it should be set to nothing (blank) or "permit" for full backwards compatibility.
+
===General Information when upgrading from the stock postfix package===
  
* Older versions of Postfix do not support SMTPUTF8 and EL6 versions of postfix3 from GhettoForge are compiled without SMTPUTF8 support due to lack of library support in EL6Postfix 3.0 introduced the smtputf8_enable setting which defaults to "yes" which causes postfix to issue a warning about the lack of compiled in support in EL6.  To get rid of the warning you should explicitly set smtputf8_enable to "no".
+
Postfix3 replaces the EL stock postfix packages and will always contain the latest version of postfix availableThese packages are backwards compatible with the EL stock postfix packages with the following caveats:
  
 
* Postfix 3.0 introduced the compatibility_level setting which permits backwards compatibility while allowing defaults to change in future versions of postfix as needed.  When you upgrade from older versions postfix will maintain many backwards compatible defaults until you update the compatibility_level setting to tell Postfix that you want the newer defaults.  Postfix will, however, issue warnings about compatibility_level not being set and also tell you which settings you should change before updating the compatibility_level setting.
 
* Postfix 3.0 introduced the compatibility_level setting which permits backwards compatibility while allowing defaults to change in future versions of postfix as needed.  When you upgrade from older versions postfix will maintain many backwards compatible defaults until you update the compatibility_level setting to tell Postfix that you want the newer defaults.  Postfix will, however, issue warnings about compatibility_level not being set and also tell you which settings you should change before updating the compatibility_level setting.
  
* Postfix 3.0 introduced dynamic map support.  With this we have moved support for many table types to individual packages.  You will need to install the individual packages for each table type you want support for.  To support the same table types as in the stock postfix packages you should install the following packages: postfix3 postfix3-ldap postfix3-mysql postfix3-pcre
+
* Postfix 3.0 introduced dynamic map support.  With this we have moved support for many table types to individual packages.  You will need to install the individual packages for each table type you want support for.  To support the same table types as in the EL7 stock postfix packages you should install the following packages: postfix3 postfix3-ldap postfix3-mysql postfix3-pcre
 +
 
 +
* Postfix 3.6.0 now requires openssl 1.1.1 or higher.  As a result the EL7 postfix3 package now requires openssl11-libs from the EPEL repository.  Since EPEL is already required to be enabled for use of GhettoForge this should not be an issue, and the required dependency should be pulled in automatically on update.
  
 
----
 
----
Line 20: Line 22:
 
<pre>
 
<pre>
 
# yum shell --enablerepo=gf-plus
 
# yum shell --enablerepo=gf-plus
> remove postfix
+
> remove postfix*
 
> install postfix3 postfix3-ldap postfix3-mysql postfix3-pcre
 
> install postfix3 postfix3-ldap postfix3-mysql postfix3-pcre
 
</pre>
 
</pre>
(note that the stock postfix from EL has compiled-in support for ldap, mysql and pcre table types, but you may not need to support all these table types.  If you don't feel free to leave them out of the install command above)
+
(note that the stock postfix from EL7 has compiled-in support for ldap, mysql and pcre table types, but you may not need to support all these table types.  If you don't feel free to leave them out of the install command above.  EL8 and 9 have individual packages for the various dictionary types and should be replaced with the same postfix3 packages from GhettoForge)
 
<pre>
 
<pre>
 
> run
 
> run
Line 30: Line 32:
 
<pre>
 
<pre>
 
> quit
 
> quit
</pre>
 
 
* EL6 only: Fix non-backwards-compatible settings:
 
<pre>
 
# postconf smtpd_relay_restrictions=permit smtputf8_enable=no
 
 
</pre>
 
</pre>
  
Line 44: Line 41:
 
...At this point you should have a look in /var/log/maillog.  You will see warnings about compatibility_level and various settings that you should change before changing compatibility_level, but other than that Postfix should start up and run and be fully backwards compatible with the stock version you were running before.  You can now explicitly set the various settings that Postfix complains about to remove the warnings for them.  Do not update the compatibility_level setting until all other settings are fixed and Postfix no longer complains about any of them except for compatibility_level itself.
 
...At this point you should have a look in /var/log/maillog.  You will see warnings about compatibility_level and various settings that you should change before changing compatibility_level, but other than that Postfix should start up and run and be fully backwards compatible with the stock version you were running before.  You can now explicitly set the various settings that Postfix complains about to remove the warnings for them.  Do not update the compatibility_level setting until all other settings are fixed and Postfix no longer complains about any of them except for compatibility_level itself.
  
If you have problems or need further assistance feel free to join #ghettoforge or #postfix on the FreeNode IRC network for assistance.
+
Note that Postfix will not complain about compatibility settings until that setting is used, so for that reason it is recommended to run postfix under the old compatibility_level setting for a period of time (minutes, hours or days depending on your email traffic) to see what else Postfix might complain about in the logs before you update the compatibility_level setting.
 +
 
 +
Note that there is a new setting, "known_tcp_ports" in Postfix 3.6.0.  The default changes the Postfix behavior to ignore certain service to port mappings from the /etc/services file.  Normally this would not be an issue, but if you have custom ports set for any of these services in /etc/services then you should edit this setting accordingly, or explicitly set it empty to revert Postfix to the old behavior of checking /etc/services.
 +
 
 +
If you have problems or need further assistance feel free to join #ghettoforge or #postfix on the Libera IRC network for assistance.
 +
 
 +
----
 +
 
 +
===Yum updates===
 +
 
 +
Because the postfix3 packages are in the gf-plus repository you will need to explicitly enable them to get future updates with the "yum update" command.  See [[Usage]] for details.
 +
 
 +
----
  
 
===Switching back to the stock postfix===
 
===Switching back to the stock postfix===
Line 52: Line 61:
 
<pre>
 
<pre>
 
# yum shell
 
# yum shell
> remove postfix3\*
+
> remove postfix3*
> install postfix
+
> install postfix postfix-ldap postfix-mysql postfix-pcre
 
> run
 
> run
 
> quit
 
> quit
Line 59: Line 68:
 
</pre>
 
</pre>
  
You should backup your main.cf file and then remove the compatibility_level setting to avoid warnings in the logs from an unrecognised setting:
+
EL7 only: You should backup your main.cf file and then remove the compatibility_level setting to avoid warnings in the logs from an unrecognized setting:
  
 
<pre>
 
<pre>
 
# cp /etc/postfix/main.cf /etc/postfix/main.cf.postfix3
 
# cp /etc/postfix/main.cf /etc/postfix/main.cf.postfix3
 
# postconf -X compatibility_level
 
# postconf -X compatibility_level
</pre>
 
 
EL6 only: you should also remove the smtputf8_enable and smtpd_relay_restrictions settings:
 
 
<pre>
 
# postconf -X smtputf8_enable smtpd_relay_restrictions
 
 
</pre>
 
</pre>
  

Latest revision as of 06:12, 5 August 2022

Contents

Package Information - postfix3


General Information when upgrading from the stock postfix package

Postfix3 replaces the EL stock postfix packages and will always contain the latest version of postfix available. These packages are backwards compatible with the EL stock postfix packages with the following caveats:

  • Postfix 3.0 introduced the compatibility_level setting which permits backwards compatibility while allowing defaults to change in future versions of postfix as needed. When you upgrade from older versions postfix will maintain many backwards compatible defaults until you update the compatibility_level setting to tell Postfix that you want the newer defaults. Postfix will, however, issue warnings about compatibility_level not being set and also tell you which settings you should change before updating the compatibility_level setting.
  • Postfix 3.0 introduced dynamic map support. With this we have moved support for many table types to individual packages. You will need to install the individual packages for each table type you want support for. To support the same table types as in the EL7 stock postfix packages you should install the following packages: postfix3 postfix3-ldap postfix3-mysql postfix3-pcre
  • Postfix 3.6.0 now requires openssl 1.1.1 or higher. As a result the EL7 postfix3 package now requires openssl11-libs from the EPEL repository. Since EPEL is already required to be enabled for use of GhettoForge this should not be an issue, and the required dependency should be pulled in automatically on update.

Instructions for replacing the EL stock postfix packages with the postfix3 packages in GhettoForge

  • Install the gf-release package as per Usage.
  • Use the yum shell command to update your system to postfix3:
	# yum shell --enablerepo=gf-plus
	> remove postfix*
	> install postfix3 postfix3-ldap postfix3-mysql postfix3-pcre

(note that the stock postfix from EL7 has compiled-in support for ldap, mysql and pcre table types, but you may not need to support all these table types. If you don't feel free to leave them out of the install command above. EL8 and 9 have individual packages for the various dictionary types and should be replaced with the same postfix3 packages from GhettoForge)

	> run

... You will be prompted to update to postfix3 and associated sub-packages.

	> quit
  • Restart Postfix:
	# service postfix restart

...At this point you should have a look in /var/log/maillog. You will see warnings about compatibility_level and various settings that you should change before changing compatibility_level, but other than that Postfix should start up and run and be fully backwards compatible with the stock version you were running before. You can now explicitly set the various settings that Postfix complains about to remove the warnings for them. Do not update the compatibility_level setting until all other settings are fixed and Postfix no longer complains about any of them except for compatibility_level itself.

Note that Postfix will not complain about compatibility settings until that setting is used, so for that reason it is recommended to run postfix under the old compatibility_level setting for a period of time (minutes, hours or days depending on your email traffic) to see what else Postfix might complain about in the logs before you update the compatibility_level setting.

Note that there is a new setting, "known_tcp_ports" in Postfix 3.6.0. The default changes the Postfix behavior to ignore certain service to port mappings from the /etc/services file. Normally this would not be an issue, but if you have custom ports set for any of these services in /etc/services then you should edit this setting accordingly, or explicitly set it empty to revert Postfix to the old behavior of checking /etc/services.

If you have problems or need further assistance feel free to join #ghettoforge or #postfix on the Libera IRC network for assistance.


Yum updates

Because the postfix3 packages are in the gf-plus repository you will need to explicitly enable them to get future updates with the "yum update" command. See Usage for details.


Switching back to the stock postfix

Switching back to the stock postfix consists largely of doing the reverse steps from the above. There is one caveat in that the stock postfix packages have a bug where they will attempt to create the alternatives links before the postfix3 package removes them. The easiest way to fix this is to reinstall the stock postfix a second time after it has been installed and it should create the links then:

	# yum shell
	> remove postfix3*
	> install postfix postfix-ldap postfix-mysql postfix-pcre
	> run
	> quit
	# yum reinstall postfix

EL7 only: You should backup your main.cf file and then remove the compatibility_level setting to avoid warnings in the logs from an unrecognized setting:

	# cp /etc/postfix/main.cf /etc/postfix/main.cf.postfix3
	# postconf -X compatibility_level

Then restart postfix and you should be done.