postfix installation fails on postdrop group ID

Bug #378955 reported by aahlborg
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Nexenta Operating System
Fix Released
Medium
Stas Sușcov

Bug Description

When trying to install postfix on a fresh Nexenta NCP2 RC3 system I get the following error:

Running newaliases
newaliases: fatal: file /etc/postfix/main.cf: parameter setgid_group: group postdrop has same group ID as nobody
dpkg: error processing postfix (--configure):
 subprocess post-installation script returned error exit status 75
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)

The /etc/group file includes:
nobody:*:60001:
postfix::105:
postdrop::106:

aahlborg (ahlbergm)
description: updated
Revision history for this message
anilg (anil-verve) wrote :

things went a little different for me on a fresh RC3 machine

...
Preconfiguring packages ...
Selecting previously deselected package openssl-blacklist.
(Reading database ... 28480 files and directories currently installed.)
Unpacking openssl-blacklist (from .../openssl-blacklist_0.3.3+0.4-0nexenta1.9_all.deb) ...
Selecting previously deselected package ssl-cert.
Unpacking ssl-cert (from .../ssl-cert_1.0.14-0nexenta3.2_all.deb) ...
Selecting previously deselected package postfix.
Unpacking postfix (from .../postfix_2.5.2-1nexenta3_solaris-i386.deb) ...
Adding `diversion of /usr/bin/rmail to /usr/bin/rmail.distrib by postfix'
Setting up openssl-blacklist (0.3.3+0.4-0nexenta1.9) ...
Setting up ssl-cert (1.0.14-0nexenta3.2) ...
UX: groupadd: ssl-cert name should be all lower case or numeric.

Setting up postfix (2.5.2-1nexenta3) ...
Adding group `postfix' (GID 104) ...
Done.
Adding system user `postfix' (UID 102) ...
Adding new user `postfix' (UID 102) with group `postfix' ...
Not creating home directory `/var/spool/postfix'.
Creating /etc/postfix/dynamicmaps.cf
Adding tcp map entry to /etc/postfix/dynamicmaps.cf
Adding group `postdrop' (GID 105) ...
Done.
/etc/aliases does not exist, creating it.

Postfix was not set up. Start with
  cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf
. If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed. To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

anil@nexenta-vm2:~$ echo $?
0

---

Did you install other packages before postfix? This will help with reproducing the issue.

Thanks,

Changed in nexenta:
assignee: nobody → anilg (anil-verve)
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
aahlborg (ahlbergm) wrote :

First I installed apache2 and mysql-server. Actually I copied this message from the second time I tried to install postfix, but the error (group postdrop has same group ID as nobody) was the same the first time. I'll try to start with a completely fresh install and see what happens.

Revision history for this message
aahlborg (ahlbergm) wrote :

On a fresh install running
apt-get update
apt-get install postfix

I get the following error:
...
/etc/aliases does not exist, creating it.
WARNING: /etc/aliases exists, but does not have root alias.

Postfix is now set up with a default configuration. If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed. To view Postfix configuration values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
newaliases: fatal: file /etc/postfix/main.cf: parameter setgid_group: group postdrop has same group ID as nobody
May 21 19:50:56 ahlberg postfix/sendmail[859]: fatal: file /etc/postfix/main.cf: parameter setgid_group: group postdrop has same group ID as nobody
dpkg: error processing postfix (--configure):
 subprocess post-installation script returned error exit status 75
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
anilg (anil-verve) wrote :

unable to reproduce. This is what I get on a fresh install.

anil@nexenta-vm2:~$ sudo apt-get update
[sudo] password for anil:
Get:1 http://apt.nexenta.org hardy-unstable Release.gpg [185B]
Get:2 http://apt.nexenta.org hardy-unstable Release [7103B]
Get:3 http://apt.nexenta.org hardy-unstable/main Packages [1061kB]
Get:4 http://apt.nexenta.org hardy-unstable/contrib Packages [1887kB]
Get:5 http://apt.nexenta.org hardy-unstable/non-free Packages [79.3kB]
Get:6 http://apt.nexenta.org hardy-unstable/main Sources [317kB]
Get:7 http://apt.nexenta.org hardy-unstable/contrib Sources [1225kB]
Get:8 http://apt.nexenta.org hardy-unstable/non-free Sources [52.2kB]
Fetched 4629kB in 2s (1692kB/s)
Reading package lists... Done
anil@nexenta-vm2:~$ sudo apt-get install postfix
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  openssl-blacklist ssl-cert
Suggested packages:
  mail-reader postfix-cdb postfix-ldap postfix-mysql postfix-pcre postfix-pgsql procmail resolvconf sasl2-bin
