Re: [vchkpw] Re: Mysql table

2007-09-23 Thread Rick Widmer

Tom Collins wrote:
I think we'll get better domain alias support if you pull column 

> `domain` out of table `Domains` and add it to the table `domain_alias`.

I agree.  This makes it easy to make sure domain names are unique.


> I'm not sure we need to have a "master" and "alias" -- the names can
> all be equal with this setup.

I think we still need it.  The 'real' domain is the one that has a file 
system behind it, and we need to know which one it is.  I suggest a 
pointer field real_domain containing the domain_name_id of the real 
domain. [Isn't there something in mailing lists that ties the list to 
the real domain, that makes renaming domains hard?]



We can save a little bit of space by storing the path to the domain 
directory in the domain table, and only the path from there down in the 
users table.  The dir field in the users table should be renamed to 
user_dir.


I think domain_alias should be renamed to domain_names.  Is there a 
better name for domains now?




You might even want to have the limits fields go into a separate

> table, with one entry in that table declared "default".  That way,
> domains with default entries can all point to that single row in the
> limits table.

How about we remove the NOT NULL constraint from each of the limit 
values, and if they are null take the value from the 'domain' 
_system.default.  This way if you leave any value NULL, the default is 
filled in from the database in a single query:



SELECT b.domain as domain,
  c.domain as real_domain,
  if( a.ip_address IS NULL, e.ip_address, a.ip_address ) as ip_address,
  if( a.max... IS NULL, e.max..., a.max... ) as max...,
  ...

FROM domain_names a
LEFT JOIN domains b USING( domain_id )
LEFT JOIN domain_names c ON c.domain_id = b.real_domain
LEFT JOIN domain_names d ON d.domain = '_system.default'
LEFT JOIN domains e ON e.domain_id = d.domain_id

WHERE a.domain = '$TargetDomain';



Rick Macdougall wrote:


I'd add a key on timestamp.   [in the relay table]


OK.

I also added a sequence field to the valias table.




Here is a pseudo-diff showing the changes:

  CREATE TABLE Domains(
domain_idbigint not null auto_increment,
real_domain  bigint,
-   domain   char(195),   //  TC
+   domain_dir   char(100),   //  RW
ip_address   char(18)NOT NULL DEFAULT '0.0.0.0',
maxpopaccounts   INT(10) NOT NULL DEFAULT -1
maxaliases   INT(10) NOT NULL DEFAULT -1,
maxforwards  INT(10) NOT NULL DEFAULT -1,
maxautorespondersINT(10) NOT NULL DEFAULT -1,
maxmailinglists  INT(10) NOT NULL DEFAULT -1,
diskquotaINT(12) NOT NULL DEFAULT 0,
maxmsgcount  INT(12) NOT NULL DEFAULT 0,
defaultquota INT(12) NOT NULL DEFAULT 0,
defaultmaxmsgcount   INT(12) NOT NULL DEFAULT 0,
disable_pop  TINYINT(1) NOT NULL DEFAULT 0,
disable_imap TINYINT(1) NOT NULL DEFAULT 0,
disable_dialup   TINYINT(1) NOT NULL DEFAULT 0,
disable_passwordchanging TINYINT(1) NOT NULL DEFAULT 0,
disable_webmail  TINYINT(1) NOT NULL DEFAULT 0,
disable_relayTINYINT(1) NOT NULL DEFAULT 0,
disable_smtp TINYINT(1) NOT NULL DEFAULT 0,
disable_spamassassin TINYINT(1) NOT NULL DEFAULT 0,
delete_spam  TINYINT(1) NOT NULL DEFAULT 0,
perm_account TINYINT(2) NOT NULL DEFAULT 0,
perm_alias   TINYINT(2) NOT NULL DEFAULT 0,
perm_forward TINYINT(2) NOT NULL DEFAULT 0,
perm_autoresponder   TINYINT(2) NOT NULL DEFAULT 0,
perm_maillistTINYINT(4) NOT NULL DEFAULT 0,
perm_quota   TINYINT(2) NOT NULL DEFAULT 0,
perm_defaultquotaTINYINT(2) NOT NULL DEFAULT 0,
cur_usersint,
level_curint,
level_maxint,
level_start0 int,
level_start1 int,
level_start2 int,
level_end0   int,
level_end1   int,
level_end2   int,
level_mod0   int,
level_mod1   int,
level_mod2   int,
level_index0 int,
level_index1 int,
level_index2 int,
the_dir  char(160),

primary key( domain_id ),
key( ip_address ),
);


- CREATE TABLE domain_alias(  // RW
+ CREATE TABLE domain_names(  // RW
-domain_alias_id bigint not null auto_increment,  //  RW
+domain_name_id  bigint not null auto_increment,  //  RW
domain_idbigint not null,
-   aliaschar(195),   //  TC
+   domain   char(195),   //  TC

-   primary key( domain_alias_id ),   //  RW
+   primary key( domain_name_id ),//  RW
foreign key( domain_id ) REFERENCES domains( dom

[vchkpw] vpopmail 5.4.23 released

2007-09-23 Thread Rick Widmer

http://vpopmail.sf.net/

5.4.23 - released 23-Sep-2007

Release Notes:

This release reverts the maildirquota warnings patch.  I
believe the correct way to fix this is to make the quota
variable a 64 bit unsigned value so we can go past the 2GB (or
is it 4GB) size limit on the current 32 bit values.  That can
be done in the 5.5 branch which will be created once we have a
good stable 5.4 release.



ChangeLog:

5.4.23 - Released 23-Sep-2007
Rick Widmer
- Upgrade build system to match my dev server  (SuSE 10.2)
- Revert maildirquota warnings change






Re: [vchkpw] vpopmail 5.4.23 released

2007-09-23 Thread Allie Daneman
So far so good...thanks for your time and effort. I have it installed and
quickly tested with Qmailadmin 1.2.11. 

On Sun, 23 Sep 2007 17:44:50 -0600, Rick Widmer <[EMAIL PROTECTED]>
wrote:
> http://vpopmail.sf.net/
> 
> 5.4.23 - released 23-Sep-2007
> 
> Release Notes:
> 
> This release reverts the maildirquota warnings patch.  I
> believe the correct way to fix this is to make the quota
> variable a 64 bit unsigned value so we can go past the 2GB (or
> is it 4GB) size limit on the current 32 bit values.  That can
> be done in the 5.5 branch which will be created once we have a
> good stable 5.4 release.
> 
> 
> 
> ChangeLog:
> 
> 5.4.23 - Released 23-Sep-2007
>   Rick Widmer
>   - Upgrade build system to match my dev server  (SuSE 10.2)
>   - Revert maildirquota warnings change