[imp] Username hook not working when sending email
Michael M Slusarz
slusarz at horde.org
Mon May 20 18:45:18 UTC 2013
Quoting Luis Felipe Marzagao <lfbm.andamentos at gmail.com>:
> Hello:
>
> IMP 6.1.0beta2
> Horde 5.1.0beta3
>
> I have a username hook in horde that converts the username to
> username at example.com.
>
> So the user inputs 'test' in horde login screen, and then
> $registry->getAuth() will return 'test at example.com'.
>
> When I click "New Message" in IMP, the 'username' field in '_params'
> from Horde_Mail_Transport_Smtp is set correctly (with the
> '@example.com'), like this:
[snip]
> Backtrace:
> 1. IMP_Dynamic_Base->__construct() /var/www/horde/imp/dynamic.php:31
> 2. IMP_Dynamic_Compose->_init() /var/www/horde/imp/lib/Dynamic/Base.php:90
> 3. Horde_Notification_Handler->notify()
> /var/www/horde/imp/lib/Dynamic/Compose.php:260
> 4. Horde_Notification_Handler_Decorator_Alarm->notify()
> /usr/share/php/Horde/Notification/Handler.php:317
> 5. Horde_Core_Factory_Alarm->create()
> /usr/share/php/Horde/Notification/Handler/Decorator/Alarm.php:61
> 6. Horde_Injector->getInstance()
> /usr/share/php/Horde/Core/Factory/Alarm.php:93
> 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. Horde_Core_Factory_Mail->create()
> /usr/share/php/Horde/Injector/Binder/Factory.php:111
> 10. Horde_Mail_Transport_Smtp->__construct()
> /usr/share/php/Horde/Core/Factory/Mail.php:32
> 11. Horde::debug() /usr/share/php/Horde/Mail/Transport/Smtp.php:155
This SMTP object has nothing to do with IMP. It is being created by
the Alarm system via Horde's mail factory.
> Backtrace:
> 1. Horde_Core_Ajax_Application->doAction()
> /var/www/horde/services/ajax.php:56
> 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:1067
> 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_Mail_Transport_Smtp->__construct()
> /var/www/horde/imp/lib/Factory/Mail.php:62
> 11. Horde::debug() /usr/share/php/Horde/Mail/Transport/Smtp.php:155
This SMTP object is the one that is being created by IMP. IMP uses
(err... used) a different factory than the Horde default, since SMTP
parameters can be changed within IMP's config.
But I'm about 95% sure this problem was fixed in git last week. There
was an issue where IMP could only use either IMP (i.e. IMAP server)
authentication or hard-coded authentication. It sounds like you have
a setup where Horde auth != IMP auth. This has been fixed by the
'horde_auth' configuration parameter in imp/config/backends.local.php.
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the imp
mailing list