[imp] Forcing an identity/from address

Andrew Morgan morgan at orst.edu
Wed Jul 28 17:22:03 PDT 2004



On Wed, 28 Jul 2004, Jan Schneider wrote:

> 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.

For a small number of users, would a simple php array be ok for this?  I
don't really want to go to the hassle of making a table in mysql for it...
:)  Just asking for some advice here.

	Andy


More information about the imp mailing list