[imp] Bastardized use of IMP/Courier IMAP as online file server ???

eculp@encontacto.net eculp@encontacto.net
Thu Nov 7 15:14:04 2002


Quoting Mike Grommet <mgrommet@elucidations.net>:

 | Your approach seems reasonable, however I think for your case, you'd
 | actually spend less effort coding a user interface in PHP that just happens
 | to connect to Cyrus instead of trying to rip all the undesired functionality
 | out of IMP / HORDE.
 | 
 | Just my 2 cents worth...
 | 
I agree with Mike that you may be doing it the hard way but I will make a
couple of suggestions that may work for you. It will also keep you flexible
to offer additional horde services in the future.  First:
  o- disable all the applications that you don't want in
     horde/config/registry.php.
  o- enable file manager.(gollem)
  o- create a directory for the club's domain and a directory for each
     member.  Put the statements and any other files you want them to
     be able to access in their personal directories and they will be
     able to both download and view them server-side with the horde
     mime drivers.  I can visualize a backend configuration to be
     some thing like the following (horde/gollem/config/backend.php)

// I would add the following three lines or something similar.
// You will need the name of the virtual server for the path to the
// directory for the domain.  One of the many ways to get it could be:

$vdomain = strtolower(preg_replace('/^mail\.|^www\./i', '', $_SERVER['HTTP_HOST']));

// the above should be all on one line, it can be simplified for your
// needs.

// $usermail is the login with the domain included.(clubuser@club.org)
$usermail=Auth::getAuth();
// $uid is the login without the domain (clubuser)
$uid = preg_replace('|@.*|i', '', $usermail);

// End of additional lines

// Modify the following array
$backends['file'] = array(
    'name' => 'Virtual Club Directories',
    'driver' => 'file',
    'preferred' => '',
    'hordeauth' => 'full',
// I would probably make params a conditional to separate the club from
// other virtual domains.
    'params' => array('vfsroot' => ( $vdomain == "club.org" ? '/usr/local/
www/data/' . $vdomain . '/' . $uid : '/virtual/' . $vdomain )));

I should just work.  If it doesn't be sure that a cut and paste hasn't 
added any extra linefeeds.  This assumes that I have made a mistake or 
typo :-)

It will be trivial to add additional horde services for the members one 
at a time in the future.

I hope this helps.

ed

<snip>

-------------------------------------------------



More information about the imp mailing list