Page 3 of 7 FirstFirst 1234567 LastLast
Results 21 to 30 of 65
Discuss Microsoft Exchange email access without IMAP through Python...help needed! at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; Another avenue to investigate is ximian-connector. It's written in C and uses Web DAV instead ...
  1. #21
    Newbie Array

    Join Date
    Aug 2007
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default Web DAV?

    Another avenue to investigate is ximian-connector. It's written in C and uses Web DAV instead of scraping to get at the email and calendar information.

    It's a plugin for the evolution mail client.

    http://blogs.cocoondev.org/crafterm/...es/001913.html


  2. #22
    Professional Array

    Join Date
    Aug 2007
    Posts
    54
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    10

    Default

    kupan -

    In OS X (not iPhone OS X), you will not be able to open port 110. The firewall blocks it as far as I know. The iPhone has no firewall, so you can open whatever port you want. So far, we're limited to 110 as the iPhone does not appear to allow you to change the default port.

    Stat and list should give you something if the script is working right (and you have messages in your inbox). Whatever page your iPhone is downloading does not have a list of messages on it.

    The delay will be between sending the first command after login (doesn't matter what it is) and the server's response. If the server responds immediately, it didn't download anything.

    You can try to find out what is on the page that the iPhone's looking at; this could give you a clue as to what's going wrong. I'm assuming you're using the forms version of the scraper. Run python on the iPhone from the folder you're keeping scraper.py in:

    Code:
    /usr/bin/python
    then enter these commands at the Python command line:

    Code:
    from scraper import OutlookWebScraper, CookieScraper
    import re, socket, urllib, urlparse
    from Cookie import SimpleCookie
    then set up your login information and login:

    Code:
    s = OutlookWebScraper('https://webmaildomain.com', 'username', 'correct password')
    s.login
    If everything goes well, Python will say nothing, just give you another command prompt. If there are errors, it'll spit them out. Now try:

    Code:
    url = s.get_page('https://webmaildomain.com/username/Inbox?Cmd=contents')
    print url
    The last line will display the entire contents of the page.
    Last edited by lh99; 08-26-2007 at 02:21 PM.

  3. #23
    Rookie Array

    Join Date
    Aug 2007
    Posts
    18
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by lh99 View Post
    kupan -

    Stat and list should give you something if the script is working right (and you have messages in your inbox). Whatever page your iPhone is downloading does not have a list of messages on it.
    Seeing how it all works on my laptop, I am guessing it is the fact I am hardcoding that 'm' value in the scraper file. When I don't hardcode it on my laptop, I get the emails. When I do hardcode it for my iPhone, no luck. I am 99% sure I am filling it with the correct value. If I login via the web, View Source on the frame with my messages, and I copy what is in the <BASE href> tag, I see: https://mail.MYCOMPANY.org/exchange/USERNAME/

    Quote Originally Posted by lh99 View Post
    You can try to find out what is on the page that the iPhone's looking at; this could give you a clue as to what's going wrong. I'm assuming you're using the forms version of the scraper. Run python on the iPhone from the folder you're keeping scraper.py in:

    Code:
    /usr/bin/python
    then enter these commands at the Python command line:

    Code:
    from scraper import OutlookWebScraper, CookieScraper
    import re, socket, urllib, urlparse
    from Cookie import SimpleCookie
    then set up your login information and login:

    Code:
    s = OutlookWebScraper('https://webmaildomain.com', 'username', 'correct password')
    s.login
    If everything goes well, Python will say nothing, just give you another command prompt. If there are errors, it'll spit them out. Now try:

    Code:
    url = s.get_page('https://webmaildomain.com/username/Inbox?Cmd=contents')
    print url
    The last line will display the entire contents of the page.
    So it looks like it is just taking me to the login screen. I've checked and double checked my username and password entires, and my mail website, but it all looks ok. I'm just not getting why the whole setup works on my laptop, but not my iPhone...

  4. #24
    Professional Array

    Join Date
    Aug 2007
    Posts
    54
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    10

    Default

    So it looks like it is just taking me to the login screen. I've checked and double checked my username and password entires, and my mail website, but it all looks ok. I'm just not getting why the whole setup works on my laptop, but not my iPhone...
    Somehow, the iPhone is not logging in properly, or it's not following the OWA redirects. I can't think of any reason why there would be a difference between your laptop and the iPhone assuming both are running Python 2.5. Since I don't have access to an OWA account with forms-based authentication, I can't dig deeper into this.

    Another tool I used in the process of developing the HTTP-authentication version is CURL. It's in the iPhone binkit under /usr/bin. CURL is a UNIX tool that allows you to download web pages, files, etc. It supports POST and HTTPS and may be easier to work with than the Python scripts (as it runs from the command line). Give it a try; if you can get your Inbox page to download correctly in CURL, we can figure out how to do the same thing in Python.

  5. #25
    Newbie Array

    Join Date
    Aug 2007
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    On the Web Dav front, here is a thread describing a python script that uses webdav to move exchange data into a pop account. Seems like someone could take its webdav code and your IMAP code and merge them.

    Edit: Forgot to add the url - http://hackint0sh.org/forum/showthread.php?t=1424


  6. #26
    Professional Array

    Join Date
    Aug 2007
    Posts
    54
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    10

    Default

    Quote Originally Posted by jtokash View Post
    On the Web Dav front, here is a thread describing a python script that uses webdav to move exchange data into a pop account. Seems like someone could take its webdav code and your IMAP code and merge them.

    Edit: Forgot to add the url - http://hackint0sh.org/forum/showthread.php?t=1424
    This looks very interesting (and based on the same script I'm using). It appears to be a much more efficient way to get the emails from OWA as compared with the web scraping methodology. The ability to tag messages as sent to the iPhone could allow me to avoid a lot of extra code that I was planning to implement in order to speed up the script. I will take a closer look tonight...

  7. #27
    Senior Professional Array

    Join Date
    Jul 2007
    Posts
    445
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    30

    Default

    does anyone have a webdav documentation or tutorial? Id like to look at getting contacts for my OTA conacts sync


    EDIT: I wonder if this is of any use: http://www.econetwork.net/~jdavis/Software/PyDAV/
    Last edited by RVN84; 08-29-2007 at 05:27 AM.

  8. #28
    Newbie Array

    Join Date
    Aug 2007
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by lampcov View Post
    Don't know if this is of interest. but there is an open source app called pop2owa that uses OWA RPC to get email AND SENT email, and to the iphone it's a pop3 server. It's written in VB and runs on windows. I've got it installed and it does work, connecting to my work exchange, but it is unstable.
    unstable? why?, please give me your feedback

    Quote Originally Posted by lampcov View Post
    I know the python script runs ON the iphone which is cool, but maybe if someone with VB experience had a hand this could be a good solution as it supports attachments, and SENDING of mail as well, which is huge. I have both Macs and PCs in my environment so it's not a big deal that it's Windoze. Entourgage uses the RPC also so i'm sure it could be "ported" to the Mac.

    Just a thought.
    Yes, it could be "ported" to the Mac, if any one needs help of pop2owa developer (me), please send me a mail.

  9. #29
    Newbie Array

    Join Date
    Aug 2007
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by lh99 View Post
    This looks very interesting (and based on the same script I'm using). It appears to be a much more efficient way to get the emails from OWA as compared with the web scraping methodology.
    Using webdav you can get the original message in RFC 821 format, that can be parsed by one standard email client without problems.

    You only need send one GET reguest with the following headers:

    .setRequestHeader "Content-type", "text/xml"
    .setRequestHeader "Depth", "infinity"
    .setRequestHeader "Translate", "f"

    Send me a mail if you need support with webdav commands.

    Un saludo
    Carlos GarcÚs

  10. #30
    Professional Array

    Join Date
    Aug 2007
    Posts
    54
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    10

    Default

    0.0.4 Released

    Mostly speed and security 'improvements.' See the Google Code site for the latest download and details.

    http://code.google.com/p/iphone-pop3-outlook/


 

 
Page 3 of 7 FirstFirst 1234567 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 02-19-2008, 05:25 PM
  2. Email Imap attachments
    By Nelson0000 in forum General
    Replies: 0
    Last Post: 02-19-2008, 04:35 PM
  3. Mail auto-check doesnt work on IMAP Exchange
    By bence8810 in forum General
    Replies: 24
    Last Post: 01-10-2008, 07:37 PM
  4. mailstreet and imap email
    By Globalm3 in forum General
    Replies: 0
    Last Post: 09-21-2007, 01:24 AM
  5. IMAP & Exchange 2003 poroblems
    By kelkin in forum General
    Replies: 2
    Last Post: 08-26-2007, 05:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 09:56 AM.
twitter, follow us!