DataEnter, Michael Kocum Taborstrasse 27/23 A-1020 Vienna AUSTRIA CIS: 70143,1667 MHS: MICHAEL @ DEMK (via CSERVE) Internet: michael@demk.co.at Fax: +43/1/2143829 Introduction to MailRed ------------------------ MailRed is a add-on for Microsoft Mail, Windows for Workgroups and Win95. Its purpose is to redirect messages from a mailbox to another address and/or to send absent notifications (out-of-office messages). MailRed preserves the sender's address and is fully message driven. Once installed users can start and stop redirection by simply sending messages with commands to MailRed. Also included is a Windows Client (MRClient.EXE) which is a simple point and click interface to MailRed. Some suggestions as to what you can do: -Send an absent notification so that everyone knows you are out of office -Redirect mail from the Admin mailbox to a real user -Redirect mail for an out-of-office user to another person -Redirect mail from a virtual mailbox like "Sales" or "Support" to a real person -Redirect mail for a user to his/her Compuserve account (Gateway required) -Redirect mail for a user to the Internet (Gateway required) -Redirect mail for a user to a fax machine (FAX Gateway required) System Requirements ------------------- DOS 3.3 or higher Microsoft Mail, v3.0 or above OR Windows for Workgroups, v3.1 or above 1 MB of free XMS or DPMI memory XMS manager (HIMEM.SYS) or DPMI available Windows 95 users please read the section "Note for Exchange and Windows 95 users" Protected mode -------------- MailRed runs in protected mode or in real mode. The difference is speed. In protected mode MailRed run faster and can support more postoffices. It also requires less memory below 640k, which is usefull if you have a lot of LAN drivers loaded. MailRed therefore defaults to protected mode. However, not every machine is protected mode aware. Known problems are with old Intel 386 A and B step procesors (You can get an upgrade from Intel!) and with some old Compaq with CEMM.EXE loaded. If MailRed crashes at start with a GPE, your machine is not protected mode aware. In this situation you can force MailRed to work in real mode by using RUNREAL.BAT. Installation ------------ 1) MailRed in fact does two things: Firstly it redirects mail from one mailbox to another address, where the address can be another mailbox or any other valid MS Mail address. To do this, MailRed logs into MSMail as the mailbox and resends the mail to the redirection address. Secondly, it processes script files that users sent to MailRed and builds a routing table, so that MailRed knows which mailbox to check and to whom it should redirect the messages. MailRed also needs a person who is responsible for its correct operation. Any time MailRed processes a script or when it detects an error, it sends a message to this person's mailbox. The address of this person is located in the INI file under "Admin". This is not the same as "Admin" in your MS Mail environment and it should be a real person who accesses their mail regularly. 2) MailRed requires a single user mailbox with admin right on your Microsoft Mail system in order to work with Microsoft Mail. You have to create this mailbox before installing MailRed. On a Microsoft Mail Postoffice this is done via ADMIN.EXE. MailRed needs this mailbox for communcation with the users on your postoffice and it send the redirected mail using this mailbox. We suggest that you use "MailRed" as the mailbox name and "MailRed" as the alias. Note: No other person should use this mailbox!!! Do not use the real Admin's mailbox for this purpose, because MailRed seems to work but in fact doesn't. 3) Create a directory on your server and copy MailRed.EXE, MailRed.INI, APPGET.EXE, APPPUT.EXE and GTWPut.EXE into it. We suggest that you create a directory called MailRed below your MAILEXE, so it is clear that MailRed belongs to MS Mail. 4) Edit MailRed.INI and change the configuration so that it will fit your needs. MailFax.INI is plain ASCII file where each option is on a different line. It is similar to your WIN.INI. The options are: ---------------- MailDrive= is the drive where your mail database is located. If you have more than one postoffice, add a line for every postoffice. The first line has to be the drive where MailRed's mailbox is located. (The one you created in step 2) can also be the full path to mail database with a trailing backslash like M:\MAILDATA\ MailBox= is the mailbox which MailRed should use. Its the mailbox you created in step 2. Password= is the password for the mailbox you created in step 2. Admin= is the full MS Adress of MailRed's Admin. MailRed will send error reports (mostly attempts with a wrong passwords) to this address. A sample address is: YOURNETWORK/YOURPOSTOFFICE/YOURNAME HelpFile= is the file which MailRed sends to the user if it receives a message with HELP in the subject or body of the message. WriteLogFile= If is True, MailRed will write a log file called MailRed.LOG. Language= If is ENG, MailRed uses English for all its messages and log files. If is DEU, MailRed uses German for all its messages and log files. If is FRA, MailRed uses French for all its messages and log files. DetectInfiniteLoop= If is True, MailRed will check each redirection for an infinite loop and will send a message to Admin if it detects one. A infinite loop is when "A" redirects to "B", "B" redirects to "C" and "C" redirects back to "A". Without detecting the infinite loop, MailRed would redirect every message from "A" to "B", then to "C" and then back to "A", which results in a lot of network traffic and fills the mailbox if the keep option is activated. Note: MailRed checks only for a postoffice address, not for gateway address. So it would not detect infinite loops when a gateway is involved. RedirToSender= If is False, MailRed will check if the sender address is the same as the redirection address. If so, MailRed will not redirect the messages and keeps a copy of the message in the mailbox, even when message keep is not enabled. DestroyMailHeader= If is True, MailRed will not redirect the header of a message. The header is the first part of the message text which describes the routing information about the message (From,To,CC). Usualy you see this header only in the DOS Client of MSMail. The Windows Client of MSMail destroys the header. AddRedirHeader= If is True, MailRed will add a short header to every redirected message, so that the recipient knows from which address this message was redirected. StatusAllAsFile= If is True, MailRed will convert STATUS ALL messages to a file and send it as an attachment. If is False, MailRed will send it as a text note. ExcludeGateway= If is given, MailRed will not redirect any messages to this gateway. For every gateway you want to exclude add one line. Assume you want to exclude your Fax, your MHS and your SMTP gateway, add three lines, each with the gateway you want to exclude, like: ExcludeGateway=FAX ExcludeGateway=MHS ExcludeGateway=SMTP AbsentExcludeGateway= If is given, MailRed will not send absent messages to this gateway. For every gateway you want to exclude add one line. Assume you want to exclude your Fax, your MHS and your SMTP gateway, add three lines, each with the gateway you want to exclude, like: AbsentExcludeGateway=FAX AbsentExcludeGateway=MHS AbsentExcludeGateway=SMTP AbsentExcludeAddress=
If
is given, MailRed will not send absent messages to this address. For every address you want to exclude add one line. Assume you want to exclude a Internet mailing list add line with the address you want. AbsentExcludeAddress=SMTP:MSMAIL-L@YaleVM.CIS.Yale.Edu SendAbsentEvery= is the count of minutes that MailRed waits before sending a second absent notification to the same address. default to 0, which means that every time a absent message is sent. Assume you want an absent notification only once a day to an address, add the line SendAbsentEvery=1440 Sample MailRed.INI: ------------------- MailDrive=M MailBox=MailRed Password=password HelpFile=MailRed.Hlp Admin=NETWORK/POSTOFFICE/RICK WriteLogFile=True 5) Edit MailRed.HPL so that it will fit your needs. It lists all valid keywords that MailRed accepts. You can translate it to your own language as long as the keywords are in English. Sample MailRed.HLP: ------------------- ;MailRed Help File: ; ;Valid keywords are: ; ;HELP Send this file ;ADDRESS Your mail address (optional) ;PASSWORD Password for mailbox above (optional) ;REDIR Destination address ;START Start redirection (optional a date and time) ;STOP Stop redirection (optional a date and time) ;KEEP Keep message in mailbox after redirecting ;DESTROY Destroy message in mailbox after redirecting ;DELETE Delete address ;STATUS Send a status sheet ;STATUS ALL Send a status sheet for all users ; ;Note: A line starting with a ; is a comment and is ignored. ; 6) Start MailRed and check if there is any error message. 7) Start MRClient and log in using your mailbox and send a message to MailRed (to the mailbox you created in step 2). Check the checkbox "Require status sheet about the state of all redirections" and send the message. Start MailRed, it should send you back a status sheet which will be empty because you have not started any redirections yet. If you get the status sheet, everything is OK and MailRed shoud work as expected. Using Redirection: ------------------ General note: Below you will find the documentation about the commands you can send to MailRed. In general it is better to use MRClient, which gives you an easy point and click interface and writes the message for you. Please refer to the "Using MRClient" section below. Let's assume the name of your network is NETWORK, the name of postoffice is POSTOFFICE and your name is RICK. Your address is therefore NETWORK/POSTOFFICE/RICK. Note the forward slash between network and postoffice and name. Do not use a back slash or you will get no result. Let's further assume you want to redirect your mail to ANN. To start redirection send a message to MailRed with the following lines in the body of the message: REDIR NETWORK/POSTOFFICE/ANN START KEEP The line with REDIR is the redirection address and START means "start redirecting now" and KEEP means that MailRed shoud keep the messages (without deleting them) after forwarding. After MailRed gets your message, it processes the keywords and save the data into its database. MailRed then sends you a confirmation so that it is clear to you what MailRed has done. To stop redirection send a message to MailRed with the line STOP in the body of the message. MailRed will stop redirection, but will save the redirection address for the next start command. You can also redirect another mailbox to an address. This is usefull for virtual mailboxes like "Sales". To redirect SALES to ANN send the following messages: ADDRESS NETWORK/POSTOFFICE/SALES PASSWORD PASSWORD REDIR NETWORK/POSTOFFICE/ANN START 1995-06-13 13:00 The line ADDRESS is the address of the sales mailbox, the one with PASSWORD is the password of the sales mailbox (not your password), the line with REDIR is the redirection address and START means "start redirecting on 06/13/95 at 1:00pm" and as KEEP command is missing, MailRed will delete the message after redirection. Using Status: ------------- When you want to know what redirections are active, simply send a message with the following line: STATUS or if you want to know all redirections MailRed knows about, send STATUS ALL MailRed will mail you back a list of redirection(s). Using Delete: ------------- DELETE is used to delete a user from MailRed database, mostly because you deleted the mailbox with ADMIN.EXE and your want to remove the mailbox from MailRed also. Polling ------- In order to work, MailRed has to poll MS Mail for messages from time to time. This can be done in a lot of different ways: 1) If you have Microsoft Mail Postoffice than you may have a machine which runs EXTERNAL.EXE. You can put MailRed in a loop with External and so MailRed will be called periodically. A sample batch file looks like: @echo off :Start REM Change to MailRed directory cd MailRed REM Execute MailRed MailRed REM Change back to directory where External is located cd .. REM Call External for 15 minutes external -BR0:0:15 REM Check Externals errorlevel to find out if the REM operator pressed ESC if errorlevel 66 goto End if errorlevel 63 goto Start if errorlevel 62 goto End :End 2) You can also run MailRed in the background of Windows. A special programme, MAILWAIT.EXE can be requested (free of charge), for free for this purpose. MailWait accepts one argument and this is the time to wait in seconds. MailWait is designed so that it releases all resources to Windows and runs smoothly in the background. It's a good idea to create an icon for the batch file. A sample batch file may look like: @echo off :Start REM Execute MailRed MailRed REM Call MailWait for 900 seconds (= 15 minutes) MailWait 900 REM Check MailWaits errorlevel to find out if the REM operator pressed ESC if errorlevel 1 goto End goto Start :End It's a good idea to create an icon for the batch file and put that icon in your startup folder. Note: Make sure your _default.pif has background processing enabled or MailRed will not work in the background. Optionally create a extra PIF file for the batch file. Rederection to gateways and groups ---------------------------------- Enclosed you will find additional information from Microsoft's knowledge base about MSMail addressing schemes (Q94410.TXT) and how to send to a group (Q119685.TXT) Using MRClient: --------------- MRClient is a Windows program which is designed to let users on your postoffice send command message to MailRed in a simple and easy way. Note for Exchange and Windows 95 users: MRCLIENT.EXE is designed to run with MSMail 3.2 and will not run with Exchange. If you use Exchange 4.0 use MRCEX40. If you want you can rename MRCEX40.EXE to MRCLIENT.EXE. MRClient can work in two modes: 1) Normal mode: In normal mode, some options of MRClient are disabled. You have full control what MRClient options are disabled or enabled. So it is up to you what your users can do with MRClient. Please read section "MRClient.INI" for an explanation how to disable/enable options. 2) Advanced mode: In advanced mode, MRClient shows you all the possible options. To start MRClient in advanced mode, call MRClient with a command line of -a MRClient.INI ------------ MRClient.INI is plain ASCII file where each option is on a different line. MRClient looks for the INI file in the same directory where the EXE is. The options are: ---------------- MailRedFullName= is the alias name of MailRed. MailRedAddress= is address of MailRed. Usualy there is no need to manually adjust this entry and the entry above, because when you select MailRed's address in MRClient and mark the checkbox "Save address for prospective instructions" and send a message, MRClient will save it for you. Advanced= If is True, MRClient will always start in advanced mode. defaults to False, which means, that Advanced mode is used only when the -a command line is used. TimeFormat= if is 0, which is the default, MRClient will read the time format out of WIN.INI (section Intl) and you can adjust it using CONTROL.EXE. if is 12, MRClient will use a 12 hour AM/PM time format. if is 24, MRClient will use a 24 hour time format. StartTime= is the start time which MRClient initally shows. It defaults to 00:00. You can adjust it if you prefer another default time. The format of the string is always in 24 hour time format. StopTime= The same as StartTime, but for the stop time. ShowTab= is the number of the tab you want to get in normal mode. For every tab you want, you need to write one line into MRClient.INI. When you want to use Tab1, Tab2 and Tab3 in normal mode, write ShowTab=1 ShowTab=2 ShowTab=3 in MRClient.INI and MRClient will show Tab1, Tab2 and Tab3. Its also under you control how this tabs will displayed. When you write ShowTab=2 ShowTab=1 ShowTab=3 Tab2 will be the first tab, Tab1 the second and so on. So you can customize MRClient in any way you want. EnableStatusAll= If is True, the "Status All" checkbox is grayed, which means that users can't request a status all message. The default is False, which means that users can request status all. This option is usefull if you want to minimize the mail traffic. Note: If Advanced mode is used, the checkbox is always enabled. LogOnFlags= are the logon flags for MAPILogon. It defaults to 3, which means "present a logon dialog" and "start a new session". When you use the MSMail 3.x Client, this option is more or less useless. However if you use the Exchange Client, which is bundled with Exchange and Windows95, this option may be usefull, because it allows you to bypass the Profile Dialog and always use the default profile. To use the default profile on start of MRClient, use 67 for , like: LogOnFlags=67 Note: Some older versions of the Exchange Client may crash if you use 67 as LogOnFlags. AbsentMess= is the template for an absent notification. Add one line for every line of the template. A sample would be: AbsentMess=I am out of office and I AbsentMess=thats why I can't read my AbsentMess=messages. Licensing Agreement ------------------- MailRed (c) is copyrighted 1993-1995 by DataEnter, Michael Kocum, portions (c) Microsoft Corp. This product and its documentation may not, in whole or in part, be copied, reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any other natural or computer language, in any form or by any means whatsoever, be it electronic, mechanical, magnetic, optical, manual or otherwise, without the prior written consent of DataEnter. DataEnter makes no warranty or representation, either expressed or implied, with respect to the product MailRed and its documentation, their quality, perfomance, merchantability, or fitness for a particular purpose. DataEnter reserves the right to revise the user's guide and make changes in the content without obligation to notify any person or organization of such a change. In no event will DataEnter be liable for any direct, indirect, special, incidental or consequential damages, real or imagined, resulting from the use or purchase of this software. Under no circumstances shall DataEnter's liability for damages exceed the price paid for the software license. Should any remedy hereunder be determined to have failed, all limitations of liability and exclusion of damages set forth above shall remain in full force and effect. The extent of the DataEnter's warranty for the software and its documentation is limited to physical defects of the distribution media containing the software. Contact DataEnter to obtain return authorization for the replacement diskette within 30 days of the original date of purchase. Any further statement made by agents, employees, distributors or dealers of DataEnter do not constitute warranties and are not binding. No employee of DataEnter has the authority to modify any portion of this warranty. All brand and product names we refer to in the documentation are used solely for identification purposes and may be trademarks of other companies. DataEnter, (the licensor) grants the buyer (the licensee) the right to use this copy of MailRed (the program) on a single postoffice at a single location as long as the licensee complies with the terms of this license. The licensor reserves the right to terminate this license if the licensee violates any part of the agreement. The licensee agrees to make copies of the program only for backup purposes. The licensee agrees not to copy the documentation and to take all necessary precautions to ensure that the backup copies of the software are not distributed to or acquired by other parties. Microsoft Mail is a trademark of Microsoft Corp. Windows for Workgroups is a trademark of Microsoft Corp. History: -------- v2.04 Leave mail header (From,To and Subjct) in message body to let receiver know to whom the messages was v2.05 Changed absolute paths to relative to be compatible with MSMail v2.06 After a system message check for empty redir addresses and disabling of them v2.07 Resolving the full name, so that the Windows client does not display the ugly address v2.08 Changed the length of redir address to 100 chars for X400 and SMTP Improved the lookup for messages so MailRed is now a lot faster Fixed a bug in MSMail so that NEWMAIL.EXE does not report a new message when in fact there is no mail there MailRed now redirect only unread mail, so that the DOS client can keep the read mail Added keywords KEEP and DESTROY. KEEP means "keep messages in mailbox after messages" whereas DESTROY means "destroy (delete) messages after redirecting". DESTROY is the default if no keyword is used. v2.09 MailDrive in MailRed.INI can now be a full path with a leading backslash. Also UNC names shoud work (\\SERVER\VOLUME\MAIDATA\). v2.10 The recipient of the original message is now added to the "To" field of the forwarded message. v2.11 Alias name of the receiver of the message is added v2.12 Keywords "START" and "STOP" now accepts a optional date and time. The date format is YYYY-MM-DD (1995-06-14) and the time is in military time format (13:06). Its now possibel to start a redirection in the future for until a given date and time. v2.13 Added support for a file name called "MRDATA.TXT". You can use it send MailRed command (usualy addresses) which will break into two ore more lines if sent in the message body. Changed the length of redir address to 250 chars for X400 and SMTP v2.14 Fixed a problem with To addressed v2.15 No confirmation message is sent when "HELP" or "STATUS" is requested The command "PASSWORD" is now only validated when a redirection in the name of another person is done, otherwise it is ignored v2.16 When the first PO cannot be accessed, MailRed terminates because it's own mailbox will not be available v2.17 Check if mailbox is valid and deactived if not exist v2.18 Speeded up code by appx. 60% when processing a postoffice with a lot of mailboxes v2.19 Fixed Bug where no postoffice was checked after an invalid postoffice v2.20 Fixed bug when messages from a group is redirected v2.21 MailRed is now a protected mode application and runs faster under low memory conditions. MailRed needs 1MB of XMS or DPMI memory. v2.22 Confirmation message now includes status information (So there is no need to request an extra status message) MailRed now deletes outdated or inactive records in it's database to save space on disk on installation with a lot of users Added support for different languages. English and German is now available. See "Language" option above. Added support for information for the recipient when a messages is redirected. See "DestroyMailHeader" and "AddRedirHeader" above. Added support for no redirection back to the sender. (Messages from Mailbox "A" are redirected to MailBox "B" and "B" wants to send a message to "A"). See "RedirToSender" above. Added check for infinite loops in redirection. ("A" redirects to "B", "B" redirects to "C" and "C" redirects to "A"). See "DetectInfiniteLoop" above. v2.23 Fixed documentation for RedirToSender Added screen/log message for RedirToSender Added support for sending STATUS ALL messages as a file. See "StatusAllAsFile" above. Added support excluding gateways for redirection. See "ExcludeGateway" above. v2.24 Redirection header now lists original To and CC when available Fixed deleting of temp files v2.25 Fixed a lot of login problems when using MRClient with the Exchange Client. See "LogOnFlags" above. No confirmation message to Admin is sent when an empty message is recieved. So it's possible to check MailRed with PingPong and get a notification if MailRed is not running. v2.26 Changed redir header, so that all TO's and CC's are displayed v2.27 Lookup for AliasName failed if mailbox was longer than 8 chars v2.28 Address no longer converted to uppercase because of SMTP v2.29 Absent notification added Note: The number of the new absent tab is 3, which was previosly the status tab, which is now 4. So if you use the ShowTab in MRCLIENT.INI you have to adjust it. v2.30 Added time interval for absent message (INI SendAbsentEvery) Fixed a bug where temp files of attachments where not deleted v2.31 Messages keep the unread flag, even if a redirection was made Fixed a bug when a message with recipient was redirected (The recipient flag is now cleared before redirecting the message) v2.32 Fixed typos in messages v2.33 Added support for French