Domain Gateways
Adding and configuring domains for which MDaemon will act as a Gateway.
The Gateway Editor is reached by clicking the Gateways New Gateway… or Gateways Edit Gateway… menu selection on the menu bar of the main interface. This feature provides a limited yet useful secondary level of support for hosting multiple domains and acting as a backup mail server. When a message arrives for a domain for which MDaemon is acting as a gateway, it is separated from the main mail stream and delivered to the directory specified for it in the Gateway Editor. Additionally, attachments can be automatically extracted and placed in the specified attachment directory. Further, all mail is re-formatted according to its specified MBF file. You can host as many domains as you like using this method.
An example will prove useful here:
Suppose you want to "partially" host a domain for another department. You want to collect its mail and deposit it in a directory but do not want to maintain its accounts on your server. Let's use "company.com" as its name. The first thing you will do is enter "company.com" in the Domain Name field on the Domain Settings tab of the Editor. Then, you will select and enter the disk directory where incoming mail messages and file attachments should be stored. You don't have to use the auto-extraction of attachments feature unless it is needed. Finally, either select an existing MBF file or install a new one. The default RFC-822 MBF file will ensure that all mail stored for "company.com" will be in RFC-822 format. Once all the settings have been entered click Apply or Ok.
Now that the domain "company.com" has been installed as a client domain, MDaemon will store all messages that it receives for that domain in the directory specified, and in the format you have dictated-regardless of to whom the messages are directed. In other words, all mail for that domain will be pooled into a single directory on disk. You will setup this directory, and a POP/IMAP account for the domain to access, directly from the Gateway Editor by entering a name and password on the Gateway Editor's POP/IMAP tab and then clicking the Create/Update Account button. All that remains is for the domain to collect its mail from MDaemon via its account. This can be done by either a mail client or another MDaemon, which could utilize its DomainPOP feature to further distribute the mail to the domain's users (as would be the case in our example). Alternatively, you can use the controls on the ESMTP ETRN and ATRN/AUTH tabs so that the domain can collect and distribute its mail to its users via ESMTP instead of POP, DomainPOP, or IMAP.
This all works perfectly for LAN and WAN based systems that can easily be configured to resolve an arbitrarily assigned domain name like the "company.com" example. However, how can Internet email support be provided for "company.com" if the domain doesn't really exist on the Internet? There are two ways to cope with this problem. First, the domain can be registered with the Internet authorities and configured to resolve to the same IP address as the MDaemon that you want to collect its mail. Better yet, it can be registered as an alias to the primary domain name. Failing this, a message can still be delivered by "hiding" "company.com" within a primary domain address. Using this method, addresses can be constructed that will pass through the primary domain and on to the users of the domain for which MDaemon is acting as a gateway. For example, if an outside Internet mail user wishes to send a message to "bob@company.com", which is a domain gateway served by "mydomain.com", then the sender would need to address his email message to "bob{company.com}@mydomain.com". Because "mydomain.com" is a registered domain hosted by MDaemon, this message will be delivered properly. When MDaemon receives a message with an address in this format it will convert the address to "bob@company.com" and deliver the message to the disk directory specified for that domain. Of course the simplest method is still to just register the domain's name and point its DNS information to the same MDaemon that is acting as its gateway or backup server.
