[imp] replacing from_addr field in IMP identity prefs

Otto Stolz Otto.Stolz at uni-konstanz.de
Mon Nov 13 01:25:19 PST 2006


Hello Joe,

Joe Auty <jauty at indiana.edu> has written:
> If I'm 
> understanding you correctly, this would be a means of hard coding these 
> address options into Horde/IMP?

A hook is a means to dynamically set a preference -- otherwise
you would set it right in the prefs.php, wouldn't you? Horde,
and Imp, then keep those values with the session data, i. e. they
remain constant until the user logs out (and, of course, every
session has its own, particular preferences data set).

I have proposed, you could set either the alias_addr, or the
from_addr and fullname, or the tieto_addr, dynamically,
*based on your user data base*.

What you should test before you delve into coding, is which
of those preferences would suit your needs best. As said
before, I am not planning to exploit Horde's "multiple
idendities", whilst your database apparently is designed
to support them; so you may be able to exploit the alias_addr,
or tieto_addr, which I have not tested. E. g., you would
set manually (via Imp's Option menu) the tieto_addr of a
test account, then look how Imp behaves. If this is what
you are aiming at, then you would go on and develop a hook
that fetches those addresses from your user database and
sets that preference, accordingly.

Note that Horde will preserve each user's preferences, so you
will have to remove the tieto_addr preference from your
test-account's permanent preference settings, in the Horde
data store. In my test installation, Horde keeps its data in
a MySQL data base, so I would have to issue the following
MySQL commands before the hook would take effect for the
test account:
    use horde3test;
    delete from horde_prefs
    where pref_uid="test-account"
      and pref_scope='imp'
      and pref_name=tieto_addr;
(To prevent a possible misunderstanding: Horde's data store
is entirely different, and unrelated, to the user database.)

Good luck,
   Otto Stolz




More information about the imp mailing list