0

I've created a docker container that runs postfix in the foreground using postfix start-fg. It starts fine but is having trouble resolving hostnames, which I think is due to that /var/spool/postfix/etc is missing. This is mentioned in a comment here but without any explanation or reference.

There is a workaround described here, with a vague explanation and no sources.

Is this described in the official documentation or is it just something that people discover after hours of debugging?

1
  • Welcome to Debian. This is yet another of Debian's bizarre design decisions that you get to deal with yourself. You could base your image off another distro instead. Jun 21, 2020 at 19:44

1 Answer 1

0

So it seems that postfix will not prepare the chroot jail but it is the responsibility of the user.

Note that a chrooted daemon resolves all filenames relative to the Postfix queue directory (/var/spool/postfix). For successful use of a chroot jail, most UNIX systems require you to bring in some files or device nodes. The examples/chroot-setup directory in the source code distribution has a collection of scripts that help you set up Postfix chroot environments on different operating systems.

Debian seems to prepare the chroot environment the first time the service is started rather than during setup. I guess the question should be: Why doesn't Debian prepare the default chroot jail during postfix setup?

As suggested by Michael in a comment I switched to Alpine, which uses the postfix default configuration without chroot, and it works just fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .