Hi,
I hope someone can shed some light on this, not sure if im doing something
wrong or where the issue is, but ive picked up an issue using the IMAP
adapter and Exchange 2010
I can connect to the Exchange server just fine however when trying to get a
list of the items in a foder I recieve the following error (my imap
connection is called mailbox)
mailbox( mailbox.INBOX.seen==False ).select()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/www/web2py/gluon/dal.py", line 8788, in select
return adapter.select(self.query,fields,attributes)
File "/usr/local/www/web2py/gluon/dal.py", line 5962, in select
tablename, imapqry_array , fieldnames =
self._select(query,fields,attributes)
File "/usr/local/www/web2py/gluon/dal.py", line 5781, in _select
self.mailbox_size = int(selected[1][0])
ValueError: invalid literal for int() with base 10: '" INBOX" doesn\'t
exist.'
if I look at the mailboxes returned i noticed that there seems to be a
leading " " on some of the values.
>>> mailbox.mailboxes
{'Tasks': ' Tasks', 'Drafts': ' Drafts', 'Contacts': ' Contacts',
'Journal': ' Journal', 'INBOX_mails': ' INBOX/mails', 'Sent_Items': 'Sent
Items', 'Notes': ' Notes', 'INBOX': ' INBOX', 'Outbox': ' Outbox',
'Calendar': ' Calendar', 'Deleted_Items': 'Deleted Items', 'Junk_EMail':
'Junk E-Mail'}
If I update the key to remove the leading " " then I can access the mailbox
items fine.
>>> mailbox( mailbox.INBOX.seen==False ).select()
<Rows (16)>
>>>
Is this an issue with web2py or exchange as i do not seem to have this
issue when accessing a dovecot IMAP server.
regards
Heath Jordaan
--