Configuring the Mercury Mail Transport System to manage email for a number of people using the Pegasus Mail client
Introduction
This setup assumes you want one set of user mailboxes and each user to login to Pegasus Mail from any workstation on the network to access their email. It is assumed the Windows versions of Mercury and Pegasus are being used and haven't already been installed.
Preparation
Create a mail directory, on whichever computer you choose, below which individual mailboxes can be created
for the Roaming Computing System: use \\file-server\mail; create a [mail] section in smb.conf; create /usr/mail; set permissions
or on a Windows 2000 server: use \\mail-server\mail; create the mail directory and share it; set permissions
Share that directory on the network (i.e. \\server\mail). it must be accessable to all computers using the same path, using either Universal Naming Convention (UNC) or a mapped drive letter
Create mail and SMTP queue directories in a place accessable to everyone (i.e. \\server\mail\mail-queue and \\server\mail\smtp-queue)
Install Pegasus Mail on one or all computers requiring it. it can be installed once on a file server and the program run from there via a standard workstation desktop icon; or installed on each workstation (installing just the once is by far the simplest method, whether its on a dedicated applications server, or just another workstation acting as a pseudo-server).
Run Pegasus Mail for the first time; choose 'multi-user installation from a networked computer'; enter the network path to the user mailboxes (i.e. \\server\mail); define atleast one user
Pre-configure Pegasus Mail for each user. there is a sample Pegasus Mail configuration file for use with Mercury in our documentation on Pegasus Mail which you can copy and paste, that represents our recommended settings. we'll make a link to a plain text version of just that .ini file at some point. just do a global-replace on every instance of ****** (there should be 6 instances of it) with the username of each user (if their Internet mail address differs from their (i.e. they're using synonyms) Pegasus name then that will need changing, in the last instance in the file). also, replace the single instance of your-domain-name.org with your actual domain name
Installation
Install Mercury (on whichever computer you choose, in D:\programs\mercury)
you only need install those modules which are required, but these can be changed later.
If you want to collect email using POP3 from mailboxes hosted with a provider
elsewhere, and relay your mail on to their SMTP server for formatting and
further distribution (rather than formatting it yourself), then you only need
MercuryD and MercuryC; and perhaps MercuryX if you want to schedule such things as periodically
dialling an Internet connection, if you have dial-up access rather than a fixed connection.
When first asked which modules you want to install, you don't get the option for
MercuryC, this option is on the next screen
MercuryD: distributing POP3
MercuryC: SMTP relay client
MercuryX: connection and process scheduler / task scheduler
Location of WINPMAIL.EXE or PMAIL.EXE:
for Roaming Computing System: \\FILE-SERVER\programs\programs\pmail
Mailbox directory:
for Roaming Computing System: \\FILE-SERVER\mail
or: \\MAIL-SERVER\mail
Configuration during installation
'This machine's internet domain name'
(also set in Configuration -> Mercury core module... -> General -> Internet name for this system)if you own your domain name:
just use the your-domain-name.top-level-domain-name so that all mail to that address looks to Mercury as tho it is local to that machine and will thus be delivered to it
if you do not own your domain name:
"a bogus line in %WINDIR%\SYSTEM32\drivers\etc\hosts containing bogus fully qualified domain name for your system's hostname:
127.0.0.1 localhost (is this still right?)
10.0.0.3 your-computer-name.your-made-up-domain-name your-computer-name
now, when your mail transport system ((in this case Mercury) tries to resolve myhostname, it will get 10.0.0.3 when it looks up that IP address, it will get the fully qualified domain name your-computer-name.your-made-up-domain-name. since this has a period in it, your mail transport system will be happy"
username for postmaster
address of host via which to send mail
mail queue: \\FILE-SERVER\mail\mail-queue or \\MAIL-SERVER\mail\mail-queue
Configuration after installation
Mercury Core Module Configuration
General
Poll for new mail every [60] seconds
Username of postmaster
for delivery failures, return [200] ?lines?
Hard to quit
local mailbox directory path - if you set it to \\server\mail\~N instead of ~8 then the directories and consequently the Pegasus user mailbox names can exceed the limit of 8 characters. Recent versions of Pegasus mail also use ~N but if you created your mailboxes witha version of Pegasus Mail a while ago then they may still have the ~8, this can be changed using the PCONFIG tool in the Pegasus Mail program directory
Local domains
if you are not directly connected to the Internet with a static IP address, and do not own your domain name, use the name used in the previous step, i.e. (choose the same method as is demonstrated in the Mercury Help screen accessed from this point)
your-computer-name your-computer-name
your-computer-name your-computer-name.your-made-up-domain-name
your-computer-name [internal-ip-address] (i.e. 10.0.0.3)
however, if you own your domain name, use the your-domain-name as the name of this computer i.e.
your-domain-name your-domain-name
your-domain-name your-domain-name.top-level-domain-name
your-domain-name [internal-ip-address] (i.e. 10.0.0.3)
(be sure to create synonyms in this case else your mail will try to go out as username@your-computer-name and fail)
Policy [TASKS.MER]
...
MercuryD POP3 Client
Check every [60] seconds
POP3 Account Information -> Add
POP3 Host
Username
Password
'Local User' or 'Default User'
MercuryC SMTP Client
SMTP "smart" Host details
Smart host name
Poll the queue every [30] seconds (the default)
Pegasus Mail
lodge with Pegasus details of where the mail queue is
If you have Pegasus installed on more computers than just the one running Mercury, you have to use Mercury to force each copy of Pegasus Mail to send mail to the Mercury mail queue rather than directly to the Internet (and to use a synonym file, if present);
(this will have already been done for the copy of Pegasus installed on the machine running Mercury when you installed Mercury and told it the location of WINPMAIL.EXE. However, if you have problems, try doing it again from within Mercury).
You do this by pointing Mercury over the network to each Pegasus Mail program directory on each computer running Pegasus Mail (point to the program directory, not to the actual program file) with the Configuration -> Pegasus Mail -> Directory for Pegasus Mail .EXE file and entering the location. We like to use a share name, like \\server\programs. This copies a unique PMGATE.SYS file (containing the location of the mail queue, the Internet name of the system and some other stuff) to each Pegasus Mail program directory. If all instances of Pegasus are setup similarly you can copy this file by hand which you may find less cumbersome than sharing directories, copying it over the network and un-sharing directories.
if you are going to copy it by hand, it can be useful to keep the PMGATE.SYS (and SYNONYM.MER and SYNONYM.TXT files, if using synonyms) in \\server\mail as all workstations will have access to this location for copying it fromQueues - When you enter the Mercury Queue directory, make sure it is the network location you enter, that will be similarly accessable from all workstations else each copy of Pegasus, whether running locally or from a server, won't be able to find the queue for outgoing mail
mail queue: \\FILE-SERVER\mail\mail-queue or \\MAIL-SERVER\mail\mail-queue
SMTP queue: \\FILE-SERVER\mail\smtp-queue or \\MAIL-SERVER\mail\smtp-queue (if you selected the queue on installation then you just need to change this setting)
(on systems we setup prior to 14 May 2003 we set both these queues to \\server\mail\queue. much older systems left it at the default of a sub-directory of the Mercury program directory)
Filtering Rules -> Edit global rules [Mercury-program-directory\RULES.MER] - this is for filtering to specific user mailboxes, not the folders within mailboxes, that level of filtering is done from within Pegasus Mail
Aliases (and synonyms)
as per your requirements, email address conversion for mail between the local network and Internet: the two types of email address conversion; for channelling incoming mail to malboxes named other than the name on the incoming email : use 'Aliases'; for converting outgoing mail addresses from having an '@myhostname' address, or similar, to a different domain name, use 'Synonyms'
Synonyms
defined in a plain text file (i.e. SYNONYM.TXT) in list format of 'synonym == username' i.e.
you@domain-name.org == you (if you don't have that domain-name set as Mercury's Internet name)
your-first-name.your-surname@domain-name.org == you (for defining names longer than eight characters)compiled using 'FSYNONYM SYNONYM.TXT SYNONYM.MER' (FSYNONYM is in the Mercury program directory) (you may find when compiling a new synonym file with the FSYNONYM program, in the directory where one already exists, that the new one doesn't work. so, to be sure, delete the old synonym file first)
SYNONYM.MER copied to somewhere Mercury can find it (defined using: Mercury core module -> files/directories -> synonym database file). The Mercury program directory can be a useful place to store the synonym file. copy the SYNONYM.TXT file too, so as to keep a human-readable copy of the synonym database
SYNONYM.MER copied to the Pegasus Mail program directory (on each computer running Pegasus Mail) copy the SYNONYM.TXT file too, so as to keep a human-readable copy of the synonym database. if you have a copy of Pegasus installed on wach workstation then this file will help you keep track of which synonym file is on which workstation in the event that you update the file
Aliases
use Configuration -> Aliases to configure these
(is there a reason for creating local versions of each Internet qualified name created?)
Auto response file
There are two methods, either create an areply.pm file in a user mailbox and Mercury will automatically
send the contents of the file when mail arrives for that user; or you can configure from within Mercury to automatically
send the contents of any file when mail arrives for a particular user.
Policy
Methods for automatically loading Mercury when the system starts
run it from the All Users Startup directory. in
%ALLUSERSPROFILE%\Start Menu\Programs\Startupput a shortcut to load Mercury minimised:mercury-program-directory\loader.exe -m. the disadvantage of this approach is someone needs to be log into the machine, and they might also log out and shutdown the mail server.run it as a service. When running as a service it doesn't need someone to be logged into the machine. INSTSRV (which was used with Windows NT 4) doesn't seem to exist with Windows 2000; we use FireDaemon Lite, vesion 1.6 or greater; This is how we configure Fire Daemon Lite, atleast for those settings that differ from the default:
Program
Service Identification
Short Name: Mercury
Display Name: Mercury mail transport system
Description:
Application to Run as a Service
Working Directory: d:\programs\mercury
Executable: D:\programs\MERCURY\loader.exe
Parameters: -m (automatically minimise to the task tray so that its out of the way. 'Show Window: Minimized' doesn't work with Mercury)
Settings
Logon
it may be necessary to define an account to logon with so as to gain access to shares available when logon authenticated, if your shares are secured with passwords and the guest account disabled
Logon Account: .\account for a local account, domain\account for a domain account; leave blank to run as LocalSystem which is the only one that Windows allows to interact with the desktop
Interact with Desktop: yes (we want to be able to see the icon in the task tray so that we know its running and are able to use it manually if we need to)
Password
Service Lifecycle
Upon Program Exit: Shutdown Fire Daemon
Graceful Shutdown: yes (the default)
Advanced
Process
Pre-Launch Delay: 10000(?) (Mercury can start running before the network shares are connected, even on the local machine if you've described the path to the mailboxes using UNC; and it seems can start running before other important services, presumably the Server service, as witnessed by mail arriving via POP3 but not making it to the Core Service)
(Note: when Mercury is stopped by Fire Daemon the Mercury icon is left in the task tray)
Scheduling the sending and receiving of email and using dial-up Internet access
If you are using Mercury with a non-persistant (i.e. dial-up) connection to the Internet it is a bit more fiddly to setup than if you have a persistant (i.e. DSL, broadband) connection. Use the 'MercuryX connection and process scheduler' to force Mercury to sleep for a certain time, then to awaken, dial an Internet connection, operate for a short time the close the Internet connection
If you are using Windows 2000 (and presumably Windows XP), the features to automatedly dial-up an Internet connection if non
already exists when Mercury awakens, and to close it when Mercury sleeps, will not work as dial-up networking operates differently
in these operating systems and Microsoft's dial-up networking code has problems. Instead you can use the Freeware RASDial95 program which is
distributed with Mercury and located within the Mercury-program-directory\EXTRAS directory
A later version of RASDial95, 1.2, can be downloaded from
http://www.muconsulting.com/rasdialpro/rasdial95-1.2.zip.
A commercial version, called RASDialPro, is available for download from http://www.muconsulting.com/rasdialpro/)
and can be used for 30days before you're legally bound to pay 30US Dollars. Hopefully RASDialPro fixes the flaws in RASDial95.
If you're using RASDialPro then substitute 'rdialpro' in place of references here to 'rasdial95'
MercuryX Task Scheduler -> Run this command before starting
MercuryX Task Scheduler -> Run this command after stopping
to dial, RASDial95 wants the command 'rasdial95 dial-up-connection-name username password'. sadly it wants the password in plain text
(the commercial version doesn't have this limitation);
and it appears to drop the Internet connection if it is already running (don't know if this is fixed in the commercial version), which can especially
be a problem if you're connecting often to check and send mail.
have RASDial hangup the connection when done by using the command 'RASDial95 dial-up-connection-name /DISCONNECT'
If you are using Windows 98, instead of RASDial95, 'use Win98/IE4 dialing functions...'
[] To dial before
[] To hangup after
to automatically dial an Internet connection when required. make sure that Control Panel -> Internet Options -> Connections ->
pick the connection -> 'Dial whenever a network connection is not present' is set.
Beware a situation when using this method of initiating a connection, where Mercury manages to work as expected when forced with the
Task Scheduler's 'poll now' button to open and close the connection, but when actually left to its own devices will only open the
connection and not close it. if you experience this then one workaround is to instead use the RASDial95 method
for saving money on fone costs on a dial-up system, the Task Scheduler can be open for just 30 seconds, perhaps every 30 minutes. if the 'Allow queues to "drain" before shutting down connection' setting is on, Mercury won't close the Internet connection until all processes have finished downloading/uploading. also, Mercury fires the POP3 and SMTP clients and core process, at the moment the Task Scheduler brings Mercury back to life; so the following timings might thus be appropriate on a dial-up system:
Configuration -> MercuryD POP3 Client -> Check every [60] seconds
Configuration -> MercuryC SMTP Client -> Poll the queue every [60] seconds
Configuration -> Mercury Core Module -> Poll for new mail every [20] seconds
if there is a period you don't want mail checked atall, enter '-1' for the number of minutes in that period
Logging
If you suspect there could be problems, such as the POP3 collection of mail working but it not getting picked up by the core process and thus getting lost (unless it goes somewhere we don't know about yet), you may want to temporarily turn on session logging, such as for MercuryD. depending on how often the mail is checked and the size of information coming through, this could get large, so set it to a seperate temp partition if you have one
these are the places where logging can be enabled and disabled
General: %PROGRAMFILES%\Mercury\logs\maiser.log
system logging
explanation: "The name and location of a file into which Mercury should store information about the jobs it processes. If this entry is left empty, Mercury will not perform any logging."
how to set it: Configuration -> Mercury core module -> Files -> System log file
what to set it to: F:\mercury\logs\system.logSMTP server (MercuryS) (i.e. incoming) - general
By default this is set to: %PROGRAMFILES%\Mercury\logs\mercurys.logSMTP server (MercuryS) (i.e. incoming) - session log:
You set this location yourself: F:\mercury\logs\mercurys\POP3 session logging
What to set it to: F:\mercury\logs\pop3SMTP client (MercuryE) (i.e. outgoing)
By default this is set to: %PROGRAMFILES%\Mercury\logs\mercurye.logSMTP client (MercuryE) (i.e. outgoing) - verbose []
SMTP client (MercuryE) (i.e. outgoing) - session log
You set this location yourself: F:\mercury\logs\mercurye\
Potential problems
Mercury's configuration is only saved when the program is closed down properly, such as using File -> Exit so after making any changes to the configuration, shut down and restart Mercury to save them so they won't be lost if the server crashes or loses its power unexpectedly
If you're using the NetBEUI network protocol to transfer data between Windows machines, Windows transfers that data in small bursts and this can cause problems for programs like Pegasus Mail, resulting in the loss of its configuration (an obvious indication of this is the disappearance of the fixed toolbar under the menu). It may help to use the TCP/IP protocol for your network data transfer, but only as long as you're using a firewall because of the security risks involved with NetBIOS over TCP/IP. (We still see the problem of lost Pegasus Mail settings despite having made this change, but not as often)
Mercury configuration files worth backing up
If these files are backed up then you've got a copy of everything of any worth in terms of time you put into configuring it, making a trivial task of completely restoring the program to its previous functionality.
MERCURY.INI - located in the Mercury program directory
MERCURYD.DAT - located in the Mercury program directory
ALIAS.MER - list of aliases, if they're used on your system
SYNONYM.MER - compiled list of synonyms, if they're used on your system
SYNONYM.TXT - list of synonyms in plain text format, if they're used on your system
RULES.MER - filtering rules, if they're used on your system
TASKS.MER - list of policy tasks, if they're used on your system
WINDOWS.MER
There may well be more of importance, but we think this covers all that relate to the configuration described here and we'll update this list as we learn more.
Notes...
set MercuryD's temp directory to a seperate temp partition if you have one (i.e. F:\mercury)
Further information
Documentation is available from the author for a fee.
Knowledge-base
Mercury-related Issues FAQ knowledgebase articles
General Networking Issues FAQ -> Mercury/32 FAQ knowledgebase articles
Search the Pegasus Mail and Mercury Support Knowledgebase
Public mailing lists: http://www.pmail.com/support2.htm.
To Do
Configuration -> MercuryD POP3 Client -> choose POP3 host
depending on whether this is collecting for a single mailbox or for multiple mailboxes, choose either 'Local user' or 'Default user'