View Full Version : Email bug in ver. 1.6 RC5
kingbob
07-03-2009, 11:03 AM
Like a few others, I was not getting email fetch like a few other people. It turns out to be a typo in include/class.mailfetch.php, line 314.
EMAIL__TABLE should read EMAI_TABLE (single underscore).
BoB
peter
07-03-2009, 11:12 AM
That won't cause fetch failure just a db error...it is a query after failure.
kingbob
07-03-2009, 11:55 AM
There's a serious bug in email configuration. In include/class.mailfetch.php line 58.
$this->mbox =@imap_open($this->serverstr,$this->username,Misc::decrypt($this->pass
word,SECRET_SALT));
The decryption is necessary because the passwords are store in encrypted form in the database.
However, when configuring the email and testing the provided configuration, the passwords are passed in non-encypted form. So email configuration fails.
I cannot find the place where configuration is tested. So My stupid solution is to remove teh Misc::decrypt function when configuring email servers and put it back after configuration. This seems to work ok for me.
peter
07-03-2009, 11:58 AM
As I noted in the other thread I'm working on a patch. Will post it shortly. I was just objecting to the SSL error claim.
kingbob
07-03-2009, 12:05 PM
Peter,
you're right about my first message. But this sends a lot annoying email to the admin account.
My 2nd message shows a real serious issue for all users. I got by with a simple silly edit. It's better fixed properly.
Thanks
BoB
peter
07-03-2009, 12:14 PM
I just said I'm working on a patch! :)
kingbob
07-03-2009, 12:14 PM
You're posting faster than I can read. Great stuff!
Regarding the SSL issue I said in a different thread, it's the nature of imap_open() and the error message is rather confusing. When osTicket displayed the message verbatim, a lot of folks are confused.
I thought it's my Dovecot configuration issue until I ran a few test script just using imap_open().
The current code in line 45, include/class.mailfetch.php is good. Adding "/novalidate-cert" to all connection (with SSL or without), as you suggested on a different thread, messes up the code. Although it may works ok.
Thanks so much for the good work.
BoB