[Wiki] changed: SQLAuthHowTo

Wiki Guest <[email protected]>
Newsgroups gmane.comp.horde.cvs
Message-ID <[email protected]>
guest [128.83.155.230]  Tue, 16 Sep 2008 17:09:40 -0400

Modified page: http://wiki.horde.org/SQLAuthHowTo
New Revision:  1.8
Change log:  Small fixes, additions

@@ -28,11 +28,14 @@
  * Set the encryption to use to store the password in the table to  
crypt-md5 (is this correct?)
  * Set the database field to the one defined when you configured  
dovecot's SQL database (in this case, we will use "users" like on the  
dovecot website)
  * For query_auth, enter: {{SELECT * FROM users WHERE userid = \L AND  
password = MD5(\P);}}
  * For query_add, enter: {{INSERT INTO users (domain,userid,password)  
VALUES ('example.org', \L, MD5(\P));}} NB: Change the domain to your  
domain in the above query.
-* For query_update, enter: {{UPDATE users SET password = MD5(\P)  
WHERE userid = TRIM('@example.org' FROM \L) LIMIT 1;}} NB: Change the  
domain to your domain in the above query.
+* For query_getpw, enter: {{SELECT password FROM users WHERE userid = \L;}}
+* For query_update, enter: {{UPDATE users SET userid = \L WHERE  
userid = TRIM('@example.org' FROM \O) LIMIT 1;}} NB: Change the domain  
to your domain in the above query.
+* For query_resetpassword, enter: {{UPDATE users SET password =  
MD5(\P) WHERE userid = TRIM('@example.org' FROM \L) LIMIT 1;}}
+NB: Change the domain to your domain in the above query.
  * For query_remove, enter: {{DELETE FROM users WHERE userid =  
TRIM('@example.org' FROM \L) LIMIT 1;}}
  * For query_list, enter: {{SELECT * FROM users;}}
-* and so on for the other queries...
+* For query_exists, enter: {{SELECT 1 FROM users WHERE userid = \L;}}

  If you need to use multiple virtual domains, you might see the web  
page  
http://wiki.vpslink.com/HOWTO:_ISP-style_Email_Server_with_Debian-Etch_and_Postfix_2.3 which could provide much inspiration for the sql database  
setup.


--
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.