Home msFetch Installation
msFetch Installation | Print |

Version History:

v0.1 First public release.

v0.2 Speeds e-mail downloads. Addresses issue with duplicate e-mail IDs Microsoft Exchange Q320749

v0.3 Added support for separate mbox file for "Sent Items" (outbound mail).

v0.4 Added 2 new authentication methods. "Windows Basic", "OWA Web Forms", and "OWA 2007 Web Forms".

# Previously only "OWA Web Forms" were available. # Added ability to specify MS Exchange ports using "MAILPORT" variable.

# Added ability to specify MS Exchange web protocol (HTTP/HTTPS) using "MAILPROT" variable.

# Added module checks, so it will be easier to identify modules that are not installed.

This e-mail address is being protected from spambots. You need JavaScript enabled to view it

 

How to get msfetch:

Version 0.4 Download: Content:
  • msfetch - main execution
  • .msfetchrc - utility configuration file

Installing:

Install following Perl modules:
  1. LWP::UserAgent
  2. URI
  3. URI::Escape
  4. XML::LibXML
  5. Time::Local
  6. HTTP::Cookies
Extract msfetch.tar.gz to your HOME directory. This is important, since executable will look for config file in your home directory. BOTH FILES MUST BE IN YOUR USER DIRECTORY!!!!
  1. "chmod 600 .msfetchrc" - configure ACL for the configuration file
  2. "vi .msfetchrc" - edit configuration with the settings below:
    • MAILSERVER - DNS name or IP address of your MS Exchange server.
    • MAILUSER - Username for MS Exchange OutLook WebAccess.
    • MAILDOMAIN - Windows domain for your user account.
    • MAILCRED - Your password.
    • MAILPROT - defines HTTP or HTTPS
    • MAILMETHOD - defines authentication type "Windows Basic", "OWA Web Forms", and "OWA 2007 Web Forms". Choices are "windows-basic", "owa", "owa2007".
    • MAILPORT - (optional) - specify non-standard ports. For example your Exchange might work on port 8080.
    • MAILBOXFILE - Location where all the downloaded content will be stored in. This utility only stores locally, does not support forwarding.
    • MAILOUTBOX - Location where all "Sent Items" e-mails will be stored in.
    • MAILHISTORY - Each time e-mail is downloaded, a record is added to this file in order to avoid double-downloads. If you delete this file, then msfetch will download mailbox from a scratch.
    • EXCLUDE - EXCLUDE directive is very helpful when you want certain folders to be skipped on download. By default I skipped Caledar, Tasks, etc... Although it is pretty cool to download "Calendar" items! :)
  3. MAILSERVER=webmail.example.com 
    MAILUSER=john
    MAILDOMAIN=cisco
    MAILCRED=password
    MAILPROT=http
    MAILMETHOD=windows-basic
    MAILPORT=8080
    MAILBOXFILE=/home/john/msfetch.mbox
    MAILOUTBOX=/home/john/msfetch.outbox
    MAILHISTORY=/home/john/.msfetch.history

    EXCLUDE=RSS%20Feeds
    EXCLUDE=Tasks
    EXCLUDE=Sync%20Issues
    EXCLUDE=Notes
    EXCLUDE=Junk%20E-mail
    EXCLUDE=Drafts
    EXCLUDE=Journal
    EXCLUDE=Contacts
    EXCLUDE=Calendar
  4. Add crontab job in order to collect e-mails automatically:
  5. */15 * * * * ~/msfetch > /dev/null 2>&1

How to debug:

Comment/Uncomment lines below. Default is "Disabled"
# Default = "Disabled" 
# my $DEBUG;
# This line will disable debugging
# my $DEBUG = 1;
# This line will enable debugging
my $DEBUG;