I used following sync script to migrate from old webmail to zimbra, maybe it'll work the other way around aswell, assuming exchange online supports imap.
You need linux server with apache+php with imapsync package installed.
index.php :
Code:
<html>
<head>
<title>Mail migration</title>
</head>
<body>
<p>
<center>
Move emails tool<br>
<form method="post" action="process.php">
<table><tr>
<td>Your e-mail address:</td><td> <input size=64 type="text" name=email></td></tr>
<tr><td>Password for old server:</td><td> <input type="password" name=bmpass></td></tr>
<tr><td>Password for new server:</td><td> <input type="password" name=fhpass></td></tr>
</table>
<input type="submit" name="submit" value="Sync">
</form>
</center>
</p>
</body>
</html>
process.php :
Code:
<?php
$email = $_POST["email"];
$fhpass = $_POST["fhpass"];
$bmpass = $_POST["bmpass"];
#echo "processing $email using bmpass : $bmpass and fhpass : $fhpass";
$process = sprintf("imapsync --nosyncacls --syncinternaldates --ssl1 --ssl2 --host1 this.is.your.old.mail.server --user1 %s --password1 %s --host2 this.is.your.new.mail.server --user2 %s --password2 %s --authmech1 LOGIN --authmech2 LOGIN", $email, $bmpass, $email, $fhpass);
?>
<html><head><title>syncing....</title></head><body>
<?
#echo $process;
echo "Processing IMAP sync (this will take few minutes)";
?><br><?
passthru($process);
#passthru('imapsync --nosyncacls --syncinternaldates --ssl1 --ssl2 --host1 this.is.your.old.mail.server --user1 '$email' --password1 <old pass> --host2 this.is.your.new.mail.server --user2 <email> --password2 <new pass> --authmech1 LOGIN --authmech2 LOGIN');
?><br><?
echo "IMAP sync done";
?>
</body></html>
<?
# eof
?> Edit process.php and replace this.is.your.new.mail.server and this.is.your.old.mail.server with proper hostnames.
This is assuming your username is same as your email on both ends.
Test and then have your users access the migrate web-page to complete the transfer.