IMP changes for different IMAP directory structure

Andreas Matthias matthias@hrz.uni-kassel.de
Mon, 6 Aug 2001 14:07:35 +0200 (MES)


Hello,

at our university we have an IMAP configuration where each user
has a mail directory under /home/imap/<username>, but this is NOT their
home directory (!). IMP 2.2.5 (which we are using) seems not to be able
to handle this situation, so we had to patch some things to get it
working.

Here is a list of the necessary changes; they were made in a quite
quick-and-dirty fashion; a future version of IMP should perhaps rather
define a "$defaults->mailhome" variable, and, in case this is nonempty,
prepend this to each path that is requested from the IMAP server.

I'm not sending a diff, because I don't have the original files any more.
But the changes are minor and straightforward.

------------ horde/imp/folders.php3 ------------
    74          case CREATE_FOLDER:
    75                  if ($new_mailbox) {
    76                          $new_mailbox = imap_utf7_encode($new_mailbox);
    77                          // Changed a.m. for hrz kassel imap */
    78                          $new_mailbox = '/home/imap/' . $imp->user . '/'
    78  . $new_mailbox;
    79                          // -- ende

[...]

    92          case RENAME_FOLDER:
    93                  if (!empty($old_mailbox) && !empty($new_mailbox)) {
    94                          $old_mailbox = imap_utf7_encode($old_mailbox);
    95                          $new_mailbox = imap_utf7_encode($new_mailbox);
    96                          // Changed a.m. for hrz kassel imap */
    97                          $new_mailbox = '/home/imap/' . $imp->user . '/'
    97  . $new_mailbox;
    98                          // -- ende

[...]
-------------------------------------------------

We do not support subscribing of folders, so these parts are unchanged.

------------ horde/imp/compose.php3 ------------
   716          case POSTPONE_MESSAGE:
   717                  $preamble = $imp->folders . $default->personal_folders;
   718
   719                  // Changed HRZ Kassel by a.m. 6.AUG.01
   720                  // $copyto = imap_utf7_encode($preamble . $default->post
   720  poned);
   721                  $copyto = imap_utf7_encode("/home/imap/" . $imp->user .
   721  "/" . $default->postponed);
   722                  // a.m. changes end

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

... and the same should be done for the sent-Folder, which we also don't
support.

Thanks,

Andreas Matthias

---
Andreas Matthias
Hochschulrechenzentrum, Abt. Anwendungen
Raum 1130, Tel. ++49/561/804-2281 (voice)
matthias@hrz.uni-kassel.de
http://www.uni-kassel.de/hrz/anwendungen/matthias

PGP Public Key mit Mail an: pgp-public-keys@keys.de.pgp.net,
                   Subject: get matthias@hrz.uni-kassel.de
Sprechzeiten: Montag,Dienstag      9-16 Uhr
              Mittwoch             9-12 Uhr