XMailforum is a readonly knowledge archive now.

Registering as a new user or answering posts is not possible anymore.

Might the force be with you, to find here what you are looking for.

2019-09-20 - hschneider, Admin

Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.

XMail Forum [Powered by Invision Power Board]
Printable Version of Topic
Click here to view this topic in its original format
XMail Forum > Documentation and Knowledge Base > XMail + Courier IMAP + Squirrel mail + User2Mysql


Posted by: Mihec Nov 3 2006, 01:17 PM
For those who have problems with adding XMail users to Mysql database for IMAP login.
Install instructions :

All you have to do is change the following fields:
- HOSTNAME
- DBNAME
- DBUSER
- DBPASSWORD
- DBTABLE

That's it.

I cannot attach file so here's the link www.paknet.org/xmail2mysql.zip

Xmail is using XMCrypt algoritm to crypt passwords, but imap is using plain passwords so we need a decryptor which is built in script.
I'm not using any special characters in my passwords (like %$#"!& ...), but you can add them. (line 78)

Enjoy !

Mihec

Posted by: hschneider Nov 6 2006, 04:58 PM
Thanks for the contribution !

Posted by: NomadCF Nov 11 2006, 05:56 AM
incase you wanted to shrink your php decoder code, here the function from my xmail sync script.

CODE


function DecryptXMailPassword($EncryptedPassword) {
$EncryptedPasswordLength = strlen($EncryptedPassword);
$DecryptedPassword = '';

for($Counter=0;$Counter<$EncryptedPasswordLength;$Counter+=2) {
  $SubEncPass = substr($EncryptedPassword,$Counter,2);
  sscanf($SubEncPass,"%02x",$CharNum);
  $DecryptedCharacterNum = $CharNum^101;
  $DecryptedCharacter = sprintf("%c",$DecryptedCharacterNum);
  $DecryptedPassword .= $DecryptedCharacter;
}

return($DecryptedPassword);
}


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)