Postfix init.d script and populate chroot in multi-instance environment [debian bug #560682]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postfix (Debian) |
Fix Released
|
Unknown
|
|||
postfix (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Binary package hint: postfix
Copy/paste from http://
I hit the pb on Ubuntu Lucid :
===== description of the problem
When running postfix daemon in chroot environment we need to assure
that the chroot dir is up-to-date (aka. etc/services lib/*, ...).
For a single instance this is done by the /etc/init.d/postfix script.
Starting with 2.6.x, Postfix supports now the multi-instance concept
(http://
instance, we have a new /var/spool/
where daemons may be run as chrooted.
The problem with the /etc/init.d/postfix script distributed by Debian
(in version 2.6.5-3) is that it does not take of the multi-instance
chroot dirs : the script only synchronizes the default instance (aka
/etc/postfix) and not all the other instances. So in a chroot
environment, with a chroot dir not synchronized we may have some
problems like "fatal: unknown service: smtp/tcp".
===== workaround
I think the init.d script need to be adjust to take care of the
multi-instance chroot dir.
Please see the attached patch
"postfix-
It does 2 things :
- iterate on each instance declared in the default one (postmulti
-l) and do the job that was done in the past
- we have to synchronize some other file like "/dev/log" and
"/lib/libresolv
tags: | added: patch |
Changed in postfix (Debian): | |
status: | Unknown → New |
Changed in postfix (Debian): | |
status: | New → Fix Released |
Please note that one more file needs to be fixed :
/etc/resolvconf /update- libc.d/ postfix
#!/bin/sh -e
# make sure we're still here...
[ -x /usr/sbin/postconf ] || exit 0
# iterate in each instance sbin/postconf -c $INSTANCE_CONF_DIR -h queue_directory )/etc/resolv. conf
for INSTANCE_CONF_DIR in `postmulti -l | tr -s " " " " | cut -d" " -f4`
do
cp /etc/resolv.conf $(/usr/
done
/etc/init.d/postfix reload >/dev/null 2>&1 || exit 0
exit 0