[imapfilter-devel] IMAPFilter 1.1-rc1

Lefteris Chatzibarbas lefcha at hellug.gr
Sun Aug 7 22:34:44 EEST 2005


On Sun, Aug 07, 2005 at 08:32:07PM +0300, Lefteris Chatzibarbas wrote:
> Lets see how they work through some examples:
> 
>   Consider the following folder tree in "myaccount":
> 
>   - mbox1
>   + dir1
>     - mbox2
>     - mbox3
>   - mbox4
>   + dir2
>     - mbox5
>     - mbox6
>     + dir3
>       - mbox7
>       - mbox8
>   - mbox9
> 
>   Now lets see some commands and their results:

Sorry, but unfortunately there are some mistakes... Please, have a
closer look at the corrections of my examples below...
 
>   --
>   mailboxes, folders = list(myaccount, '')
>   print(unpack(mailboxes))
>     mbox1    mbox4    mbox9
>   print(unpack(folders))
>     dir1     dir2
>   --

This one is correct.

>   --
>   mailboxes, folders = list(myaccount, 'dir1')
>   print(unpack(mailboxes))
>     mbox2    mbox3
>   print(unpack(folders))
>     
>   --

This one should be:

  --
  mailboxes, folders = list(myaccount, 'dir1')
  print(unpack(mailboxes))
    dir1/mbox2    dir1/mbox3
  print(unpack(folders))
    
  --

HINT: The server returns the full path to the mailboxes and folders.

>   --
>   mailboxes, folders = list(myaccount, 'dir2')
>   print(unpack(mailboxes))
>     mbox5    mbox6
>   print(unpack(folders))
>     dir3
>   --

This one should be:

  --
  mailboxes, folders = list(myaccount, 'dir2')
  print(unpack(mailboxes))
    dir2/mbox5    dir2/mbox6
  print(unpack(folders))
    dir2/dir3
  --

HINT: The server returns the full path to the mailboxes and folders.

>   --
>   mailboxes, folders = list(myaccount, 'dir2/dir3')
>   print(unpack(mailboxes))
>     mbox7    mbox8
>   print(unpack(folders))
>     
>   --

And this one:

  --
  mailboxes, folders = list(myaccount, 'dir2/dir3')
  print(unpack(mailboxes))
    dir2/dir3/mbox7    dir2/dir3/mbox8
  print(unpack(folders))
    
  --

HINT: The server returns the full path to the mailboxes and folders.


Also, note that, depending on the mail server, sometimes folders can be
mailboxes at the same time.  In these cases these folders are returned
both at the "mailboxes" and the "folders" tables of the list()/lsub()
commands.  For example, lets say that we have the following hierarchy:

  - folder1
  + folder2
    - folder3

In this case we have:

  --
  mailboxes, folders = list(myaccount, '')
  print(unpack(mailboxes))
    folder1    folder2
  print(unpack(folders))
    folder2
  --

HINT: "folder2" is both a mailbox and a folder.


That's all there is to it...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.hellug.gr/pipermail/imapfilter-devel/attachments/20050807/3450374f/attachment.pgp>


More information about the Imapfilter-devel mailing list