j***@gmail.com
2008-03-26 18:21:35 UTC
This is my first post to the list. Besides I'm a newbie using the next configuration:
* getmail
* maildrop
* mutt
* ssmpt
(I was a Kmail user)
First thing, congratulations for your work.
Second, I have a feature request:
- I use Microsoft Outlook at work. There we have a Microsoft Exchange Server for the mail, calendar, contacts, ...
- I would like to user Cygwin, getmail, maildrop, mutt configuration.
- So I would like getmail could retrieve messages from a Microsoft Exchange Server.
Alternatives:
-[ ] Microsoft Exchange Server can be configured with SMTP, POP, IMAP support. But since I work in a big company, it's imposible that the system administrator do this.
-[ ] I haven't found any program which use Microsoft's propietary protocol. So it should be difficult to find information to support the native protocol.
-[X] There is something really easy to implement and that works quiet well. You can retrieve messages and delete them throught the webmail interface.
Web Interface:
--------------
I have found today this small piece of code (approx. 100 lines) written in python (open source):
http://www.holovaty.com/code/weboutlook/0.1/scraper.py
This is suppose to work when you have something like this:
https://owa.intermedia.net/Login.aspx
In my enterprise, we don't have a form to access. We use something like this:
http://user:***@server/exchange
I have changed this morning the code (really ugly since I'm not a programmer), to manage to retrieve messages from our server and it work. It would be REALLY NICE if you could integrate both ideas inside getmail.
Best regards,
José María
My modified code:
-------------------------------------------------------------
#!/usr/bin/python
#! -*- encoding: utf-8 -*-
import urllib2,re
# Conexión al webmail.
_auth=urllib2.HTTPBasicAuthHandler()
_auth.add_password( realm='mail.intra.enterprise.corp', \
uri='http://mail.intra.enterprise.corp', \
user='myusername', \
passwd='mypassword')
_opener=urllib2.build_opener(_auth)
urllib2.install_opener(_opener)
# Ya podemos abrir las URL.
class OWA:
def __init__(self,url='http://mail.intra.casa.corp/exchange/'):
self.url=url
_fp=urllib2.urlopen(self.url)
_texto=_fp.readlines()
_message_urls=self._get_folder('Bandeja de entrada') # or 'Inbox'
print self._read_message(_message_urls[0])
def _get_folder(self,_folder_name):
#if not self.is_logged_in: self.login()
_url = self.url + urllib2.quote(_folder_name) + '/?Cmd=contents'
_fp=urllib2.urlopen(_url)
_html=_fp.read()
#html = self.get_page(url)
#print _html
_buscador=re.compile('NAME=MsgID VALUE="([^"]*)"')
_message_urls=_buscador.findall(_html)
#_message_urls = re.findall(r'(?i)NAME=MsgID value="([^"]*)"', _html)
return _message_urls
def _read_message(self,_msgID):
_url=self.url[:-1] + _msgID + '/?Cmd=body'
_req = urllib2.Request(_url)
_req.add_header('Translate', 'f')
_fp=urllib2.urlopen(_req)
return _fp.read()
a=OWA('http://mail.intra.enterprise.corp/exchange/Firstname.Surname/')
-------------------------------------------------------------
* getmail
* maildrop
* mutt
* ssmpt
(I was a Kmail user)
First thing, congratulations for your work.
Second, I have a feature request:
- I use Microsoft Outlook at work. There we have a Microsoft Exchange Server for the mail, calendar, contacts, ...
- I would like to user Cygwin, getmail, maildrop, mutt configuration.
- So I would like getmail could retrieve messages from a Microsoft Exchange Server.
Alternatives:
-[ ] Microsoft Exchange Server can be configured with SMTP, POP, IMAP support. But since I work in a big company, it's imposible that the system administrator do this.
-[ ] I haven't found any program which use Microsoft's propietary protocol. So it should be difficult to find information to support the native protocol.
-[X] There is something really easy to implement and that works quiet well. You can retrieve messages and delete them throught the webmail interface.
Web Interface:
--------------
I have found today this small piece of code (approx. 100 lines) written in python (open source):
http://www.holovaty.com/code/weboutlook/0.1/scraper.py
This is suppose to work when you have something like this:
https://owa.intermedia.net/Login.aspx
In my enterprise, we don't have a form to access. We use something like this:
http://user:***@server/exchange
I have changed this morning the code (really ugly since I'm not a programmer), to manage to retrieve messages from our server and it work. It would be REALLY NICE if you could integrate both ideas inside getmail.
Best regards,
José María
My modified code:
-------------------------------------------------------------
#!/usr/bin/python
#! -*- encoding: utf-8 -*-
import urllib2,re
# Conexión al webmail.
_auth=urllib2.HTTPBasicAuthHandler()
_auth.add_password( realm='mail.intra.enterprise.corp', \
uri='http://mail.intra.enterprise.corp', \
user='myusername', \
passwd='mypassword')
_opener=urllib2.build_opener(_auth)
urllib2.install_opener(_opener)
# Ya podemos abrir las URL.
class OWA:
def __init__(self,url='http://mail.intra.casa.corp/exchange/'):
self.url=url
_fp=urllib2.urlopen(self.url)
_texto=_fp.readlines()
_message_urls=self._get_folder('Bandeja de entrada') # or 'Inbox'
print self._read_message(_message_urls[0])
def _get_folder(self,_folder_name):
#if not self.is_logged_in: self.login()
_url = self.url + urllib2.quote(_folder_name) + '/?Cmd=contents'
_fp=urllib2.urlopen(_url)
_html=_fp.read()
#html = self.get_page(url)
#print _html
_buscador=re.compile('NAME=MsgID VALUE="([^"]*)"')
_message_urls=_buscador.findall(_html)
#_message_urls = re.findall(r'(?i)NAME=MsgID value="([^"]*)"', _html)
return _message_urls
def _read_message(self,_msgID):
_url=self.url[:-1] + _msgID + '/?Cmd=body'
_req = urllib2.Request(_url)
_req.add_header('Translate', 'f')
_fp=urllib2.urlopen(_req)
return _fp.read()
a=OWA('http://mail.intra.enterprise.corp/exchange/Firstname.Surname/')
-------------------------------------------------------------