SDB:Access Exchange Server using fetchExc and Kmail
tagline: From openSUSE
Many companies and academic institutes provide email facilities using Microsoft Exchange server, which can be accessed using Microsoft Outlook under Windows. For Linux users, the only email client which supports Exchange server is Novell Evolution, using the evolution-exchange connector. Fortunately, emails can be accessed using a web-interface if Outlook Web Access is enabled. But, this situation is not convenient for users of standalone email clients like Kmail or Thunderbird.
fetchExc is a java-based program by Juhani Rautiainen, which can retrieve email from an Exchange 2000/2003 server and forward it to an SMTP server or to a local file (mbox). This mbox file can then be read using Kmail or Thunderbird or any other email client which supports mbox format. fetchExc also supports the https protocol for secure access and is released under the GNU General Public License.
fetchExc - http://personal.inet.fi/atk/fetchexc/fetchExc-2.0.tar.gz
Java runtime environment
Assuming the archive is downloaded to the home directory
- Uncompress the archive
tar -zxvf fetchExc-2.0.tar.gz
This will create a new directory called 'fetchExc-2.0' containing a number of jar files in the home directory
- Adapt the fetchExc.properties.example to your requirements. To do this copy this to a new file fetchExc.properties. One way to do this will be
cd fetchExc-2.0 cp fetchExc.properties.example fetchExc.properties
The example file looks like this
ExchangeServer=xxx.dddddd.com ExchangePath=exchange MailServer=yyy.dddddd.com DestinationAddressemail@example.com Username=domainuser Password=domainpassword Domain=DOMAIN Delete=false All=false Secure=true FBApath=/exchweb/bin/auth/owaauth.dll ForceFrom=false ForceFromAddrfirstname.lastname@example.org NoEightBitMime=false
The homepage has explanations on these parameters. For now, the most important ones are
This is the URL which you use to access email using a browser without the /exchange Example: If the URL is http://mycompany.com/exchange, the value for ExchangeServer will be http://mycompany.com
Leave it as default, unless it differs
The domain you belong to.
Your username for the domain
Enter your password here.
This must be true if the URL which you use to access contains https:// instead of http
You can probably set this to the default mail location i.e., /var/spool/mail/yourlogin. Either way it should work. This option is required only if you want to download all emails to the Email client. Leave all other options as default. The options MailServer and DestinationAddress will be useful if you want to forward your emails to an SMTP server rather than downloading locally.
The configuration which worked for me
ExchangeServer=virtualexchange.com ExchangePath=exchange Username=vimal Password=topSecret Domain=ADMIN MboxFile=/home/vimal/fetchExc-2.0/mymail.mbox Delete=false All=false Secure=true FBApath=/exchweb/bin/auth/owaauth.dll NoEightBitMime=false
cd fetchExc-2.0 chmod 600 fetchExc.properties
- Test the configuration
cd fetchExc-2.0 java -jar fetchExc.jar -p fetchExc.properties
If successful, it produces a message like
Starting fetchExc v2.0 Tue, 13 Nov 2007 13:40:23 1 message for vimal at virtualexchange.com Message 1 sent OK
- Access mails using Kmail/Thunderbird
A shell script fetchExc.sh can be created and saved in the ~/bin directory like this
#!/bin/bash java -jar ~/fetchExc-2.0/fetchExc.jar -p ~/fetchExc-2.0/fetchExc.properties >> ~/fetchExc-2.0/fetchExc.log 2>> ~/fetchExc-2.0/fetchExc.err
Make the script executable with
chmod +x fetchExc.sh
Open Kmail/Thunderbird and Create an email account. Specify account type as "Local mailbox" and point to the /home/username/fetchExc-2.0/mymail.mbox file for the File Location. In Kmail, the above script can be called for the Pre-command. So everytime when the mail is checked, the pre-command (/home/username/bin/fetchExc.sh) is executed and the mail is stored in the mbox file, which is then retrieved by Kmail. Another possibility would be to use cron to call the script as and when required as suggested by the author.
What is not tested
Sending mails - Not sure whether it will work. Alternatives include sendmail or other SMTP accounts
MrPostman - http://mrpostman.sourceforge.net also has a plugin for OWA
fetchExc - http://personal.inet.fi/atk/fetchexc/