Package: vmm Version: 0.6.2-1 Severity: wishlist I found it useful to make the vmm mail user and domain data available to NSS. On the one hand, this allows me to directly jump to mail home directories, e.g.
cd ~foobar%example.org but it also helps Spamassassin and other tools identify the home directory. Please consider adding this information and the attached file to the package docs. Note that I replaced the '@' character with '%' for various reasons, but mostly due to the way my shell completion is set up (special handling of the '@' character). YMMV. To enable, I created the attached /etc/nss-pgsql.conf file for use by libnss-pgsql2 and added 'pgsql' after 'compat' on the passwd and group lines of /etc/nsswitch.conf. Note that you *need* to install a caching layer. I've found unscd to work quite well. If you don't do this, then there will be occasional deadlocks if using e.g. Spamassassin for local delivery. -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.4.0-1-amd64 (SMP w/8 CPU cores) Locale: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) -- .''`. martin f. krafft <madduck@d.o> @martinkrafft : :' : proud Debian developer `. `'` http://people.debian.org/~madduck `- Debian - when you have better things to do than fixing systems
connectionstring = hostaddr=127.0.0.1 dbname=mailsys user=nss password=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx connect_timeout=1 # you can use anything postgres accepts as table expression # Must return "usernames", 1 column, list getgroupmembersbygid = SELECT local_part||'%'||domainname AS name FROM users JOIN domain_name USING (gid) WHERE gid = $1 AND is_primary # Must return passwd_name, passwd_passwd, passwd_gecos, passwd_dir, passwd_shell, passwd_uid, passwd_gid getpwnam = SELECT local_part||'%'||domainname AS name, '*' AS passwd, 'vmm virtual user' AS gecos, domaindir ||'/'||uid AS homedir, '/bin/true' AS shell, uid, gid FROM users JOIN domain_data USING (gid) JOIN domain_name USING (gid) WHERE local_part = split_part($1, '%', 1) AND domainname = split_part($1, '%', 2) AND is_primary # Must return passwd_name, passwd_passwd, passwd_gecos, passwd_dir, passwd_shell, passwd_uid, passwd_gid getpwuid = SELECT local_part||'%'||domainname AS name, '*' AS passwd, 'vmm virtual user' AS gecos, domaindir ||'/'||uid AS homedir, '/bin/true' AS shell, uid, gid FROM users JOIN domain_data USING (gid) JOIN domain_name USING (gid) WHERE uid = $1 AND is_primary # All users allusers = SELECT local_part||'%'||domainname AS name, '*' AS passwd, 'vmm virtual user' AS gecos, domaindir ||'/'||uid AS homedir, '/bin/true' AS shell, uid, gid FROM users JOIN domain_data USING (gid) JOIN domain_name USING (gid) WHERE is_primary = 't' # Must return group_name, group_passwd, group_gid getgrnam = SELECT domainname, '*' AS passwd, gid, NULL AS members FROM domain_name WHERE domainname = $1 and is_primary # Must return group_name, group_passwd, group_gid getgrgid = SELECT domainname, '*' AS passwd, gid, NULL AS members FROM domain_name WHERE gid = $1 and is_primary # Must return gid. %s MUST appear first for username match in where clause groups_dyn = SELECT domainname, '*' AS passwd, n.gid, NULL AS members FROM domain_name n JOIN users u on (n.gid=u.gid) WHERE n.is_primary AND u.local_part||'%'||n.domainname = $1 and n.gid <> $2 allgroups = SELECT domainname, '*' AS passwd, gid, NULL AS members FROM domain_name WHERE is_primary
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)