IMP server preferences

Jon Parise jon@csh.rit.edu
Wed, 18 Oct 2000 15:12:41 -0400


I'm looking on opinions (either way) on how we store users' server
preferences in IMP (2.3 tree).

Right now, we have a bunch of preferences "fields" that hold values
for the user's server, port, folder path, etc.  We also have the
config/servers.php file that defines a list of servers with their
associated values.  A typical entry looks like this:

    $servers['imap1'] = array(
        'name' => 'IMAP Server 1',
        'server' => 'imap.example.com',
        'protocol' => 'imap',
        'port' => 143,
        'folders' => 'Mail/',
        'namespace' => '',
        'from_host' => 'example.com',
        'to_host' => 'example.com',
        'preferred' => ''
    );

Now, on to the meat of my question:

For most sites, there may be a handful (two or three?) of servers
configured in config/servers.php, and those are the only servers to
which the site's users may connect.  When this is the case, it seems
more correct to simple store the user's preferred server in a single
preference field (e.g. 'imap1' above) and then use that value as a key
into the $servers array to retrieve the rest of the values.  This has
the advantage of allowing the site administrator to make a single
change to config/servers.php that will be reflected in every user's
configuration.

On the other hand, however, there is still the possibility that a
given IMP installation is merely a public application used by a wide
range of disconnected users.  Each of them will have their own mail
server preferences that the site administrator can't manage via
config/servers.php.

I'd like to go with the first approach and centralize a lot of code
and logic, but I'm not sure how many people we'd be alienating by
losing the flexibility detailed in the second (current) approach.

All of my installations would work fine (if not better) if we just
supported the first approach, so there's my bias.

Comments, please.

-- 
Jon Parise (jon@csh.rit.edu)  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member