Complete.Org: Mailing Lists: Archives: offlineimap: March 2004:
OfflineImap on CYGWIN
Home

OfflineImap on CYGWIN

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Subject: OfflineImap on CYGWIN
From: "Javier Jarava (SECUWARE)" <jjarava@xxxxxxxxxxxx>
Date: Mon, 08 Mar 2004 17:02:05 +0100

OfflineImap on CYGWIN   
Hi all!!

I've "just" discovered OFFLINEIMAP (thanks to the recent LJ article),
and seeing that it'd make my life much easier with my email setup at
work, decided to try it.

Problem is: I have to use a windows machine at work (yes, I could use
VMWARE or similar to have a Linux machine, but that'd defeat the purpose
of my using OfflineIMAP).

So, I decided to try & use it inside CYGWIN.

I got the .tgz, decompress, do tar -xvzf, python setup.py install

Created & Edited .offlineimaprc, and tried to run it.

Result:

With the defaul UI, I get a TK pop-up and little else. And my monitoring
tools tell me that there is no outbound connection.

CURSES:
cohen@lazarus ~/Mail
$ offlineimap -u Curses.Blinkenlights
ERROR: No UIs were found usable!

cohen@lazarus ~
$ offlineimap -u TTY.TTYUI
OfflineIMAP 4.0.0 (Rev 509)
Copyright (C) 2002, 2003 John Goerzen <jgoerzen@xxxxxxxxxxxx>
This software comes with ABSOLUTELY NO WARRANTY; see the file
COPYING for details.  This is free software, and you are welcome
to distribute it under the conditions laid out in COPYING.
Account sync Test:

<snip error lines>

OSError: [Errno 2] No such file or directory: '/home/cohen/Test-jarava-com'

Ok, so I create the Test-jarava-com folder (do the docs mention that the
folder should exist _prior_ to getting the mail? I'm not too sure)

cohen@lazarus ~
$ mkdir Test-jarava-com

And I try to run it again:

cohen@lazarus ~
$ offlineimap -u TTY.TTYUI
OfflineIMAP 4.0.0 (Rev 509)
Copyright (C) 2002, 2003 John Goerzen <jgoerzen@xxxxxxxxxxxx>
This software comes with ABSOLUTELY NO WARRANTY; see the file
COPYING for details.  This is free software, and you are welcome
to distribute it under the conditions laid out in COPYING.
Account sync Test:
   ***** Processing account Test
Account sync Test:
   Copying folder structure from IMAP to Maildir
Account sync Test:
   Establishing connection to mail.jarava.com:143.
Thread 'Account sync Test' terminated with exception:
Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/offlineimap/threadutil.py",
line 153, in run
    Thread.run(self)
  File "/tmp/python.2664/usr/lib/python2.3/threading.py", line 416, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.3/site-packages/offlineimap/accounts.py", line
112, in syncrunner
    self.sync()
  File "/usr/lib/python2.3/site-packages/offlineimap/accounts.py", line
132, in sync
    remoterepos.syncfoldersto(localrepos)
  File
"/usr/lib/python2.3/site-packages/offlineimap/repository/Base.py", line
104, in syncfoldersto
    srcfolders = src.getfolders()
  File
"/usr/lib/python2.3/site-packages/offlineimap/repository/IMAP.py", line
135, in getfolders
    imapobj = self.imapserver.acquireconnection()
  File "/usr/lib/python2.3/site-packages/offlineimap/imapserver.py",
line 168, in acquireconnection
    imapobj = UsefulIMAP4(self.hostname, self.port)
  File "/usr/lib/python2.3/site-packages/offlineimap/imaplib.py", line
153, in __init__
    self.open(host, port)
  File "/usr/lib/python2.3/site-packages/offlineimap/imaplib.py", line
228, in open
    self.sock.connect(sa)
  File "<string>", line 1, in connect
error: (116, 'Connection timed out')


Last 1 debug messages logged for Account sync Test prior to exception:
maildir: MaildirRepository initialized, sep is '.'


I don't know _why_ it's getting the "timeout" error.
The mail server _is_ responding (not blazingly fast, but I've been able
to log-on using "stock" python and IDLE:

>>> import imaplib
>>> M = imaplib.IMAP4("<IMAP_SERVER")
>>

>>> M.login("<<IMAPUSER>>", getpass.getpass())
>>
Warning: Problem with getpass. Passwords may be echoed.
Password: <<PASSWORD>>
('OK', ['User logged in'])

>>> M.select()
>>
('OK', ['1'])

>>> typ, data = M.search(None, 'ALL')
>>

>>> print "typ -> ", typ, "data ->", data
>>
typ ->  OK data -> ['1']

>>> M.logout()
>>
('BYE', ['LOGOUT received'])

So the server seems to be avaliable and responding. The previous session
was typed while reading the ActiveState docs on IMAPLIB, so I'd say the
server was avaliable for a while.

In any case, I'd be more than interested in getting it running on Cygwin
(or on "pure Windows, if possible); I'd be willing to do testing if
necessary. I've read about the MAILDIR-on-Windows problem... I guess
that mutt-on-cygwin might be able to read some "maildir-type" dirs??

In any case, my "final" objective is to sync a "Local-imap" server
(probably cygwin's UW server, but that's the subject for another
hack-session); but if offlineimap fails on "startup", then I guess the
rest if but a dream...

Does it seem like there is any chance of my succeeeding?

I really hope so.

    Thanks a lot.

        Javier Jarava




[Prev in Thread] Current Thread [Next in Thread]