The following NEW packages will be installed:
  openssl-blacklist postfix ssl-cert
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 7499kB of archives.
After this operation, 2871kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://apt.nexenta.org hardy-unstable/main openssl-blacklist 0.3.3+0.4-0nexenta1.9 [6332kB]
Get:2 http://apt.nexenta.org hardy-unstable/main ssl-cert 1.0.14-0nexenta3.2 [12.5kB]
Get:3 http://apt.nexenta.org hardy-unstable/main postfix 2.5.2-1nexenta3 [1154kB]
Fetched 7499kB in 0s (19.7MB/s)
Preconfiguring packages ...
Selecting previously deselected package openssl-blacklist.
(Reading database ... 28480 files and directories currently installed.)
Unpacking openssl-blacklist (from .../openssl-blacklist_0.3.3+0.4-0nexenta1.9_all.deb) ...
Selecting previously deselected package ssl-cert.
Unpacking ssl-cert (from .../ssl-cert_1.0.14-0nexenta3.2_all.deb) ...
Selecting previously deselected package postfix.
Unpacking postfix (from .../postfix_2.5.2-1nexenta3_solaris-i386.deb) ...
Adding `diversion of /usr/bin/rmail to /usr/bin/rmail.distrib by postfix'
Setting up openssl-blacklist (0.3.3+0.4-0nexenta1.9) ...
Setting up ssl-cert (1.0.14-0nexenta3.2) ...
UX: groupadd: ssl-cert name should be all lower case or numeric.

Setting up postfix (2.5.2-1nexenta3) ...
Adding group `postfix' (GID 104) ...
Done.
Adding system user `postfix' (UID 102) ...
Adding new user `postfix' (UID 102) with group `postfix' ...
Not creating home directory `/var/spool/postfix'.
Creating /etc/postfix/dynamicmaps.cf
Adding tcp map entry to /etc/postfix/dynamicmaps.cf
Adding group `postdrop' (GID 105) ...
Done.
/etc/aliases does not exist, creating it.

Postfix was not set up. Start with
  cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf
. If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed. To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Revision history for this message
rk (rkasl) wrote :

... in the past version of Nexenta you had to run perl -pi -e 's/hash/dbm/g' /etc/postfix/main.cf .. or to change
the defaults of alias_database and alias_maps from hash to dbm by hand after the install was done ...

..., but that doesn't seems to be the case now since you are not getting the hash error --- I guess that was fixed in this new version of Nexenta.

---
Postfix is now set up with a default configuration. If you need to make
changes, edit
/etc/postfix/main.cf (and others) as needed. To view Postfix
configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
postalias: fatal: dict_mkmap_func: unsupported dictionary type: hash:
Is the postfix-hash package installed?
dpkg: error processing postfix (--install):
 subprocess post-installation script returned error exit status 1
Processing triggers for man-db ...
Errors were encountered while processing: postfix

Revision history for this message
aahlborg (ahlbergm) wrote :

I did some texting in VirtualBox running with virtualization under Ubuntu on a Core 2 Duo machine.

Using these installation settings (the one I used before) I got the same error as before:
Keyboard layout: Swedish
Location: Europe, Sweden
Automatic partitioning on the only harddisk
root passwd: passwd123
username: ahlberg
passwd: passwd123
Host name: ahlberg
Domain name: csbnet.se
Network: DHCP and IPv6 enabled

Booting 64-bit system
Login: ahlberg
$ su
# apt-get update
# apt-get install postfix
Configuration: Internet site
System mail name: ahlberg.csbnet.se

The error was the same as before (group postdrop has same group ID as nobody)

Trying the default installation settings:
Keyboard layout: US-English
Location: Pacific, United States, Pacific Time
Automatic partitioning on the only harddisk
root passwd: passwd123
username: john
passwd: passwd123
Host name: myhost
Domain name: mydomain
Network: DHCP enabled

Booting 64-bit system
Login: john
$ su
# apt-get update
# apt-get install postfix
Configuration: Internet site
System mail name: myhost

I now got this error message:
Running newaliases
postfixalias: fatal: dict_mkmap_func: unsupported dictionary type: hash: Is the postfix-hash package installed?
May 23 15:38:28 myhost postfix/postalias[862]: fatal: dict_mkmap_func: unsupported dictionary type: hash: Is the postfix-hash package installed?
dpkg: error processing postfix (--configure): subprocess post-installation script returned error exit status 1
Errors were encounered while processing: postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)

Disabling virtualization (and thus booting the 32-bit system) i get these errors:

For my settings (<email address hidden>):
# apt-get install postfix
Reading package list... Done
Building demendency tree...Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
  debootstrap: Depends: wget but it is not going to be installed
  devscripts: Depends: wget but it is not going to be installed or
              Depends: curl but it is not going to be installed
  dput: Depends: python (>= 2.3) but it is not going to be installed
  postfix: Depends: ssl-cert but it is not going to be installed
  python-minimal: Depends: python2.5-minimal (>= 2.5.2) but it is not going to be installed
  vim: Depends: python2.5 (>= 2.5) but it is not going to be installed
E: unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

For default settings (john$myhost.mydomain):
# apt-get install postfix
Reading package list... Done
Building demendency tree...Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
  manpages: Depends: man-db but it is not going to be installed
  postfix: Depends: ssl-cert but it is not going to be installed
  tasksel-data: Depends: tasksel but it is not going to be installed
