Re: eQmail or s/qmail
Manvendra Bhangui <[email protected]>
| Newsgroups | gmane.mail.qmail.general |
|---|---|
| Message-ID | <CAOqj+1MhVVi_JmL8f+jSHbd4Lm=jsYnvU=jHNOKV6QOKsyPbnw@mail.gmail.com> |
On 17 May 2016 at 22:00, Kai Peter <[email protected]> wrote: > On 2016-05-16 19:18, Manvendra Bhangui wrote: >> >> qmail uses hardcoded uid/gids generated during make. This makes it >> unsuitable to deploy RPM/debs. You also cannot backup the binaries and >> restore it on another machine, unless the qmail users and groups are >> exactly the same as that on the machine where the qmail binary was >> compiled. > > I don't think this is absolutely correct and could led into > missunderstandings. And package maintainers of a distro should be able to > handle these UID/GID's. qmail-1.03 Makefile has a target for auto_uids.c. This is generated by auto-uid binary by getting the uid, gid from /etc/passwd and /etc/group. The auto_uids.c has uids/gids from the source machine's /etc/passwd and /etc/group. If you transfer the binaries to a different host with qmail system users with different uids and gids, six binaries, listed below do not work. You have to use the idedit program to correct it. IMHO quite complicated for a mortal like me :) # Files are edited in the installation directory, then copied. # There are 40 arguments to idedit after the filename, # showing the positions of each byte in the following ten ints: # uida, uidd, uidl, uido, uidp, uidq, uidr, uids, gidq, gidn. # Normal little-endian positions are n n+1 n+2 ... n+39 for some n. # Normal big-endian positions are n+3 n+2 n+1 n n+7 ... n+36 for some n. setup: mkdir /var/qmail ./idedit install-big XXX ./idedit qmail-lspawn XXX ./idedit qmail-queue XXX ./idedit qmail-rspawn XXX ./idedit qmail-showctl XXX ./idedit qmail-start XXX ./install-big cp /var/qmail/boot/binm1+df /var/qmail/rc chmod 755 /var/qmail/rc echo '|fastforward -d /etc/aliases.cdb' > /var/qmail/alias/.qmail-default chmod 644 /var/qmail/alias/.qmail-default hostname | grep -q '\.' ./config-fast `hostname` -- Regards Manvendra - http://www.indimail.org