Postfix issue, code=exited, status=255

Hello,

i am setting up a mail service on my server with posrfix and dovecot.
It seems to work, but I can an odd error message. Can’t find much at all in google.

   Loaded: loaded (/etc/systemd/system/postfix.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2023-01-04 19:57:33 CET; 11min ago
  Process: 24600 ExecStop=/usr/sbin/postfix stop (code=exited, status=0/SUCCESS)
  Process: 24633 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)
  Process: 24631 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
  Process: 24628 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)
  Process: 24623 ExecStartPre=/usr/sbin/restorecon -R /var/spool/postfix/pid/master.pid (code=exited, status=255)

SELINUX=permissive

Thanks for the help.

Wolfgang

I don’t see anything odd in that message at all. All statuses are success, and the last one is restoring selinux contexts on the pid file which is also normal.

Thanks for clarifying. I was not sure because of code=exited.

Thanks again,

Wolfgang

When running it for the first time, it does this:

Because there is no /var/spool/postfix/pid/master.pid file while postfix is not running, running restorecon against the file before starting postfix.service returns a non-zero value of 255.

So it can be ignored. You will notice when you subsequently restart postfix it will not show this anymore because at this point a pid file exists.

You’ll also find this in /var/log/messages:

Jan  4 21:30:56 rocky8 restorecon[2338]: /usr/sbin/restorecon: lstat(/var/spool/postfix/pid/master.pid) failed: No such file or directory

thus backing that up, it tried to run restorecon against a PID that wasn’t yet created.