E: unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Could you try to reproduce this?

Revision history for this message
anilg (anil-verve) wrote :

Got it to reproduce.. the difference was I was choosing "No configuration" instead of "internet site".. using that option during installation will lead to the issue you're seeing.

(Reading database ... 28509 files and directories currently installed.)
Unpacking postfix (from .../postfix_2.5.2-1nexenta3_solaris-i386.deb) ...
Leaving `diversion of /usr/bin/rmail to /usr/bin/rmail.distrib by postfix'
Setting up postfix (2.5.2-1nexenta3) ...
Adding group `postfix' (GID 104) ...
Done.
Adding system user `postfix' (UID 102) ...
Adding new user `postfix' (UID 102) with group `postfix' ...
Not creating home directory `/var/spool/postfix'.
Creating /etc/postfix/dynamicmaps.cf
Adding tcp map entry to /etc/postfix/dynamicmaps.cf
Adding group `postdrop' (GID 105) ...
Done.
setting myhostname: nexenta-vm2
setting alias maps
setting alias database
changing /etc/mailname to nexenta-vm2.com
setting myorigin
setting destinations: nexenta-vm2.com, nexenta-vm2, localhost.localdomain, localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
WARNING: /etc/aliases exists, but does not have a root alias.

Postfix is now set up with a default configuration. If you need to make
changes, edit
/etc/postfix/main.cf (and others) as needed. To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
postalias: fatal: dict_mkmap_func: unsupported dictionary type: hash: Is the postfix-hash package installed?
dpkg: error processing postfix (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)

Changed in nexenta:
status: Incomplete → Confirmed
Revision history for this message
Stas Sușcov (sushkov) wrote :

It looks like this is a problem with the way it reads the id from the files.

And even if you'll change 'postdrop' group in main.cf with whatever else it will give you the same fatal error:
---
postfix: fatal: file /etc/postfix/main.cf: parameter setgid_group: group postdrop has same group ID as nobody
---

Revision history for this message
Stas Sușcov (sushkov) wrote :

Solved one, got another 2. :)
The package has to be rebuild!!!
I'll try a rebuild but I couldn't set up a devzone on my machine cause of this bug: #309049
I'll try to build it with no devzone.

The problem comes from /bin/newaliases which is a symlink to postfix's legacy /usr/sbin/sendmail
Sendmail stucks in check_sgid_group() available in src/global/mail_params.c
But I succeeded to get over it after a manual recompilation of the binaries.
$ apt-get source postfix
$ apt-get tar xf postfix postfix_2.5.2.orig.tar.gz
$ cd postfix-2.5.2; make
$ pfexec cp bin/* /usr/sbin/
$ pfexec dpkg --configure postfix

After this you'll get another error with the hashes, which can be solved by replacing any 'hash:' word in main.cf with 'dbm:', this is because (Open)Solaris doesn't suppor hash data types (credits go here: [1]).
So the next package 'hash:'-es should be replaced with 'dbm:'.

The following problem. The /usr/libexec where postfix should reside doesn't even exist. So I believe there's a problem with one of the post-* scripts use for (pre)installation.

[1]: http://archives.neohapsis.com/archives/postfix/2000-07/0239.html

Revision history for this message
Stas Sușcov (sushkov) wrote :

Anyone please test this build and report if the problem is fixed.

This build brings postfix with the smf manifest instead of initrc script, it also should fix the problem with postdrop gid, hash: conversion and the libexec problem.

Revision history for this message
Stas Sușcov (sushkov) wrote :

I did a new build, here are the changes in src/global/mail_params.c
---
81d80
< /* int var_command_maxtime;
258d256
< int var_command_maxtime;
270d267
< char *var_scache_service;
389,396c386
< struct group *grp, grp_b;
< long int initlen = sysconf(_SC_GETGR_R_SIZE_MAX);
< size_t len;
< if (initlen == -1)
< /* Default initial length. */
< len = 1024;
< else
< len = (size_t) initlen;
---
> struct group *grp;
398,400c388
< char *grp_buf = malloc(len);
<
< if ((NULL == grp_buf) || (getgrnam_r(var_sgid_group, &grp_b, grp_buf, len, &grp) != 0))
---
> if ((grp = getgrnam(var_sgid_group)) == 0)
419d406
<
---

I dput'ed the packages into nexenta repo, can you please review those?

Packages can also be tested from here:
http://kyle.utcluj.ro/postfix/

Revision history for this message
Tim Spriggs (tim-tajinc) wrote :

I tested the package from a fresh devzone and the patch fixes this issue.

Changed in nexenta:
assignee: anilg (anil-verve) → Stas Sușcov (sushkov)
status: Confirmed → Fix Released
Revision history for this message
Stas Sușcov (sushkov) wrote :

Committed another build. The latest fixes chroot (/var/spool/postfix) problems.
---
postfix_2.5.2-1nexenta5_solaris-i386.deb
---

Bug should be finally closed with this commit. :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.