3

I'm on CentOS 7 and as far as I understand, all that is needed for Postfix to start on reboot is to run systemctl enable postfix.service

However, that doesn't work for me. After a reboot, systemctl status postfix produces the following:

postfix.service - Postfix Mail Transport Agent Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled) Active: inactive (dead)

There are no errors recorded in the error log and Postfix starts and works just fine when I do it manually. Any ideas what I'm doing wrong?

EDIT: output from cat /etc/systemd/system/multi-user.target.wants/postfix.service

[Unit]
Description=Postfix Mail Transport Agent
After=syslog.target network.target
Conflicts=sendmail.service exim.service

[Service]
Type=forking
PIDFile=/var/spool/postfix/pid/master.pid
EnvironmentFile=-/etc/sysconfig/network
ExecStartPre=-/usr/libexec/postfix/aliasesdb
ExecStartPre=-/usr/libexec/postfix/chroot-update
ExecStart=/usr/sbin/postfix start
ExecReload=/usr/sbin/postfix reload
ExecStop=/usr/sbin/postfix stop

[Install]
WantedBy=multi-user.target
Amati
  • 171
  • 1
  • 8

1 Answers1

4

Federico, thank you very much for your help. I checked /var/log/messages and saw that on manual start, first sendmail is shut down and then postfix is started. I figured there might be some kind of sendmail/postfix conflict on restart so I did yum remove sendmail and it's all good now!

Amati
  • 171
  • 1
  • 8