[horde] from_addr hook and Kronolith (from_addr field essential?)
k bah
kbah at linuxmail.org
Thu Dec 4 12:08:33 UTC 2008
Horde 3.1.7
I'm using Horde with a from_addr hook, here is how the from_addr is configured on horde/config/prefs.php
--------------------- horde config
$_prefs['from_addr'] = array(
'value' => '',
'locked' => true,
'hook' => true,
'shared' => true,
'type' => 'text',
'desc' => _("Your From: address:")
$_prefs['default_identity'] = array(
'value' => 0,
'locked' => false,
'shared' => false,
'type' => 'enum',
'enum' => (isset($identity) && is_object($identity)) ? $identity->getAll('id') : array(),
'desc' => _("Your default identity:")
);
$_prefs['id'] = array(
'value' => 'Default Id',
'locked' => false,
'shared' => true,
'type' => 'text',
'desc' => _("Identity's name:")
);
$_prefs['fullname'] = array(
'value' => '',
'locked' => false,
'hook' => true,
'shared' => true,
'type' => 'text',
'desc' => _("Your full name:")
);
$_prefs['from_addr'] = array(
'value' => '',
'locked' => true,
'hook' => true,
'shared' => true,
'type' => 'text',
'desc' => _("Your From: address:")
);
--------------------- horde config
I know I have locked the from_addr setting, so the user won't change it, but as I have a large number of users, you know users, I don't want them to change their e-mail address, since it would mess things up (specially on support calls, the user won't say he changed that).
Q1)
I have the same for "fullname", and on MySQL I have a setting with pref_name = fullname and the user's name and surname. What I don't get is why I don't have a pref_name = from_addr properly set to existing users. Is that the expected behavior when using the from_addr hook? I need this hook to
Q2)
As I read on http://wiki.horde.org/KronolithReminders?referrer=HowTo# I need "from_addr" set to all users in order to Kronolith to work, right?
--------- from_addr hook code snippet ---
if (!function_exists('_prefs_hook_from_addr')) {
...
...
...
if($ds) { // If we have a LDAP link
if (is_null($user)) {
$user = Auth::getAuth();
}
$searchResult = @ldap_search($ds, $searchBase, 'uid=' . $user);
$information = @ldap_get_entries($ds, $searchResult);
if ($information['count'] > 0) {
if ($information[0]['mail'][0] != '') {
$email = $information[0]['mail'][0];
} else {
$email = preg_replace('|~|', '@', $user); //(user = user~domain.tld)
}
} else {
$email = preg_replace('|~|', '@', $user);
}
ldap_close($ds);
return (empty($email) ? '' : $email);
}
--------- from_addr hook code snippet ---
Q3) The only solution is to unlock (horde/config/prefs.php) the "from_addr" field?
thanks in advance
=
Slatwall - Guaranteed Low Prices
Save Money. Buy Slatwall Direct From The Manufacturer. Ships Same Day.
http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=2358ece01ba019e9fcb05f6adf359d1d
--
Powered by Outblaze
More information about the horde
mailing list