[imp] IMP changes for different IMAP directory structure

Michael Redinger Michael.Redinger@uibk.ac.at
Mon, 6 Aug 2001 14:23:25 +0200 (CEST)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hm, maybe I don't really understand the problem ... two solutions seem
more obvious to me:

- - use $default-folders and $imapuser right in the defaults.php file -
  this should work, right?
  $default->folders = '/home/imap/' . $imapuser;


- - patch the IMAP server. Eg. we patched our (UW) server sothat the users
  don't have to specify 'Mail/' in their mail clients configurations.
  IMHO this is a more consistent approach to your problem - not only IMP
  but also other mail clients would benefit from this.


Cheers,

Michael Redinger


On Mon, 6 Aug 2001, Andreas Matthias wrote:

> 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

_______________________________________
Michael Redinger
Computer Centre University of Innsbruck

He deserves death.
Deserves it! I dare say he does. Many that live deserve death. And some that
die deserve life. Can you give it to them? Then do not be too eager to deal
out death in judgment. For even the very wise cannot see all ends.
                                                -- The Lord of the Rings

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv
Filter: gpg4pine 4.0 (http://azzie.robotics.net)

iQA/AwUBO26MPg/XqdllwsEdEQIN/wCgiRaSfsOXB69LgWl8HKacDrsYql0AoL4Y
C/TMTqtlqx6C+TbN8PNIzmnC
=ZEQJ
-----END PGP SIGNATURE-----