The Configuration File - dmail.conf

Following installation, various options and settings can be adjusted to tailor DSMTP and DPOP to your specific requirements.

Most configuration options for the three servers that make up DMail are held in the DMail configuration file, which is dmail.conf by default.

DSMTP and DPOP have all of their settings in dmail.conf, DList has most settings there too but also has a lists.dat file for list specific settings.

On this page ...

Links to the reference section setting lists ...



Format of the dmail.conf file

The initial settings in the configuration file are normally placed there by the DMSetup wizard. You may modify them at any time to fine tune DMail or to allow for changes to your system. The configuration file generated by the DMSetup wizard contains extensive comments and can be edited using a standard text editor.

Most settings in dmail.conf are specifed one per line and have the format,
name value
where 'name' is the setting name and 'value' is the setting value, commonly a single word or number. Some settings take multiple word values.

Nothing else should appear on the same line either before or after the setting. So DO NOT add comments onto the end of setting lines :-)

When appropriate settings can be entered multiple times on multiple lines, e.g.
setting1 value1
setting1 value2
...
Occasionally a setting can be specifed with a list of values separated by commas.

The reference section lists all available settings with their individual syntaxes.

See also, Notes on the dmail.conf file.


Where is the dmail.conf file located?

The location for this file is system dependent but typical values are:

  • for most Unix variations

    /etc/dmail.conf

  • for Windows 95 and NT

    C: \winnt\system32\dmail.conf



Notes on the dmail.conf file

  • Multiple value settings should be entered as multiple lines in dmail.conf. A comma separated list of setting values may only be used when specifically stated in the reference section
  • # and #include
  • As some of the information stored in the configuration file may be sensitive it should normally not have world read access.
  • Once you have made changes to a config file by editing it you must make the DPOP and DSMTP servers reload the config file for the changes to take affect. You can do this either by restarting them or by using the tellpop and Tellsmtp ' reload ' commands.
  • Many settings can take the wildcard character, *. This will be specified in the reference section for any settings where it is allowed.

    Note that this only serves to make the entered value a simple string search. E.g.
    forward_from_ip 1.2.3.*
    specifies a value starting with '1.2.3.' and ending in anything.

    Our simple string search does provide support for negative entries (these will only make sense to use on some settings). E.g.,
    forward_from_ip !1.2.3.4
    tells DSMTP to allow forwarding from any ip address that is not 1.2.3.4

    DMail's wildcards are not a 'grep' syntax, e.g. this is not valid,
    forward_from_ip 1.2.3.[234]*

  • In 2.8 versions and above, we have tried to make all ip address settings take a value range. An example of the syntax for this is,
    forward_from_ip 1.2.3.2-4
    which equates to 1.2.3.2,1.2.3.3,1.2.3.4

    You should not assume that a setting takes this syntax until you have tested it. Please contact, DMail Support if you would like confirmation on a setting.

NOTE : If you have modified a dmail.conf setting which is relevant to both DPOP and DSMTP, it is necessary to reload both servers individually with their reload configuration file commands, e.g. tellsmtp reload and tellpop reload. DMAdmin will do this automatically.

You can also use the DMAdmin GUI program to change configuration settings. It will make each of the servers reload the config file automatically after any changes are made.



Specifying a different configuration file

The DMail configuration file is dmail.conf by default, and is found in your system directory, e.g.
/etc/dmail.conf (UNIX based platforms)
\winnt\system32\dmail.conf (Windows NT)
\windows\system32\dmail.conf (Windows 95/98)

To specify a different configuration file for DPOP on startup use:

DPOP -i another/path/fred.conf

or to specify a different configuration file for DSMTP on startup use:

DSMTP -i another/path/fred.conf

 



# and #include

Within dmail.conf you can put a hash symbol, '#', at the start of any line that you want the DMail servers to disregard. I.e. the # symbol can be used for comments.

Note: Settings should be on a line by themselves. So you should NOT put comments on the end of lines that are settings! e.g. This is NOT allowed,
dsmtp_path /usr/local/dmail #path for DSMTP
but the following two lines are,
#path for DSMTP
dsmtp_path /usr/local/dmail

We realise that this can be annoying, and in general you will get away with it, but unfortunately there are a few settings where it matters.

You can also use the hash symbol to include a file into the dmail.conf file, E.g.
#include /etc/domain2_forward_rules
will make DSMTP and DPOP open up the file, /etc/domain2_forward_rules, and read the lines from within it as if they were in dmail.conf itself.

NB: In versions prior to 2.7 versions you cannot put settings in a #include file that DPOP needs to see, as older versions of DPOP ignore such #include lines.

NB: IMAPD needs to read your config file "dmail.conf" for every new connection. By default it ignores #include lines as it could take too long to read them all. You can force IMAPD to follow these using the setting "imapd_include_level". This defaults to 0, and specifies how many #include levels to follow. For example you may add

imapd_include_level 1
to the start of dmail.conf to tell IMAPD to follow #include's, specified in dmail.conf, but ignore #include's within the included files. Following #include's is only supported in IMAPD 4.3.3q or later. For further information see imapd.htm.