6.0.0-beta13
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
4/11/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#12448] IMP using horde credentials when not desired
*
Your Email Address
*
Spam protection
Enter the letters below:
. .. . __ . ,.__ |__|| |/ ` \./ | \ | ||__|\__. | |__/
Comment
>> can't reproduce. I can verify that if you pass horde_auth as a smtp >> param in imp's backends.php, you will get Horde authentication >> credentials. Without it, you will get IMP credentials. There is no >> other way that you could possibly get Horde credentials **unless** >> you either define horde_auth, username, or password. > > I my case, IMP credentials are equal to Horde credentials, since I'm > using IMP as authentication system. > > I have no SMTP credentials defined in imp's backends.php or > backends.local.php. I was expecting it would use mailer credentials, > as it always did in previous horde versions. > > The problem is IMP is ignoring the username and password set in > Administration -> Configuration -> Horde -> Mailer fields > ($conf[mailer][params][username] and $conf[mailer][params][password]). > > I just installed horde in a fresh virtual machine and I could > reproduce the problem again. > > Here are the steps to reproduce it: > > 1 - Install horde and IMP via PEAR; > > 2 - Define IMP as auth driver for horde (Let a Horde application > handle authentication); > > 3 - Let backends files untouched; > > 4 - Choose "Use a SMTP server (HIGHLY RECOMMENDED)" in Mailer config > tab and set the proper fields, in my case: > > $conf['mailer']['params']['host'] = 'smtp.googlemail.com'; > $conf['mailer']['params']['port'] = 587; > $conf['mailer']['params']['auth'] = true; > $conf['mailer']['params']['username'] = 'john_doe@example.com.br'; > $conf['mailer']['params']['password'] = 'password'; > $conf['mailer']['type'] = 'smtp'; > > 5 - Logout and login; > > 6 - Add Horde::debug($params); to lines 43 and 49 of > imp/lib/Factory/Mail.php to see what username and password IMP is > using before and after the array_merge function when you click "Send". > > 7 -Try to send an email. > > 8 - Look at horde_debug.txt > > You will see the first Horde::debug() will return the correct > username and password set in $params array, I mean, the ones defined > in Configurarion -> Horde -> Mailer; > > The second Horde::debug(), the one inserted after the array_merge > function will contain IMP credentials, instead of the ones defined in > Mailer tab, and, thus, the SMTP server authentication will fail. > > Here's the output of horde_debug.txt: > > 2013-07-16T00:19:17+00:00 DEBUG: Variable information: > array(5) { > ["host"]=> > string(19) "smtp.googlemail.com" > ["port"]=> > int(587) > ["auth"]=> > bool(true) > ["username"]=> > string(22) "john_doe@example.com.br" <---- SMTP > credential defined in Mailer tab (Ok!) > ["password"]=> > string(17) "password" > <---- SMTP credential defined in Mailer tab (Ok!) > } > > Backtrace: > 1. Horde_Core_Ajax_Application->doAction() > /var/www/horde/services/ajax.php:58 > 2. call_user_func() /usr/share/php/Horde/Core/Ajax/Application.php:162 > 3. IMP_Ajax_Application_Handler_Common->sendMessage() > 4. IMP_Compose->buildAndSendMessage() > /var/www/horde/imp/lib/Ajax/Application/Handler/Common.php:528 > 5. IMP_Compose->sendMessage() /var/www/horde/imp/lib/Compose.php:842 > 6. Horde_Injector->getInstance() /var/www/horde/imp/lib/Compose.php:1066 > 7. Horde_Injector->createInstance() /usr/share/php/Horde/Injector.php:247 > 8. Horde_Injector_Binder_Factory->create() > /usr/share/php/Horde/Injector.php:213 > 9. IMP_Factory_Mail->create() > /usr/share/php/Horde/Injector/Binder/Factory.php:111 > 10. Horde::debug() /var/www/horde/imp/lib/Factory/Mail.php:43 > > 2013-07-16T00:19:17+00:00 DEBUG: Variable information: > array(5) { > ["host"]=> > string(19) "smtp.googlemail.com" > ["port"]=> > int(587) > ["auth"]=> > bool(true) > ["username"]=> > string(4) "test" <------ > IMP credential (Not Ok!) > ["password"]=> > string(3) "test" <------ > IMP credential (Not Ok!) > } > > Backtrace: > 1. Horde_Core_Ajax_Application->doAction() > /var/www/horde/services/ajax.php:58 > 2. call_user_func() /usr/share/php/Horde/Core/Ajax/Application.php:162 > 3. IMP_Ajax_Application_Handler_Common->sendMessage() > 4. IMP_Compose->buildAndSendMessage() > /var/www/horde/imp/lib/Ajax/Application/Handler/Common.php:528 > 5. IMP_Compose->sendMessage() /var/www/horde/imp/lib/Compose.php:842 > 6. Horde_Injector->getInstance() /var/www/horde/imp/lib/Compose.php:1066 > 7. Horde_Injector->createInstance() /usr/share/php/Horde/Injector.php:247 > 8. Horde_Injector_Binder_Factory->create() > /usr/share/php/Horde/Injector.php:213 > 9. IMP_Factory_Mail->create() > /usr/share/php/Horde/Injector/Binder/Factory.php:111 > 10. Horde::debug() /var/www/horde/imp/lib/Factory/Mail.php:49 > > If I comment out the array_merge function from lines 45 to 48 of > imp/lib/Factory/Mail.php then username and password params defined in > Configurarion -> Horde -> Mailer are used correctly and I can send > emails. I did the test in the fresh install again and all went well. > > So something during the process of this array_merge, which is > executed by $injector->getInstance('IMP_Imap')->config->smtp is > pulling the credentials from IMP instead of SMTP mailer params > defined in Mailer tab of horde configuration.
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers