#1149978 postfix: /var/spool/postfix/etc/resolv.conf ownership causing a warning when using systemd-resolved

Package:
postfix
Source:
postfix
Description:
High-performance mail transport agent
Submitter:
Vincent Untz
Date:
2026-10-04 21:51:04 UTC
Severity:
normal
#1149978#5
Date:
2026-10-04 21:42:33 UTC
From:
To:
Dear Maintainer,

I switched to systemd-resolved recently, and noticed this warning in my logs:

postfix/postfix-script[521104]: warning: not owned by root: /var/spool/postfix/etc/resolv.conf

Indeed, the file is not owned by root:
-rw-r--r-- 1 systemd-resolve systemd-resolve 920  4 oct.  22:33 /var/spool/postfix/etc/resolv.conf

This occurs because postfix-resolvconf.service does:
ExecStart=cp -pLu /etc/resolv.conf /var/spool/postfix/etc/resolv.conf

Note the -p that preserves ownership. I guess --preserve=mode,timestamps should be used instead.

Thanks