Discussion:
Bug#1094571: postfix: installs rsyslogd snippet that points to a directory that does not exist
Add Reply
Andreas Hasenack
2025-01-28 20:40:02 UTC
Reply
Permalink
Package: postfix
Version: 3.9.1-10+b1
Severity: normal

Dear Maintainer,

I noticed that when you have rsyslogd installed and then install
postfix, the postfix package includes this file:

$ cat /etc/rsyslog.d/postfix.conf
# Create an additional socket in postfix's chroot in order not to break
# mail logging when rsyslog is restarted. If the directory is missing,
# rsyslog will silently skip creating the socket.
$AddUnixListenSocket /var/spool/postfix/dev/log

This leads to rsyslogd throwing this error in the logs:
2025-01-28T20:26:13.670487+00:00 sid rsyslogd: cannot create
'/var/spool/postfix/dev/log': No such file or directory [v8.2412.0 try
https://www.rsyslog.com/e/2176 ]

And indeed, /var/spool/postfix does not contain a dev/ directory:
$ l /var/spool/postfix/dev* -d
ls: cannot access '/var/spool/postfix/dev*': No such file or directory

If that directory is created manually, then the "log" socket is
created by rsyslogd according to that config snippet.
Andreas Hasenack
2025-01-28 21:30:01 UTC
Reply
Permalink
I did a kind of bisect, because just looking at diffs I couldn't spot
when the /var/spool/postfix/dev directory stopped being created.

What I found is:
3.9.1-4: creates /var/spool/postfix/dev
3.9.1-5: does NOT create /var/spool/postfix/dev, leading to the
rsyslogd error about not being able to create the log socket in that
dir.

The debian/configure-instance.in diff shows this cp command now commented:
+## ldaps needs this. debian bug 572841 (Mar-2010)
+# let's omit this for now (in Dec-2024) for new installs and see what happens
+# Having device nodes in /var causes numerous issues
+# If anything, it can be bind-mounted from actual /dev,
+# or better yet, just use proxy: map types.
+# Might as well remove existing dev/*random from old chroot
+#cp -a -n --parents /dev/random /dev/urandom . 2>/dev/null || :

Maybe that was the only thing still in dev (the random devices), and
now nothing else creates the dev directory.
Andreas Hasenack
2025-01-29 14:50:02 UTC
Reply
Permalink
I think as long as the chroot structure is still being created in
/var/spool/postfix, it makes sense to re-create the dev subdirectory.
Loading...