logo

Main Menu
Home
Products
Tips n Tricks
Download
Contacts
About
Login Form





Lost Password?
Bynari Insight Server Repairing MIME messages in IMAP store PDF Print E-mail

The original article is here:

http://www.bynari.net/faq/index.php?aktion=artikel&rubrik=002&id=253&lang=en

Incase it is removed.........

 An Insight Connector 2.0 issue has been identified where HTML encoded
messages display incorrectly when viewed with InsightConnector 3.0,
Insight WebClient or other third party mail client.
The issue occurs when IC2 stores these message to the IMAP server thus
a utility was written to be used with Insight Server that resolves the
mime encoding issues and rewrites the message on the server.

Note: If you are continuing to use IC 2.0 you must rebuild the local
PST file to download the changes made to these messages. The
easiest method to ensure a clean installation, is to create a
new profile in Outlook. For instructions on this procedure
see the Insight Connector 2.0 installation guide.

Note: Users upgrading from Insight Connector 2.0 to 3.0 should exit
the Outlook client and uninstall Connector 2.0, run the utility
for their user account's mailbox on the server, and then
continue with the Insight Connector 3.0 installation.

Note: To run this utility you must have root access to the Insight
Server. Users should contact their Systems Administrator
regarding any use of this utility on their server.


*** Instructions for using remime.php script ***

Download the remime.tgz: http://www.bynari.net/faq/remime.tgz


Currently the tool does:

* - remove blank/empty MIME parts
* - Re-label text/plain or text/html parts based on actual content
* - Remove email message TNEFs in favor of the text/plain, text/html
* - Remove duplicate body parts (compares md5 sums)
* - Replace attachments in TNEF with regular base64 attachments

Usage:

Redo MIME -- Remove invalid TNEFs and correct message headers
$Id: remime.php,v 1.11 2004/12/16 22:59:45 trey Exp $

Usage: ./remime.php [-b|-bb] [-f] [-p] [-r] [-s] [-v] file/directory
-b Backup messages
-bb Backup messages even if backup already exists (implies -b)
-f Force check of all messages, do not be strict
-p Pretend
-r Recurse directories
-s Skip files that have already been backed up
-v Verbose output

Example: ./remime.php -b -f -r -v .

This will force a scan of the current directory, show progress
make backups, and recurse down into subdirectories.

Note: the following example instructions assume you are running as root user.

... The following extracts the remime .php script into the /root directory
# tar xzvf remime.tgz -C ~

... now change to the users directory you would like to use this utility on
# cd /opt/insight/var/spool/imap/w/user/wuser

... to initiate the utility using the above example command
# ~/remime.php -b -f -r -v .

... finally reconstruct the users mailbox

# su cyrus -c '/opt/insight/bin/reconstruct -rf "user/wusers"'


Note: The following command is used to restore the original messages
changed by the remime.php script.

# cd /opt/insight/var/spool/imap/w/user/wuser
# find . -name "*.backup" -exec echo cp -f \"{}\" \"{}\" \; | sed
s/".backup\"$"/\"/g > SCRIPT

...next run:

# sh SCRIPT

 
 
logo