====================================================================== Microsoft(R) Product Support Services Application Note (Text File) WA0792: MICROSOFT MAIL MMFCLEAN.EXE UTILITY ====================================================================== Revision Date: 7/94 1 Disk Included The following information applies to Microsoft Mail for PC Networks, version 3.2. ----------------------------------------------------------------------- | INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY | | ACCOMPANY THIS DOCUMENT (collectively referred to as an Application | | Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER | | EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED | | WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR | | PURPOSE. The user assumes the entire risk as to the accuracy and | | the use of this Application Note. This Application Note may be | | copied and distributed subject to the following conditions: 1) All | | text must be copied without modification and all pages must be | | included; 2) If software is included, all files on the disk(s) | | must be copied without modification (the MS-DOS(R) utility | | diskcopy is appropriate for this purpose); 3) All components of | | this Application Note must be distributed together; and 4) This | | Application Note may not be distributed for profit. | | | | Copyright © 1993-1994 Microsoft Corporation. All Rights Reserved. | | Microsoft and MS-DOS are registered trademarks and Windows is a | | trademark of Microsoft Corporation. | | OS/2 is a registered trademark of International Business Machines | | Corporation. | ----------------------------------------------------------------------- INTRODUCTION ============ Currently, there is no way for an administrator to monitor or manage space consumed by a Windows or OS/2Ò Mail user on a version 3.0 or later Microsoft Mail postoffice (PO). In versions of Microsoft Mail earlier than version 3.0, the administrator could purge mail messages for all users on the PO. When the mail message file (MMF) architecture of versions 3.0 and later of Microsoft Mail for Windows was introduced, the administrator lost the ability to purge mail messages stored in the MMFs. The MMFCLEAN utility included in this Application Note is a Windows(TM) based application to be used on Microsoft Mail 3.0 and later postoffices to purge mail from MMFs. MMFs usually exist on the PO and contain the users' private mail messages and folders. There is one MMF per Windows user on the PO. By default, the Windows user will have his or her MMF file stored on the PO, but the user can choose to store the MMF file on his or her local machine. The MMFCLEAN utility matches the capability of the Mail Administrator program. The administrator should run it from a Windows 3.0 or 3.1, or Windows for Workgroups 3.1 or 3.11 local area network (LAN) client connected to the PO over the network. You can use the MMFCLEAN utility to clean the MMF according to the following criteria: - Message Age days - All messages with size greater than XXX - Message priority THINGS TO NOTE BEFORE RUNNING MMFCLEAN ====================================== WARNING: Before you use the MMFCLEAN utility to clean the database, make an additional backup copy of your Microsoft Mail postoffice. If an error occurs during a fix, you can restore the backup made immediately before you used the MMFCLEAN utility. In all other circumstances, you should restore the database from your most recent regularly scheduled backup. - Available disk space should be three times the size of the largest MMF. - Don't use an active PO; all users should be logged off and the PO should be backed up. - File Scan is required for Novell networks. - MMFs not stored on the PO will not be included; any MMFs stored on a user's local drive or on another server will not be cleaned. - No other Mail application should be running on the workstation when you start the MMFCLEAN utility. - The Just Compress check box in the Criteria dialog box overrides all other criteria. Remember that when a cleaning is done, a compress is also automatically done. Important: When MMFCLEAN does comparisons on the aging date, the creation date of the message is used instead of the date the user received the message. This means that if a user was on vacation for a week and then came in and downloaded his new messages to his MMF, the user's message could get deleted right after it is read if the criteria for MMFCLEAN is Read Mail Greater Than 7 Days. We are currently investigating how to change this limitation. TO INSTALL MMFCLEAN =================== 1. Insert the enclosed WA0792 disk in your floppy disk drive. 2. At the MS-DOS command prompt, type the following and press ENTER mkdir :\mmfclean where is the local hard disk drive. 3. At the MS-DOS command prompt, type the following and press ENTER copy :\*.dll :\mmfclean where is the floppy disk drive containing the WA0792 disk and is the drive where you created the MMFCLEAN directory. For example, if the MMFCLEAN directory is located on drive C and the WA0792 disk is in drive A, type the following command: copy a:\*.dll c:\mmfclean A message will be displayed stating: 3 file(s) copied. This indicates that your *.DLL files have been successfully copied. 4. At the MS-DOS command prompt, type the following and press ENTER copy :\mmfclean.exe :\mmfclean where is the floppy disk drive containing the WA0792 disk and is the drive where you created the MMFCLEAN directory. For example, if the MMFCLEAN directory is located on drive C and the WA0792 disk is in drive A, type the following command: copy a:\mmfclean.exe c:\mmfclean A message will be displayed stating: 1 file(s) copied. This indicates that your MMFCLEAN.EXE file has been successfully copied. 5. At the MS-DOS command prompt, type the following and press ENTER copy :\mmfclean.ini :\ where is the floppy disk drive containing the WA0792 disk, is the drive where your Windows directory is located, and is the path to your Windows directory. For example, if the Windows directory is named WINDOWS and is located on drive C and the WA0792 disk is in drive A, type the following command: copy a:\mmfclean.ini c:\windows A message will be displayed stating: 1 file(s) copied. This indicates that your MMFCLEAN.INI file has been successfully copied. 6. Set up an MMFCLEAN icon in Windows Program Manager and set the working directory to where MMFCLEAN.EXE is located. MMFCLEAN.INI SETTINGS ===================== The MMFCLEAN.INI file must reside in the Windows directory. You can define the following parameters in the [Options] section of the MMFCLEAN.INI file. Some modifications to the .INI file are required before you run it for the first time. Parameter | Example/description -------------------------------------------------------------------- Drive= | -or- | Drive=\\\\ | -or- | Drive=/: | Name= | Name=Admin | Password= | Password=password | MailAge= | MailAge=30 | MsgSize= | | MsgPriority= | | Here is how the numeric priorities | relate to the Mail for Windows | priorities: Priorities 1 & 2=Low, | priority 3=Medium, and priorities | 4 & 5=High. | MMFSize= | | MMFs smaller than the specified size | are ignored. A value of zero means | to accept all. | OnlyReadMail= | | 0 = Unread and Read | 1 = Read mail only | AllFolders=<0/1/2> | AllFolders=0 | | Which folders should be searched: | | 0 = All folders | 1 = Inbox, Sent mail, and Wastebasket | folders only | 2 = Sent mail and Wastebasket | folders only | LogFile= | LogFile=c:\mmfclean\mmfclean.log | JustLogUsers=<0/1> | JustLogUsers=0 | | 1 = Only log user statistics to log | file-no cleaning or compression. | JustCompress=<0/1> | JustCompress=0 | | 1 = Only Compress MMFs-no cleaning. | SkipBad=<0/1> | SkipBad=0 | | Skip bad MMFs when processing-useful | for overnight runs. Bad MMFs are | logged for later interactive rebuild. | | SkipBad is ignored when WorkLocal=1. | | 0 = Do not skip bad MMFs, but bring | up a repair dialog box. | 1 = Skip bad MMFs. | WorkLocal=<0/1> | WorkLocal=0 | | Copy MMFs to a local drive for | processing. Useful if servers and | networks are slow and you need | increased performance. | | 0 = Don't copy, work off the server. | 1 = Copy to local drive. | LocalPath= | LocalPath=c:\temp | Destination path for MMFs that are | being copied locally. Presence of | this entry does not imply that | WorkLocal=1. This is so you can have | a path entry in your .INI file, but | turn local processing on and off | from the command line. MMFCLEAN COMMAND-LINE OPTIONS ============================= Usage: mmfclean [command-line options] Options | Description -------------------------------------------------------------------- /P: | Admin password. | /N: | Admin user name. | /D: | Postoffice path. | /A: | Mail age. | /G: | All messages greater than. | /O:<1-5> | Mail priority less than or equal to. | /S: | Users with MMF size greater than. | /R | Only read mail. | /U | Both read and unread mail. | /F | Search all folders. | /I | Search Inbox, Sent Mail, Wastebasket only. | /W | Search Sent Mail and Wastebasket only. | /L: | Log file. | /J | Log users-don't compress. | /C | Just compress-no cleaning. | /B | Batch mode-run immediately and exit after. | /K | Skip bad MMFs when processing. | /H | Copy files to local drive for processing; use | of this switch without /T or a corresponding | .INI file entry file causes MMFCLEAN to | default to the Windows directory. | /T: | Local path to which MMF files should be | copied for processing (/H switch); use of | this switch implies /H. RUNNING MMFCLEAN IN BATCH MODE ============================== To run the MMFCLEAN utility from an MS-DOS batch file, you need the VMB.386, WX.EXE, and WXSRVR.EXE utilities located on the disk included with this Application Note. Copy VMB.386 to your Windows SYSTEM subdirectory, and copy WX.EXE and WXSRVR.EXE to your Windows directory. Additionally, you need to add the VMB.386 file to the [386Enh] section of your SYSTEM.INI file. For example: [386Enh] Device=vmb.386 The VMB.386 file will allow you to run a Windows-based application from the MS-DOS prompt. WXSRVR.EXE is a Windows-based application that should be run from File Manager or Program Manager first. WX.EXE is an MS-DOS-based application that is run from the MS-DOS command prompt under Windows. Usage: wx [options] program [command-line options] Options | Description ---------------------------------------------------------------------- /A | Run program asynchronously. /H[ELP] | Call QuickHelp. /N[OLOGO] | Suppress copyright message. /W | Assume virtual machine (VM) is windowed. /? | Display summary help. Example: wx /w mmfclean.exe /a:20 /n:admin /p:password /u /b TROUBLESHOOTING =============== Log File Error Messages ---------------------------- 1. Error: Administrator Admin 00000000 42Kbytes Cannot lock user's MMF file; could result in corruption. Skipping user. Cause: The user is logged into Mail or the file is open. 2. Error: Administrator Admin 00000000 42Kbytes Error copying m:\mmf\00000000.mmf to C:\mmfTeMP\~~MMFKFC.TMP Cause: The user no longer exists or was deleted. 3. Error: USER1 USER1 00000005 577Kbytes Error opening C:\mmfTeMP\~~MMFJEA.TMP Cause: The user's name or password in the MMF does not match the name or password in the access files. 4. Error: Administrator Admin 00000000 42Kbytes Error copying m:\mmf\00000000.mmf to C:\mmfTeMP\~~MMFNEC.TMP Cause: There was not enough disk space on the local drive. Other Error Messages -------------------- 1. Error: ----------------------------------------------------------------------- | MMFClean | |---------------------------------------------------------------------| | | | The version of STORE.DLL on your computer must be updated. | | | | ------ | | | OK | | | ------ | ----------------------------------------------------------------------- Cause: The working directory was not set to C:\MMFCLEAN. 2. Error: ----------------------------------------------------------------------- | Mail | |---------------------------------------------------------------------| | | | An inconsistency has been detected in the mail | | message file. This problem must be repaired | | before the mail file can continue to be used. | | Repairs may take up to several hours depending | | on the number of messages you have in your | | message file. | | | | -------------- ---------- | | | Repair Now | | Cancel | | | -------------- ---------- | ----------------------------------------------------------------------- MMFClean Log information: Username Username 00000005 39Kbytes This MMF file is corrupt and was not automatically repaired. Cause: A corrupt MMF was found. For more details, please refer to the MMFCLEAN.LOG file.