[imp] Forcing an identity/from address

Jan Schneider jan at horde.org
Wed Jul 28 14:25:20 PDT 2004


Zitat von Andrew Morgan <morgan at orst.edu>:

> I have IMP v3.2.2 configured so that my users cannot set their From:
> address (trouble-maker students!) as follows in imp/config/prefs.php:
>
> $_prefs['from_addr'] = array(
>     'value' => '',
>     'locked' => true,
>     'shared' => true,
>     'type' => 'implicit'
> );
>
> With this, the From: address is built from the username and realm, and
> this works great.
>
> However, I'd like to specifically set an alternate From: address for a
> small number of users.  We would like to migrate them from an old email
> system onto ours, but it is important that their outgoing email address be
> the same as before.
>
> I tried temporarily remove the lock on from_addr, setting an email
> address, then setting the from_addr lock again.  The From: address worked
> when I removed the lock, but once I locked the preference again, it went
> back to username at realm.  I guess the code overrides the saved From:
> address when the preference is locked?

It should not, but identities are a very special case of preferences.

> Is that the way it is supposed to work?  Is there some other way to handle
> this inside IMP short of modifying the code?

Use a from_addr hook in conf.php.

Jan.

--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting.php


More information about the imp mailing list