[Kolab-devel] Modiying IMAP Messages

Bo Thorsen bo at sonofthor.dk
Fri Aug 22 16:21:52 CEST 2003


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

On Friday 22 August 2003 14:06, Jan Schneider wrote:
> Zitat von Stuart Bingë <list at codefusion.co.za>:
> > Hi all,
> >
> > We're currently busy with the web frontend - we've managed to get
> > address list
> > and memo functionality in (and should release them soon for testing).
> > My question is - is there some way to modify existing IMAP messages?
> > The reason
> > for this is the way I've currently done memos, which is not the most
> > optimal
> > way to do things - let me explain...
> >
> > The SQL driver that comes as the default with Horde Mnemo, that I
> > based the
> > kolab IMAP driver code on, requests a seperate list for each of
> > modified, added and deleted memos. It then modifies the database,
> > deleting the memos
> > that were deleted, modifying those that changed, etc. The way I do it
> > currently, however, is to delete all the messages in the Notes folder
> > and then iterate through the memo list, adding those not flagged for
> > deletion.
> > What I ideally want to do is to modify the existing messages in the
> > Notes folder that correspond to modified memos, add any new memos to
> > the folder,
> > and delete the removed memos - i.e. the way the SQL driver does it,
> > as this
> > should be far more efficient and more stable than my current method.
> >
> > So, anyone have any ideas? Ideally I would want something like an
> > imap_modify() function to go along with the imap_append() and
> > imap_delete()
> > ones that currently exist.
>
> There doesn't exist such a method. You always have to use imap_append()
> and imap_delete() to modify messages (notes).

And the reason for this is that it is not possible or legal to change an 
IMAP file. If you do need to change it, you need to delete the old one 
and put in a new one.

In KMail we do this simply by stripping the X-UID header from the mail.

Bo.

- -- 

     Bo Thorsen                 |   Praestevejen 4
     Senior Software Engineer   |   5290 Marslev
     Klarälvdalens Datakonsult  |   Denmark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/RicBmT99lwfUS5IRAtu1AKDiTnSNtkylopAnmS1HjOZb77oYGgCgub7C
M1HVdqakzW7WmXyRLf5QMmc=
=QtbM
-----END PGP SIGNATURE-----




More information about the devel mailing list