fetchExc - fetches mail with webDAV from MS Exchange 2000/2003 servers


What fetchExc does:

FetchExc is java utility which retrieves mail from your MS Exchange (2000/2003) inbox and forwards it to SMTP server of your choice or mbox type file. FetchExc uses webDAV to retrieve mail either over http or https. webDAV is used also by Outlook Webaccees (OWA). This is also means that you administrator must have left OWA available in Exchange in order to get this utility to work. Note!!! FetchExc doesn't work well with Exchange 2007. So far there has been only one success.

I consider this program usable in production environment. There are still many places that should be polished and improved but atleast there haven't been major problems in over a year. Before you install read installation instructions from below carefully. Check list at the bottom of the page to see what has changed in each version.

How to get fetchExc:

You'll need to download latest version from here:

Older version

Or if you want to pick-up all pieces yourself:

From HttpClient you'll need commons-httpclient-3.0.1.jar (or later). From Logging you'll need commons-logging-api-1.1.jar and commons-logging-1.1.jar. And finally from Codec you'll need commons-codec-1.3.jar. Put all jars in same directory.

You also need Java Runtime Environment (1.5.0 or later) Java 2 Platform, Standard Edition

Installing:

So far this only covers *nix systems (windows instructions may follow if they are needed)

Extract fetchExc-*.tar.gz or make directory for fetchExc.jar. If you are downloading Jakarta components yourself put them in the same directory as fetchExc.jar.

Create fetchExc.properties file in your home directory. Remember to protect it with chmod 700 (it contains your password). If you took .tar.gz package there should be example included.

ExchangeServer=xxx.dddddd.com
ExchangePath=exchange
MailServer=yyy.dddddd.com
DestinationAddress=user@yyy.dddddd.com
Username=domainuser
Password=domainpassword
Domain=DOMAIN
Delete=false
All=false
Secure=true
FBApath=/exchweb/bin/auth/owaauth.dll

You can test first two properties by making URL out of them: http://ExchangeServer/ExchangePath/. This should give you a Outlook Webaccess Page.

WARNING!!! Don't combine Delete=false and All=true if you are not testing. That will fetch every mail from your Inbox everytime you start the program.

Now you just need to include JRE in you path. If it is in you path you can run program:

java -jar /install/fetchExc/fetchExc.jar

You can now (>0.80) use -p switch to change properties file. For example:

java -jar /install/fetchExc/fetchExc.jar -p test.properties

would run program using properties from test.properties

I use fetchExc with following little shell script and crontab entry so that it keeps fetching mail every two minutes.

fetchExc

#!/bin/bash
export PATH=$PATH:/usr/local/jre/bin
java -jar /install/fetchExc/fetchExc.jar $* >> fetchExc.log 2>> fetchExc.err

If you use this script replace /usr/local/jre/bin with path to your java runtime environment. Same applies to location of your installation on next line.

crontab entry:

*/2 * * * * ~jrauti/bin/fetchExc

Source:

For compilation you need Java development environment (>1.4.2) and apache ant.

Version History:

v0.50 First public release

v0.65 (22.2.2005):

v0.70 (25.2.2005):

v0.80 (8.3.2005):

v0.85 (11.3.2005):

v0.90 (6.4.2005):

v0.91 (1.7.2005):

v0.95 (6.7.2005):

v0.97 (7.9.2005):

v0.98 (21.9.2005):

v0.99 (11.10.2005):

v1.00 (28.10.2005):

v1.10 (30.05.2006):

v1.15 (05.10.2006):

v1.50 (05.11.2006):

v2.0 (27.03.2007):

Acknowledgments:

Thanks for Jakarta Project for excellent components.

Thanks for Novell for Evolution Connector which I used to get traffic dumps that I needed for webDAV(OWA) conversation

Thanks for Eric S. Raymond for excellent fetchmail which I still use whenever I can.

Contact:

You can reach me with email: jrauti(at)iki.fi. You should know what to do with (at) ;-). Any comments and improvements are welcome.

License:

FetchExc - fetches mail with webDAV from MS Exchange 2000/2003 servers.

Copyright (C) 2004-2007 Juhani Rautiainen

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Outlook is a registered trademark of Microsoft Corporation and Exchange is a trademark of Microsoft Corporation. All other brands and product names are trademarks and registered trademarks of their respective holders.