[vhffs-dev] [2158] update courier queries for the new mail database

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 2158
Author:   gradator
Date:     2012-04-26 01:43:58 +0200 (Thu, 26 Apr 2012)
Log Message:
-----------
update courier queries for the new mail database

Modified Paths:
--------------
    trunk/vhffs-doc/config/courier/authpgsqlrc

Modified: trunk/vhffs-doc/config/courier/authpgsqlrc
===================================================================
--- trunk/vhffs-doc/config/courier/authpgsqlrc	2012-04-25 20:20:15 UTC (rev 2157)
+++ trunk/vhffs-doc/config/courier/authpgsqlrc	2012-04-25 23:43:58 UTC (rev 2158)
@@ -213,7 +213,7 @@
 #			AND popbox.domain_name = '$(domain)'		\
 #			AND popbox.domain_name = domain.domain_name
 
-PGSQL_SELECT_CLAUSE	SELECT local_part||'@'||domain, password, '', 101 as uid, 103 as gid, '/data/mail/boxes/'||domain_hash||'/', mbox_name||'/Maildir', '', '', '' FROM vhffs_boxes WHERE local_part = '$(local_part)' AND domain='$(domain)' AND ( ( '$(service)' LIKE 'pop%' AND allowpop=true ) OR ( '$(service)' LIKE 'imap%' AND allowimap=true ) ) AND state=6
+PGSQL_SELECT_CLAUSE	SELECT lp.localpart||'@'||mx.domain, lp.password, '', 101, 103, '/data/mail/boxes/'||substr(mx.domain,1,1)||'/'||substr(mx.domain,2,1)||'/'||mx.domain||'/'||substr(lp.localpart,1,1)||'/'||lp.localpart, 'Maildir', '', '', '' FROM vhffs_mx mx INNER JOIN vhffs_mx_localpart lp ON lp.mx_id=lp.mx_id INNER JOIN vhffs_mx_box b ON b.localpart_id=lp.localpart_id WHERE b.state=6 AND lp.localpart='test' AND mx.domain='test.com' AND ( ('$(service)' LIKE 'pop%' AND b.allowpop=true) OR ('$(service)' LIKE 'imap%' AND b.allowimap=true) )
 
 ##NAME: PGSQL_ENUMERATE_CLAUSE:1
 #
@@ -234,6 +234,7 @@
 #			AND popbox.domain_name = '$(domain)'		\
 #			AND popbox.domain_name = domain.domain_name
 
+
 ##NAME: PGSQL_CHPASS_CLAUSE:0
 #
 # (EXPERIMENTAL)
@@ -259,4 +260,4 @@
 #			AND	domain_name='$(domain)'
 #
 
-PGSQL_CHPASS_CLAUSE	UPDATE vhffs_boxes SET password='$(newpass_crypt)' WHERE local_part='$(local_part)' AND domain_name='$(domain)'
+PGSQL_CHPASS_CLAUSE	UPDATE vhffs_mx_localpart lp SET password='$(newpass_crypt)' FROM vhffs_mx mx INNER JOIN vhffs_mx_localpart lpbis ON lpbis.mx_id=mx.mx_id INNER JOIN vhffs_mx_box b ON b.localpart_id=lpbis.localpart_id WHERE b.state=6 AND mx.mx_id=lp.mx_id AND lp.localpart='$(local_part)' AND mx.domain='$(domain)'


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/