airsyncDownload
Email
Score 50%
Description:

This little tool downloads your emails from
an Exchange Server and stores them in a local mbox file.
Optionally the mails can be kept on the server.

It uses the Exchange ActiveSync protocol.
See http://en.wikipedia.org/wiki/Airsync

configuration: see airsyncDownload --help
Last changelog:

4 years ago

19.10.2013: 1.4
Up till now airsyncDownload held the lock of the mbox file from the start until it had downloaded all mails from one folder. This was a problem when used in combination with kmail (but might be the same problem for other mail clients also using procmail locking with the lockfile command) as kmail force-removed the lockfile after some timeout.
The solution is now that airsyncDownload stores all downloaded mails into a tmp mailbox and only after finishing the download it locks the final mbox, appends all newly downloaded mails and removes the lock and the tmp mbox.

28.9.2013: 1.3
- also exit eventLoop (waiting for a reply) when we receive an error signal

27.9.2013: 1.2
- show SSL errors but ignore them

7.5.2013: 1.1
- always send the same deviceId
- new options to download one specific or all mail folders

jerome127

2 years ago

My linux distro upgraded libwbxml from 0.9.2 to 0.11.2 and airsyndownload stopped compiling (complaining about class WBXMLTree). If course I locally compiled the old version of the lib so that I can still use airsyncdownload, but if could find some time it would be great if you could update your code to compile against current version of the lib. Thanks!

Report

jerome127

4 years ago

I use airsyndownload in a script that I run in the terminal. What still prevents me to add it in crontab is that the connection sometimes hangs (for unknown reasons ; it's not frequent so hard to test). I do not usually run airsyncdownload in --debug so I just face a hanged xterm with two options: either press ctrl-C (but the longer process time might be legitimate if it was slowly downloading an unusually large number of sizable attachments) or wait for a bit longer and face the same dilemma. What I could see until now is that after pressing ctrl-C, the next instance that I run manually works very fast as usual. So to me this means some packet got lost on the network and airsyncdownload would wait for it infinitely. The possibility of a hanged process (with an opened or locked mbox file on the disk which might cause problems at the next automatic execution) refrains me from executing airsyndownload without human supervision, which would be my goal -- automatically checking for emails as I do for regular POP/IMAP servers using getmail/procmail. Therefore I would like to know if there is a timeout that guarantees that airsyncdownload will actually terminate on connection problems (so I can set MAILCHECK or cron periodicity to a value strictly larger than the timeout), or if there could be a timeout in a future version. Thanks for your attention.

Report

C

mkoller

4 years ago

When it blocks/hangs - does it ever come back with any error ?
I've now added an additional handling when Qt sends me an error signal but without a finished() signal (but I don't know if that is even possible)...please test with the latest version 1.3 I've now uploaded.
If that still does not solve your issue, then I might need to implement a timer which forces an abort of the communication.

Report

jerome127

4 years ago

I don't remember of specific errors, I think I always I stopped it after 5 min of inactivity. I'll use version 1.3 from now on, however it can take days before this problem appears again (if it ever does). If I see anything I'll let you know. Thanks for the very fast support.

Report

jerome127

4 years ago

Hello, thanks for this tool, it works great for me, or at least it worked great until recently :-( One day the IT team at my place added one server for redundancy and when the second server is enabled then airsyncdownload does not work. This is reproducible. I had the IT guy just next to me, switching on and off the additional server from the web administration page of their Exchange 2013 setup. When the additional server is active, here is an example output :

$ airsyncDownload --allFolders --debug
[... I removed the long query ... ]
sent ...
received ...
HTTP result code: 0
ERROR:SSL handshake failed
https://webmail.XXXXXXX/Microsoft-Server-ActiveSync?User=YYYYYYYYYYYYYYY&DeviceId=8adff2aa57c5419ea93a5ba1e4a7bfa2&DeviceType=SP&Cmd=Provision
ERROR: could not parse XML data

(XXXX and YYYY edited by me)

Meanwhile ExQuilla (proprietary Thunderbird extension) on the same linux computer works without trouble in all cases. Do you have suggestions for this? I'm available for tests if needed.

Report

C

mkoller

4 years ago

The error tells you that the connection could not be established because of SSL errors, e.g. illegal certificates, etc.
I've uploaded a newer version where I dump the SSL errors in detail (always the first and with -debug all of them) but also in addition I always ignore SSL errors so the download should continue but you should really check the SSL errors.

Report

jerome127

4 years ago

Thanks for the update, airsyndownload 1.2 works for me. Just for your information the SLL error follows. (in --debug)

Quote:
sent ...
SSL Error:%sThe issuer certificate of a locally looked up certificate could not be found
SSL Error:%sThe root CA certificate is not trusted for this purpose
SSL Error:%sNo certificates could be verified
received ...

Report

acidrums4

4 years ago

Got this when compiling:

Session.cxx:21:19: error fatal: wbxml.h: File or directory not found

What package I'm missing? I'm trying under Gentoo GNU/Linux.

Report

C

mkoller

4 years ago

The READE tells you you'll need libwbxml2
http://libwbxml.opensync.org/

You normally need to install the development package of it, e.g. here on my openSuse it is libwbxml2-devel

Report

4 years ago

19.10.2013: 1.4
Up till now airsyncDownload held the lock of the mbox file from the start until it had downloaded all mails from one folder. This was a problem when used in combination with kmail (but might be the same problem for other mail clients also using procmail locking with the lockfile command) as kmail force-removed the lockfile after some timeout.
The solution is now that airsyncDownload stores all downloaded mails into a tmp mailbox and only after finishing the download it locks the final mbox, appends all newly downloaded mails and removes the lock and the tmp mbox.

28.9.2013: 1.3
- also exit eventLoop (waiting for a reply) when we receive an error signal

27.9.2013: 1.2
- show SSL errors but ignore them

7.5.2013: 1.1
- always send the same deviceId
- new options to download one specific or all mail folders

product-maker 6 6

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
1.4
updated Oct 19 2013
added Apr 13 2013
downloads today
0
page views today 1