Discussion:
user and group for vpopmail
(too old to reply)
Quinn Comendant
2014-10-10 13:15:51 UTC
Permalink
I'm migrating a qmailtoaster installed in 2006 to a new server. I've come to an issue where the vpopmail-toaster package creates user vpopmail with group vchkpw:

{***@oak2/0 bin} groups vpopmail
vpopmail : vchkpw

However, on the old server, the vpopmail user was setup with group vpopmail:

{***@oak/0 ~} groups vpopmail
vpopmail : vpopmail

This is a problem because on the new server the vpopmail group was never created, and so rsync'ed data doesn't result in having the correct group when it arrives.

Was this a design change at one point, and what was the reason for it? Recommended solution?

Also, is there an official source code repository for QMT? I tried to find the history of the vpopmail-toaster.spec to see when this change was introduced but didn't see any.

Thanks!

Quinn

---------------------------------------------------------------------
To unsubscribe, e-mail: qmailtoaster-list-***@qmailtoaster.com
For additional commands, e-mail: qmailtoaster-list-***@qmailtoaster.com
Eric Shubert
2014-10-11 15:41:43 UTC
Permalink
Post by Quinn Comendant
vpopmail : vchkpw
vpopmail : vpopmail
This is a problem because on the new server the vpopmail group was never created, and so rsync'ed data doesn't result in having the correct group when it arrives.
Was this a design change at one point, and what was the reason for it?
I'm not sure. It's been vchkpw as long as I can recall. I started using
QMT around May'06 IIRC.
Post by Quinn Comendant
Recommended solution?
I'd simply "chgrp -R /home/vpopmail/domains/* vchkpw" after the rsync.
Post by Quinn Comendant
Also, is there an official source code repository for QMT? I tried to find the history of the vpopmail-toaster.spec to see when this change was introduced but didn't see any.
Sure is. It's in the same repo as everything else. You'll see SRPMS
directories in the current/ and testing/ branches. There's also an
archive/rpms directory on some of the mirrors, which contains all rpms
back to Jan'06. If you go to http://mirrors.qmailtoaster.com/archive you
may or may not find it. It'll always be on mirror1.qmailtoaster.com,
although downloads from that site won't be the quickest.

Thanks for asking. This info should be on the wiki.
Post by Quinn Comendant
Thanks!
Quinn
---------------------------------------------------------------------
--
-Eric 'shubes'


---------------------------------------------------------------------
To unsubscribe, e-mail: qmailtoaster-list-***@qmailtoaster.com
For additional commands, e-mail: qmailtoaster-list-***@qmailtoaster.com
Dan McAllister
2014-10-12 04:04:10 UTC
Permalink
I have an easier fix for the vpopmail vs vchkpw group ids -- make them
the same number.

Unless some idiot programmer is looking at the NAME vchkpw or vpopmail,
if you make them both GID 89 (or whatever), then all the checks will
pass just fine.

Just a thought -- but it is a little after midnight here, so it may be a
little off...

Dan McAllister
IT4SOHO
Post by Eric Shubert
Post by Quinn Comendant
I'm migrating a qmailtoaster installed in 2006 to a new server. I've
come to an issue where the vpopmail-toaster package creates user
vpopmail : vchkpw
vpopmail : vpopmail
This is a problem because on the new server the vpopmail group was
never created, and so rsync'ed data doesn't result in having the
correct group when it arrives.
Was this a design change at one point, and what was the reason for it?
I'm not sure. It's been vchkpw as long as I can recall. I started
using QMT around May'06 IIRC.
Post by Quinn Comendant
Recommended solution?
I'd simply "chgrp -R /home/vpopmail/domains/* vchkpw" after the rsync.
Post by Quinn Comendant
Also, is there an official source code repository for QMT? I tried to
find the history of the vpopmail-toaster.spec to see when this change
was introduced but didn't see any.
Sure is. It's in the same repo as everything else. You'll see SRPMS
directories in the current/ and testing/ branches. There's also an
archive/rpms directory on some of the mirrors, which contains all rpms
back to Jan'06. If you go to http://mirrors.qmailtoaster.com/archive
you may or may not find it. It'll always be on
mirror1.qmailtoaster.com, although downloads from that site won't be
the quickest.
Thanks for asking. This info should be on the wiki.
Post by Quinn Comendant
Thanks!
Quinn
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: qmailtoaster-list-***@qmailtoaster.com
For additional commands, e-mail: qmailtoaster-list-***@qmailtoaster.com
Quinn Comendant
2014-10-12 06:29:51 UTC
Permalink
Hi Eric
Post by Eric Shubert
Post by Quinn Comendant
Recommended solution?
I'd simply "chgrp -R /home/vpopmail/domains/* vchkpw" after the rsync.
That's what I did. I also had to change the group IDs in `/var/qmail/users/assign` and rehash the cdb:

