[imp] forcing certain settings to look in database
Jan Schneider
jan at horde.org
Sat Mar 29 12:05:16 PST 2003
Quoting Vince LaMonica <vjl at uci.edu>:
> Hi all,
>
> I'm running Horde 2.0/IMP 3.1 [am in the process of upgrading as I type
> this], and I have an interesting problem. I have several [well, over 10]
> installs of IMP so that I can maintain different settings for different
> virtual domains [eg: webmail.vdomain.edu, webmail.vdomain2.edu, etc].
>
> One of the virtual domains I am running [via apache/postfix/IMAP4rev1
> 2001.315] I want to force the users to use a certain From: and full name.
> Since this is a virtual domain, their real [as /etc/passwd sees it] name
> and account is: vdinfo. With postfix's virtual domains in place, I have
> e.mail set so that info at vdomain.edu really goes to vdinfo at mydomain.edu.
>
> I do not want to advertise the "vdinfo at mydomain.edu" address - all e.mail
> sent via IMP should appear to come from info at vdomain.edu. This works very
> well if I allow the user to edit their identity. It stores the full name
> and From: address in the mysql database just fine.
>
> However, when I alter prefs.php so that it locks those two fields:
>
>
> $_prefs['fullname'] = array(
> 'value' => '',
> 'locked' => true,
> 'shared' => true,
> 'type' => 'implicit'
> );
>
> $_prefs['from_addr'] = array(
> 'value' => '',
> 'locked' => true,
> 'shared' => true,
> 'type' => 'implicit'
> );
>
> The custom fullname and From: headers on outgoing e.mail are not honored.
> The data is still present in the database, but apparently IMP is not
> looking in the database when the above locked attributes are marked as
> "true".
>
> What I'd like to do is login as a user, make the needed changes to the
> fullname/from: header [with 'locked' being set to false], logout, and
> then
> change prefs.php to mark 'locked' as true.
>
> Is this possible? Any advice would be most appreciated.
This should be possible, though if the algorithm to translate the from
addresses is deterministic, why don't you use the from hook?
And btw, you don't need 10 installs to host virtual domains unless you want
to provide different version numbers to these domains.
Jan.
--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft
More information about the imp
mailing list