Re: PASSWD with MySQL, Postfix, VirtualDomains/Users
Jan Schneider <[email protected]>
| Newsgroups | gmane.comp.horde.sork |
|---|---|
| Message-ID | <[email protected]> |
Zitat von Gustavo Verduzco Vazquez <[email protected]>: > Hi! > > I have a custom Postfix/MySQL Virtual Domains/Users setup that I > access using Horde as the webmail client. I am trying to get this > setup to work with PASSWD but so far I am out of luck. > > I have a database called "mail" with a table called "users" where I > store the following fields: "email" and "password". My users log into > Horde with their full email address as their username and the password > is stored in the database encrypted with the ENCRYPT SQL function. > > While I was reading the information on the "backends.php.dist" file I > didn't find a way to store the password on the database using the > ENCRYPT SQL function. I even tried setting a custom query to store the > password but I got a syntax error from PHP. ( 'query_modify' => > 'UPDATE `mail`.`users` SET `password` = ENCRYPT( '%p' ) WHERE CONVERT( > `users`.`email` USING utf8 ) = `%U`' ) Sounds like this query should do what you want: 'UPDATE users SET password = ENCRYPT(\'%p\') WHERE email = \'%U\'' Jan. -- Do you need professional PHP or Horde consulting? http://horde.org/consulting/ -- Sork mailing list - Join the hunt: http://horde.org/bounties/#sork Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]