Re: [vchkpw] Help with java using vpopmail database
using simple POP, IMAP or SMTP session commands. for example, telnet myserv.ee 110 user [EMAIL PROTECTED] OK pass mypass OK Luciano Bolonheis wrote: Hi, i installed vpopmail on a server and now other person wants to authenticate a software he is developing in the vpopmail database. He is coding in Java. Can anyone tell me how can he do it ? The function to use, or the method used by vpopmail... Thanks a lot in advance... Luciano Bolonheis -- С уважением, Дмитрий Солдатов (Dvorkin) !DSPAM:4762462032001443814050!
Re: [vchkpw] Help with java using vpopmail database
On 13 Dec 07, Rick Widmer wrote: Luciano Bolonheis wrote: Hi, i installed vpopmail on a server and now other person wants to authenticate a software he is developing in the vpopmail database. He is coding in Java. Can anyone tell me how can he do it ? The function to use, or the method used by vpopmail... It depends on which back end you are using. If it is a sql database like mysql or posgresql use Java to connect to the database. If you are using the cdb back end use Class Cdb: http://www.strangegizmo.com/products/sg-cdb/doc/com/strangegizmo/cdb/Cdb.html In general idea is to just access the database directly and check the password either in the query, or looking at the returned data. I would prefer to use password checking from vpopmail like you do with qmail if it is possible: /var/qmail/bin/qmail-smtpd /var/vpopmail/bin/vchkpw /bin/true So you software will not depend on the backend you are using or any other changes. Best, Hartmut !DSPAM:47625cd432007811420334!
Re: [vchkpw] Help with java using vpopmail database
Hi Rick... its mysql, but after java connected to the database, how do i compare the passwords ? Thanks again :) Luciano On Dec 13, 2007 9:34 PM, Rick Widmer [EMAIL PROTECTED] wrote: Luciano Bolonheis wrote: Hi, i installed vpopmail on a server and now other person wants to authenticate a software he is developing in the vpopmail database. He is coding in Java. Can anyone tell me how can he do it ? The function to use, or the method used by vpopmail... It depends on which back end you are using. If it is a sql database like mysql or posgresql use Java to connect to the database. If you are using the cdb back end use Class Cdb: http://www.strangegizmo.com/products/sg-cdb/doc/com/strangegizmo/cdb/Cdb.html In general idea is to just access the database directly and check the password either in the query, or looking at the returned data. !DSPAM:47626d5d32001503715948!
Re: [vchkpw] Help with java using vpopmail database
Luciano Bolonheis wrote: Hi Rick... its mysql, but after java connected to the database, how do i compare the passwords ? It depends on the ./configure options you used when building vpopmail. If you have clear text passwords enabled, just look at them. If not then --enable-md5-passwords controls the format of the password. If set, I believe md5( clear_password ) will give you a value you can compare against, if not then crypt( clear_password ) should do the trick. Since I don't use --enable-md5-passwords to insure compatibility between my email passwords and my system passwords I would use something like this (PHP code). $Tablename depends on the --disable-many-domains option. One way all domains are stored in a single table - 'users'. The other way each domain has its own table, named after the domain. (I prefer the first, and hope to remove the option from vpopmail some day.) $Encrypted = crypt( $ClearPassword ); $Query = SELECT pw_name, pw_domain, pw_... FROM $TableName WHERE pw_name = '$UserName' AND pw_passwd = '$Encrypted' ; If this query is successful, the password is valid. !DSPAM:4762e73232001542014209!
[vchkpw] Help with java using vpopmail database
Hi, i installed vpopmail on a server and now other person wants to authenticate a software he is developing in the vpopmail database. He is coding in Java. Can anyone tell me how can he do it ? The function to use, or the method used by vpopmail... Thanks a lot in advance... Luciano Bolonheis !DSPAM:4761b59132001010581532!
Re: [vchkpw] Help with java using vpopmail database
Luciano Bolonheis wrote: Hi, i installed vpopmail on a server and now other person wants to authenticate a software he is developing in the vpopmail database. He is coding in Java. Can anyone tell me how can he do it ? The function to use, or the method used by vpopmail... It depends on which back end you are using. If it is a sql database like mysql or posgresql use Java to connect to the database. If you are using the cdb back end use Class Cdb: http://www.strangegizmo.com/products/sg-cdb/doc/com/strangegizmo/cdb/Cdb.html In general idea is to just access the database directly and check the password either in the query, or looking at the returned data. !DSPAM:4761c1a032001789512856!