Jump to: navigation, search

Difference between revisions of "Postfix3"

(Various changes related to archival of EL7.)
m (Fix code blocks)
 
Line 8: Line 8:
  
 
* 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 when those settings are used by postfix.  The following command is recommended to see all settings that will be changed when you update compatibility_level:
 
* 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 when those settings are used by postfix.  The following command is recommended to see all settings that will be changed when you update compatibility_level:
<code><pre>
+
 
 +
<pre>
 
         postconf | grep -F \$compatibility_level
 
         postconf | grep -F \$compatibility_level
</pre></code>
+
</pre>
  
 
...it is recommended that you run the above command after a Postfix update and if you want any of the listed settings to remain at their previous defaults then you should add them to main.cf explicitly.
 
...it is recommended that you run the above command after a Postfix update and if you want any of the listed settings to remain at their previous defaults then you should add them to main.cf explicitly.
Line 21: Line 22:
  
 
* List the currently installed postfix packages:
 
* List the currently installed postfix packages:
<code><pre>
+
 
 +
<pre>
 
         # rpm -qa postfix\*
 
         # rpm -qa postfix\*
</pre></code>
+
</pre>
  
 
* Install the gf-release package as per [[Usage]].
 
* Install the gf-release package as per [[Usage]].
  
 
* Use the dnf shell command to update your system to postfix3:
 
* Use the dnf shell command to update your system to postfix3:
<code><pre>
+
 
 +
<pre>
 
# dnf shell --enablerepo=gf-plus
 
# dnf 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></code>
+
</pre>
 +
 
 
EL has individual packages for the various dictionary types and should be replaced with the same postfix3 packages from GhettoForge as listed in the first step above.
 
EL has individual packages for the various dictionary types and should be replaced with the same postfix3 packages from GhettoForge as listed in the first step above.
<code><pre>
+
 
 +
<pre>
 
> run
 
> run
</pre></code>
+
</pre>
 +
 
 
... You will be prompted to update to postfix3 and associated sub-packages.
 
... You will be prompted to update to postfix3 and associated sub-packages.
<code><pre>
+
 
 +
<pre>
 
> quit
 
> quit
</pre></code>
+
</pre>
  
 
* Restart Postfix:
 
* Restart Postfix:
<code><pre>
+
 
 +
<pre>
 
# service postfix restart
 
# service postfix restart
</pre></code>
+
</pre>
  
 
...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.  Also see the postconf command above to list all settings affected by compatibility_level.  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.  Also see the postconf command above to list all settings affected by compatibility_level.  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.
Line 67: Line 75:
 
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:
 
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:
  
<code><pre>
+
<pre>
 
# dnf shell
 
# dnf shell
 
> remove postfix3*
 
> remove postfix3*
Line 74: Line 82:
 
> quit
 
> quit
 
# dnf reinstall postfix
 
# dnf reinstall postfix
</pre></code>
+
</pre>
  
<code><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></code>
+
</pre>
  
 
Then restart postfix and you should be done.
 
Then restart postfix and you should be done.
  
 
[[Category:Packages]]
 
[[Category:Packages]]

Latest revision as of 02:06, 2 September 2024

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 when those settings are used by postfix. The following command is recommended to see all settings that will be changed when you update compatibility_level:
        postconf | grep -F \$compatibility_level

...it is recommended that you run the above command after a Postfix update and if you want any of the listed settings to remain at their previous defaults then you should add them to main.cf explicitly.

  • 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.

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

  • List the currently installed postfix packages:
        # rpm -qa postfix\*
  • Install the gf-release package as per Usage.
  • Use the dnf shell command to update your system to postfix3:
	# dnf shell --enablerepo=gf-plus
	> remove postfix*
	> install postfix3 postfix3-ldap postfix3-mysql postfix3-pcre

EL has individual packages for the various dictionary types and should be replaced with the same postfix3 packages from GhettoForge as listed in the first step above.

	> 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. Also see the postconf command above to list all settings affected by compatibility_level. 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. Alternatively you can run the postconf command above to see all settings affected by compatibility_level at once.

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 only 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.


DNF updates

Because the postfix3 packages are in the gf-plus repository you will need to explicitly enable them to get future updates with the "dnf 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:

	# dnf shell
	> remove postfix3*
	> install postfix postfix-ldap postfix-mysql postfix-pcre
	> run
	> quit
	# dnf reinstall postfix
	# cp /etc/postfix/main.cf /etc/postfix/main.cf.postfix3
	# postconf -X compatibility_level

Then restart postfix and you should be done.