[sork] Aliases and Vacation

Eric Rostetter eric.rostetter at physics.utexas.edu
Thu Aug 12 19:34:41 PDT 2004


Quoting Sébastien CORBEAU <scorbeau at improve.fr>:

> Selon Eric Rostetter <eric.rostetter at physics.utexas.edu>:
> > A hook that could be
> > set by the admin to lookup aliases in a site dependent way and populate the
> > alias field would be great
> Great idea.

Thanks.

> Vacation can obtain aliases from
> - /etc/aliases
> - or ldap, database...
> - or from the .forward file
> and fill the field.

Most common are from a file (/etc/aliases) or from an sql database,
though the others are also possible...  The first job is to create a 
simple hook (that perhaps, just as proof of concept, provides a static
string for the value.  Then that could be expanded as needed for actual
values from sql, ldap, files, etc.

> The user must be able to supplement the field or not according to the
> configuration.

Uhm, I suppose.  I would say they *must* be able to modify it as the
default, but I'll allow a config item to disallow them to change it
also if people want that.  Actually preventing people from manipulating
it is hard though, so the restriction would be more of an effort to prevent
it than actually preventing it most likely.

> I've take a look to the head version. What is the best way to do that?
> In main.inc, we can replace:
> <input name="alias" type="text" size="70">
> by:
> <input name="alias" type="text" size="70" value="<?php echo
> htmlspecialchars($curaliases) ?>">

Something like that, where I assume $curaliases is from the hook call?

> Can we use the same driver?

In some cases no driver will be needed.  In others it may be useful to
use the driver (e.g. ftp).

> - if we retrieve aliases from the .forward file => same driver
> in main.php: $curaliases = $driver->currentAliases($user, $realm, $pass);
> - else we need to create a new driver

Uhm, not sure about that, but possibly.  Depends on what you need to
get from where, what your driver is, etc.

> It's easier to use the same driver but, it's surer to find aliases elsewhere
> (the .forward file is removed when the notification is removed)

In some cases, the driver (e.g. ftp) and aliases (/etc/aliases) may be
unrelated.  In others (e.g. sql db for both) they may be the same.  So
it all depends...

> What is your opinion?

Sounds good to me.  Anyone want to start coding it?

> Sébastien

-- 
Eric Rostetter
The Department of Physics
The University of Texas at Austin
 
Why get even? Get odd!



More information about the sork mailing list