Postfix and Exim need to run on the same host, with Exim using an alternate port, but their packaged systemd units conflict. Direct edits get replaced during package updates, and the drop-ins I tried are not taking effect. What should I check?
How should I handle conflicting Postfix and Exim systemd units?
Answers
Leave the vendor unit files under /usr/lib alone. For a Postfix unit, put a drop-in in /etc/systemd/system/postfix.service.d/override.conf. Use the matching service name for Exim if that unit also needs changes, then run systemctl daemon-reload and inspect the effective unit with systemctl cat postfix.
A drop-in only changes the settings you specify, so make sure the directives actually address the conflict. If you need to replace an existing list-style setting, systemd may require clearing it before adding the replacement.
Reply to this answer
On RHEL 8, first confirm the exact unit names and where systemd loads them from. Try systemctl cat postfix and systemctl cat exim, then systemctl status for each. The drop-in directory must match the unit name exactly, including any suffix, and the file inside should end in .conf.
After editing, run systemctl daemon-reload. If the packaged unit itself declares a conflict or ordering dependency, check those directives in the output too. A service drop-in can adjust unit properties, but it will not change which port the mail software listens on; that needs to be configured in the relevant mail service.
Reply to this answer
If this is just a non-production mail relay setup, I would also check whether both daemons need to be enabled at boot. Keeping Exim on its alternate port may be enough, but confirm neither service is binding to the same address and port.
For a setup that has to stay reliable across package changes, separate environments can reduce unit and configuration overlap. That is a larger change, though, and a correctly targeted systemd drop-in is the simpler first thing to troubleshoot.
Reply to this answer
Add your answer
Answers are reviewed before publication.
3H~Tuckery:
That helps. I had the drop-in directory, but I was not checking the merged unit after reloading.