sudo perl -pi.bak -e 's/7919:7919/89:89/' /var/qmail/users/assign
sudo qmail-newu
Post by Eric Shubert
Sure is. It's in the same repo as everything else. You'll see SRPMS
directories in the current/ and testing/ branches. There's also an
archive/rpms directory on some of the mirrors, which contains all
rpms back to Jan'06. If you go to
http://mirrors.qmailtoaster.com/archive you may or may not find it.
On http://mirrors.qmailtoaster.com/archive, "Gateway Timeout: can't connect to remote host," but I was able to connect to mirror1.qmailtoaster.com, and found the src.rpm from Jan 2006. In there, indeed, vpopmail was also running as group vchkpw.

I don't know why then, I have two mail servers running QMT in which the vpopmail user is assigned to vpopmail group:

{***@pine/0 ~} groups vpopmail
vpopmail : vpopmail

{***@oak/0 ~} groups vpopmail
vpopmail : vpopmail

The new server is using the correct group:
{***@oak2/0 ~} groups vpopmail
vpopmail : vchkpw

It's a puzzle I don't care to solve now, since it's working well after changing the permissions as above.

Thanks guys,

Quinn

---------------------------------------------------------------------
To unsubscribe, e-mail: qmailtoaster-list-***@qmailtoaster.com
For additional commands, e-mail: qmailtoaster-list-***@qmailtoaster.com
Eric Shubert
2014-10-12 06:35:35 UTC
Permalink
Post by Quinn Comendant
Hi Eric
Post by Eric Shubert
Post by Quinn Comendant
Recommended solution?
I'd simply "chgrp -R /home/vpopmail/domains/* vchkpw" after the rsync.
sudo perl -pi.bak -e 's/7919:7919/89:89/' /var/qmail/users/assign
sudo qmail-newu
Post by Eric Shubert
Sure is. It's in the same repo as everything else. You'll see SRPMS
directories in the current/ and testing/ branches. There's also an
archive/rpms directory on some of the mirrors, which contains all
rpms back to Jan'06. If you go to
http://mirrors.qmailtoaster.com/archive you may or may not find it.
On http://mirrors.qmailtoaster.com/archive, "Gateway Timeout: can't connect to remote host," but I was able to connect to mirror1.qmailtoaster.com, and found the src.rpm from Jan 2006. In there, indeed, vpopmail was also running as group vchkpw.
vpopmail : vpopmail
vpopmail : vpopmail
vpopmail : vchkpw
It's a puzzle I don't care to solve now, since it's working well after changing the permissions as above.
Thanks guys,
Quinn
---------------------------------------------------------------------
Did you use the --numeric-ids flag on rsync? Without it, user and group
ids can get changed from one host to another, depend on what number is
assigned to which name(s).
--
-Eric 'shubes'


---------------------------------------------------------------------
To unsubscribe, e-mail: qmailtoaster-list-***@qmailtoaster.com
For additional commands, e-mail: qmailtoaster-list-***@qmailtoaster.com
Quinn Comendant
2014-10-12 12:20:56 UTC
Permalink
Post by Eric Shubert
Did you use the --numeric-ids flag on rsync? Without it, user and
group ids can get changed from one host to another, depend on what
number is assigned to which name(s).
No, because I wanted files to retain same username ownership, regardless of their ids (since the ids are different between old and new servers). Otherwise files which arrive would have an owner of "7919", which is a nonexistent user. But I've learned this could be a problem because inside the `/var/qmail/users/assign` file Maildir paths are specified with a numeric ID (but as I noted previously, I've updated that file to the new uids).

Are there any other files in QMT which use user ids rather than user names? I grep'ed /var/qmail for "7919" and `/var/qmail/users/assign` was the only file which contained this.

Quinn

---------------------------------------------------------------------
To unsubscribe, e-mail: qmailtoaster-list-***@qmailtoaster.com
For additional commands, e-mail: qmailtoaster-list-***@qmailtoaster.com
Eric Shubert
2014-10-12 14:47:24 UTC
Permalink
Post by Quinn Comendant
Post by Eric Shubert
Did you use the --numeric-ids flag on rsync? Without it, user and
group ids can get changed from one host to another, depend on what
number is assigned to which name(s).
No, because I wanted files to retain same username ownership, regardless of their ids (since the ids are different between old and new servers). Otherwise files which arrive would have an owner of "7919", which is a nonexistent user. But I've learned this could be a problem because inside the `/var/qmail/users/assign` file Maildir paths are specified with a numeric ID (but as I noted previously, I've updated that file to the new uids).
Are there any other files in QMT which use user ids rather than user names? I grep'ed /var/qmail for "7919" and `/var/qmail/users/assign` was the only file which contained this.
Quinn
---------------------------------------------------------------------
Gee, I don't rightly know. I missed the assign file off hand. I know
that qmail insists on using user and group 89 (I believe it's hard coded
in the source in some places). I think you've done a good job of finding
the places where it's configurable.

It'd be interesting to know the history behind the use of vpopmail vs
vchkpw as the name for group 89. Someone at inter7 might have some
insight about that.

Glad to hear your new rig is working though. That's the important part I
suppose.

Thanks.
--
-Eric 'shubes'


---------------------------------------------------------------------
To unsubscribe, e-mail: qmailtoaster-list-***@qmailtoaster.com
For additional commands, e-mail: qmailtoaster-list-***@qmailtoaster.com
Loading...