The update to Office 2004 for Mac that Microsoft released this week patched a long-standing bug that erased messages, contacts and other information from Entourage 2004 accounts on Exchange mail servers, the company confirmed in a support document.

Microsoft Office 2004 for Mac 11.4.0 Update plugged two security holes - both of which the company gave its highest rating, "critical" - as announced in Microsoft Security Bulletin MS08-008 and Security Bulletin MS08-013. They could be exploited to inject malware into a Mac or hijack the machine from its rightful user. It also fixed a potentially disastrous flaw in Entourage 2004, the suite's email client.

"This update fixes an issue that could cause loss of email messages, calendar events, or contacts, for users of accounts on a server that is running Exchange Server," Microsoft said in a support document first issued Tuesday.

A blogger going by the alias "Vermyndax" fleshed out the terse Microsoft description in a post published yesterday. Vermyndax, who said he currently works as chief engineer for a major IT project at an unnamed federal agency, noted the trouble the Entourage bug had caused.

"Entourage 2004 treats its local database as authoritative to the mail stored in your mailbox," wrote Vermyndax. "As such, if the Exchange server happens to be virus-scanning your mailbox when you synchronize your mail, Exchange will refuse to allow Entourage access to the items being scanned. Since Entourage receives no information on the existence of those items, it will mark them for deletion in its local database."

In other words, the next time Entourage synchronized with Exchange, all those items were deleted. "In cases we noted, users were losing large swaths of email at once, on the order of two to three weeks' worth all at once," Vermyndax said.

It was rare that users would lose data permanently - Exchange's deleted-item retention policy, if set, meant that the deleted messages and contacts could be restored - but the bug was tough to pin down, Vermyndax acknowledged. "I'm much more comforted in knowing the public will soon have the fruits of the debugging labor," he said.

Entourage 2008, the updated email client part of the just-released Office 2008 for Mac, includes the bug fix pushed out this week for the older email program.

Microsoft was not immediately available for comment or to provide more detail about the Entourage 2004 fix.

Office 2004 for Mac 11.4.0 Update can be downloaded from Microsoft's site or retrieved using Office's built-in "Check for Updates" feature, which can be called from the Help menu.