4 - MTA Config

The Mailismus config file is mailismus.xml and it is an XML document which is broken into the following top-level sections, enclosed within the root <mta> tag.

<mta>
    <application>...</application>
    <served_domains>...</served_domains>
    <queue>...</queue>
    <submit>...</submit>
    <deliver>...</deliver>
    <report>...</report>
</mta>

Follow the links in the left-hand menu for a breakdown of each config section.
Although Mailismus has a vast array of configuration points, they all default to canonical values such that the minimalist config file it ships with ought to let it function as a vanilla mailserver would reasonably be expected to, with very little tinkering.


4.1 - Application Defs

<application>
    <announcehost>mailhost</announcehost>
    <mtatype>Mailismus</mtatype>
    <licence>%DIRCONF%/lice.dat</licence>
    <database>...</database>
</application>

announcehost
This is the hostname announced by Mailismus in various SMTP dialogues, and acts as a global default for more specific config items.
In turn, this field defaults to the machine's own hostname, as obtained automatically from the underlying OS.
If you enter the special value %SYSNAME%, it will be replaced by the automatically obtained hostname of the local machine.

mtatype
The type of this MTA, as announced in various SMTP dialogues. Defaults to Mailismus.

licence
If absent, Mailismus defaults to trial mode, and this is the situation when you first download Mailismus, as it comes without a licence file.
If present, it must specify the path of a valid licence file.
See chapter §8 for how to order an evaluation licence or purchase a full one.

database
See separate database section


4.2 - Served Domains

<served_domains>
    <served_domain ip="myserver">mydomain1.com</served_domain>
    <served_domain ip="myserver">mydomain2.com</served_domain>
    <served_domain ip="192.168.1.1:1025">mydomain3.com</served_domain>
    <served_domain>mydomain4.com</served_domain>
</served_domains>

This optional config block allows Mailismus to function as an incoming distribution point, by specifying the ultimate destinations for various local domains.

The ip attribute specifies the machines to forward the emails to, and the example entries above demonstrate its syntax as either a hostname or a dotted IP address. You can optionally append a colon and port number, if the downstream mailserver resides on a TCP port other than the SMTP default of 25.

The final example has no ip attribute, and implies a scenario where the onward mailserver can be located via DNS. The reason you might want to list it anyway, is that the set of served domains is also used to support relay restrictions. Any client not listed in the SMTP Server's relay_clients setting (see Submit Task), will not be allowed to submit email for a domain that is not listed in the served_domains block.

If this mailserver is a secondary MX for one of the domains listed here, then you ought to specify the ip attribute to identify the ultimate destination, as relying on DNS lookup would result in the message pointlessly pinging around between the MX secondaries, and possibly even looping back to this machine.


4.3 - The Queue

This config block controls how messages are stored as they pass through the system.
See here for details.


4.4 - The Submit Task

This config block specifies the Mailismus NAFlet which accepts incoming messages into the MTA.
This and the Deliver task are the two main functional blocks within Mailismus, but how the Submit Task is set up probably has the single greatest impact on the MTA's behaviour.
See here for details.


4.5 - The Deliver Task

This config block specifies the Mailismus NAFlet which delivers stored messages onwards to their final (or next-hop) destination.
See here for details.


4.6 - The Reporting Task

This config block specifies the Mailismus NAFlet which processes bounced messages and generates NDRs.
See here for details.


4.7 - NAFMAN Commands

In addition to the generic NAFMAN commands that are built into every NAF application, (see section §5 of the NAF Guide) the mail server supports several application-specific commands.
Some of them are conditionally enabled, while others are always available.
As always, you can issue the generic showcmds command to see which commands are actually supported in the running NAF application.


4.8 - Database

As specified in §4.1 above, this config block is nested within the top-level application block.

<database enabled="Y">
    <drvclass>com.microsoft.sqlserver.jdbc.SQLServerDriver</drvclass>
    <connurl>jdbc:sqlserver://hostname;database=dbname;user=myname;password=mypass</connurl>
</database>

This optional config block specifies the database engine to use, for any MTA component that might require a database.
If absent or marked as not enabled, then no database functionality will be available in the MTA.

drvclass
Specifies the database driver (effectively the database type) and if absent it's taken from the greynaf.db.driver system property.
If that's also absent, it defaults to HSQLDB.

connurl
The JDBC connection string, to connect/login to the database.

The supported database types are:

You do not have to supply a connurl setting for embedded databases, as they are automatically created under %DIRVAR%/dbdata by default.
Since the HSQLDB embedded database is the default, that means this minimal config setting is enough to enable it:

<database/>

In order to use a particular database engine, you obviously have to have its JDBC driver on your classpath, which by default is not the case for any of them. You will need to add the driver's JAR to the Mailismus classpath, either via the dependjars config item in the naf.xml config file (see §3 for NAF Guide), or by means of the greynaf.cp system property.

In the case of the non-embedded databases, the JDBC URL encodes various information items that have to be supplied by your DBA:
• database server's hostname (or IP)
• database name
• login credentials (name and password)
Beware that any & symbols in those URLs will need to be expressed as &amp; when embedded in XML, to quote the ampersand.

See §2.3 for additional info on setting up databases.