Avalonia MailRouter Setup

To set up a domain, you must first set up your mail server to handle the domain. In AIMS and EIMS 1.X this is done in the Sending Setup dialog. Do not enter the domain into the Preferences dialog, as this will prevent forwarding of the mail to MailRouter.
AIMS and EIMS 1.X uses a folder named "Mail Folder" in the system folder. When started the first time MailRouter will place a folder named "MailRouter f" in the Mail Folder. This folder contains four folders named "In", "Spool", "Log Archive" and "Tmp". MailRouter expects the messages to be delivered into the "In" folder.
For each domain fill out the Domain field, and set routing to save as files, where the field must contain the full path to the "In" folder. This will ensure that all messages sent to the domain is forwarded to MailRouter. An example of such a path could be:

Macintosh HD:System Folder:Mail Folder:MailRouter f:In

where the active system folder is placed on the volume "Macintosh HD".

In EIMS 2.X all the settings have been integrated into a single Preferences dialog. In EIMS 2.0 and 2.01 selecting the "Sending Setup" icon will allow you to enter the domains you want to route:

while in EIMS 2.1 and newer you need to select the "Mail Routing" icon:

EIMS 2.X places the Mail Folder in the same folder af the "EIMS Server" application, so an example of a path to the "In" folder could be something like:

Macintosh HD:Programmes:EIMS 2.0:Mail Folder:MailRouter f:In

where the folder EIMS 2.0 contains both the "Mail Folder" folder and the "EIMS Server" and MailRouter applications.

Setting up domains in SIMS is done by first adding a user named "MailRouter" and making SIMS "Store in Folder Only":

Routing the domains is then done using the "Router Settings" dialog, where a line is added for each domain you want to route. To route the domain "cust1.dk" to MailRouter, the line:

cust1.dk = <local>MailRouter

must be added in the router settings.

For a mail server to forward mail, you must also have set up a DNS entry, with an MX record pointing to your mail server, for each domain you want MailRouter to handle:

cust1.dk. IN MX 10 avalonia.dk.

For MailRouter to forward mail, you have to create a text file using a text editor, containing a description of how messages should be forwarded. The file must be named "alias" and be placed in the folder "MailRouter f" in the Mail or SMTP Folder.
The alias file consists of lines with the following format:

<keyword> <pattern1> <pattern2> <pattern2> ...

seperated by spaces.

<keyword > can be alias, redirect, popgate or ipsgate, where an alias line is used for forwarding a single address to one or more other addresses, a redirect line is used for redirecting messages to several different addresses according to a common rule, and a popgate or ipsgate line is used for forwarding mail for a whole domain via a dial-up POP account. If a line doesn't start with one of these three keywords, the line will be taken as a comment, and skipped by MailRouter.
<pattern1> is a pattern used for matching the addresses on the incoming messages, and <pattern2> is a pattern used for construction the address the message is to be forwarded to. Each line generally allows forwarding to as many addresses you like.

Each time you make a change in the alias file, or replace the file, MailRouter will automatically detect that the file has been changed, and within 30 seconds of the change having been made, MailRouter will have reinitialised itself, and started using the new information. There is no need for you to restart MailRouter.



Bo Holst-Christensen (holst@cutisan.dk)