Debian Bug report logs - #278530
[chroot] postfix: chroot environment does not work with libnss-mysql-bg

version graph

Package: postfix; Maintainer for postfix is Debian Postfix Team <[email protected]>; Source for postfix is src:postfix (PTS, buildd, popcon).

Reported by: Scott Merrill <[email protected]>

Date: Wed, 27 Oct 2004 15:18:02 UTC

Severity: normal

Found in version 2.1.4-5

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], LaMont Jones <[email protected]>:
Bug#278530; Package postfix. (full text, mbox, link).


Acknowledgement sent to Scott Merrill <[email protected]>:
New Bug report received and forwarded. Copy sent to LaMont Jones <[email protected]>. (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Scott Merrill <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: postfix: chroot environment does not work with libnss-mysql-bg
Date: Wed, 27 Oct 2004 11:09:42 -0400
Package: postfix
Version: 2.1.4-5
Severity: normal

libnss-mysql-bg allows for UNIX users to be stored in a MySQL database.
All system commands work with these users as expected: `getent passwd`,
etc.

Debian's postfix configuration runs in a chroot environment, by default.
According to bug #274323, this is undocumented.  It certainly
caught me by surprise, as my libnss-mysql-bg users could not receive mail 
from postfix, though postfix-mysql could properly access virtual users 
and deliver to them.

/etc/init.d/postfix prepares the chroot environment in part by copying
/etc/passwd to the chroot.  This was what caused all my libnss-mysql-bg
users to be exlcuded:
  sed 's/^\([^:]*\):[^:]*/\1:x/' /etc/passwd > etc/passwd

Would the following line work, to include /etc/passwd users _and_
libnss-mysql-users?
  getent passwd | sed 's/^\([^:]*\):[^:]*/\1:x/' > etc/passwd

Presumably this would put all system users, regardless of backend, into
the chroot etc/passwd.  I'm not sure if there are security
considerations with this approach, though.

My post to postfix-users:
http://marc.theaimsgroup.com/?l=postfix-users&m=109888197220940&w=2

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-1-686-smp
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages postfix depends on:
ii  adduser                     3.59         Add and remove users and groups
ii  debconf [debconf-2.0]       1.4.30.8     Debian configuration management sy
ii  dpkg                        1.10.23      Package maintenance system for Deb
ii  libc6                       2.3.2.ds1-18 GNU C Library: Shared libraries an
ii  libdb4.2                    4.2.52-17    Berkeley v4.2 Database Libraries [
ii  libgdbm3                    1.8.3-2      GNU dbm database routines (runtime
ii  netbase                     4.18         Basic TCP/IP networking system

-- debconf information:
  postfix/master_upgrade_warning:
  postfix/db_upgrade_warning: true
* postfix/mailname: mail.skippy.net
  postfix/dynamicmaps_upgrade_warning:
  postfix/recipient_delim: +
* postfix/main_mailer_type: Internet Site
  postfix/transport_map_warning:
* postfix/append_dot_mydomain: false
  postfix/relayhost:
  postfix/procmail: true
  postfix/bad_recipient_delimiter:
* postfix/chattr: false
* postfix/root_address: skippy
  postfix/rfc1035_violation: false
  postfix/mynetworks: 127.0.0.0/8
* postfix/destinations: skippy.net, mail.skippy.net, localhost.localdomain, localhost
  postfix/nqmgr_upgrade_warning:
  postfix/not_configured:
  postfix/mailbox_limit: 0



Changed Bug title to '[chroot] postfix: chroot environment does not work with libnss-mysql-bg' from 'postfix: chroot environment does not work with libnss-mysql-bg'. Request was from Michael Tokarev <[email protected]> to [email protected]. (Wed, 04 Dec 2024 17:42:02 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 12:50:03 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.