Control: retitle -1 [chroot] postfix: no warning about chroot change that may break configuration Control: tag -1 + confirmed
On Mon, 19 Dec 2022 13:31:12 +0000 Dave Love <[email protected]> wrote:
Package: postfix Version: 3.5.17-0+deb11u1 Severity: normal X-Debbugs-Cc: none, Dave Love <[email protected]> This may be too late to be useful, but: I got an auto-update of postfix last night which has broken incoming mail. A milter blacklist file which previously needed to be in the chroot directory (/var/spool/postfix) is no longer found there and needs to be moved relative to /. The changelog has: - Cleanup (problem introduced: Postfix 2.7): milter_header_checks maps are now opened before the cleanup server enters the chroot jail. but there's no installation warning about the changed behaviour.
Hi! The root cause of this and many many other issues in debian postfix is chroot-by-default. Un-chroot it and all problem goes away. But this is a different topic. Here, the problem is that you treated postfix chroot as the primary source of some information, while it should has always been the main root of the system. So the right thing to do here should've been to put this file into the main system root (into config directory?), and make a copy of it into chroot, instead of keeping some configuration within chroot entirely (only). There were a few files or maps like this, forgotten to be opened before entering chroot jail, over the years, and many has been fixed like this. Since postfix has a lot of parameters, issuing a warning about every of them seems to be too much, and it also requires quite significant effort from the package maintainer to keep the lists (which might be a bad excuse anyway). Well, maybe we can make a list of things like this and only warn about them if the parameter in question is actually used, *and* postfix is running chrooted (which is also not easy to determine, since some parameters are used by certain components but not others, and there might be copies of certain daemon instances in master.cf, etc). So it all is a bit more than just trivial. Either way, the main point is to keep config stuff in the config dir, and treat postfix chroot dir as a staging area. What psotfix can do though it to find files in chroot which aren't present in the main root fs. Thanks, /mjt

