On 05 Aug 2001 13:47:48 +0500, Roman Serbski wrote:
> Good day all
Hi
>
> I've just noticed some strangeness with Vpopmail + MySQL scheme.
> After upgrading from 4.9.8 to 4.9.10 (with --enable-hardquota=x feature)
> something was changed in MySQL's 'vpopmail' database (table 'vpopmail').
> How many fields should I have in table 'vpopmail'?
4.9.10 added the optional column pw_clear_passwd. Other than that
the table has not changed. Here is my current 4.10 table description
with the --enable-clear-passwd=y option.
mysql> describe vpopmail;
+-----------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+-------+
| pw_name | varchar(32) | | PRI | | |
| pw_domain | varchar(223) | | PRI | | |
| pw_passwd | varchar(255) | | | | |
| pw_uid | int(11) | YES | | NULL | |
| pw_gid | int(11) | YES | | NULL | |
| pw_gecos | varchar(255) | YES | | NULL | |
| pw_dir | varchar(255) | YES | | NULL | |
| pw_shell | varchar(255) | YES | | NULL | |
| pw_clear_passwd | varchar(255) | YES | | NULL | |
+-----------------+--------------+------+-----+---------+-------+
9 rows in set (0.00 sec)
With the default of --enable-clear-passwd=n the table looks like:
mysql> describe vpopmail;
+-----------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+-------+
| pw_name | varchar(32) | | PRI | | |
| pw_domain | varchar(223) | | PRI | | |
| pw_passwd | varchar(255) | | | | |
| pw_uid | int(11) | YES | | NULL | |
| pw_gid | int(11) | YES | | NULL | |
| pw_gecos | varchar(255) | YES | | NULL | |
| pw_dir | varchar(255) | YES | | NULL | |
| pw_shell | varchar(255) | YES | | NULL | |
+-----------------+--------------+------+-----+---------+-------+
8 rows in set (0.00 sec)
>
> Right now I have 8.
> pw_name, pw_domain, pw_passwd, pw_uid, pw_gid, pw_gecos, pw_dir, pw_shell
Looks good.
>
> BUT, there is quota information (NOQUOTA or 3000000) in the field
> 'pw_shell'! I'm not sure - is it OK?
Yes, it is okay.
The first versions of vpopmail used the same structure and field
names as /etc/passwd. Which simplified the code. But the fields
do not need the same information. Specifically
pw_uid, pw_gid do not need to contain the email accounts uid and gid.
That information is already stored in /var/qmail/users/assign.
So pw_uid and pw_gid are used to hold flags for various options
pw_shell is also not needed since email accounts can not log in and
get a shell. Instead we used that to hold the quota.
> Before upgrade I've used 4.9.8 with --enable-hardquota=n option, when I
> moved to 4.9.10 I added --enable-hardquota=3000000 feature.
> Everything works fine incl. quota :-), no errors - I just wondered is it
> normal that I have quota information in pw_shell field?
Yes. Something to note: the 4.9.8 version did not include the quota
checking code, hopefully to speed up processing. But the developers
found an efficent way to include the quota code. So quota processing
is always available and controlled by the pw_shell value. NOQUOTA
means no quota processing and a Number means the quota and to do
quota processing.
Ken Jones
>
> FreeBSD 4.2 STABLE
> Vpopmail 4.9.10
> MySQL 3.23.28-gamma
>
> Thank you very much.
>
> Ciao,
> Roman Serbski
> mailto:libser@[no_spam_plz]manas.kg
>