The DSMTP configuration settings:

Most configuration options for DSMTP are held in the DMAIL configuration
file, which is dmail.conf by default.
To specify a different configuration file for DSMTP on startup, use

          dsmtp -i another/path/thing.conf

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 DSMTP 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. Any line starting with a hash (#) character is
ignored. Alternatively the various setup wizards within DMail Manager can
be used to modify the configuration file for you.

As some of the information stored in the configuration file may be
sensitive it should normally not have world read access. (The password for
limiting tellmail manager settings may be stored there) The location for
this file is system dependent but typical values are:

   * for most Unix variations
        o /etc/dmail.conf

     for Windows 95 and NT

        o C:\winnt\system32\dmail.conf

The following settings in dmail.conf are recognised by DSMTP other settigs
in dmail.conf are for DPOP. Unknown settings will generate warning
messages, known settings with invalid parameters will generate error
messages and will be ignored. Unless otherwise stated, each setting may
only occur once. They will all be described in detail somewhere below : -)
If a setting does not appear in the config file, the default value will be
used.

---------------------------------------------------------------------------

Compulsory settings: If omitted, DSMTP may function unpredictably, or not
at all.

authent_method   sets the method used for user/password lookups
host_domain     adds a domain name to the list of domains to be recognised
as being local
dsmtp_path       specifies the path dmail was installed to
dns_host         hostname for dns lookups
drop_path        specifies the directory to use for email dropfiles
sysadmin         the email address of the system administrator for dmail
work_path        specifies the path for dmail's working files

---------------------------------------------------------------------------

Optional settings: These settings may be omitted, and all have reasonable
defaults.

authent_number   specifies how many authentication processes to run
(external authentication only)
authent_process  specifies the executable to use for external
authentication (if needed)
bomb_dec         specifies how much to decrement the entries in the
mail-bomb cache by
bomb_dir         specifies which directory mail-bomb messages are to be
stored in
bomb_entries     specifies how many entries to store in the mail-bomb
detection cache
bomb_max         specifies dmail's tolerance for detecting a potential
mail-bomb
dns_timeout      specifies how long dmail should wait on a dns lookup
dwatch_path      specifies path for dmail.pid file and other dwatch
information
file_alias       specifies where dmail is to look for user alias
information
hash_spool       specifies which method dmail is to use for dropfile
directory hashing
log_flush        specifies whether or not to use a flushing log file
log_level        specifies how much information to output to the logfile
log_path         specifies where the dmail logfile is to go
lookup_names     specifies whether or not dmail should do name lookups
max_msgsize      specifies the maximum message size dmail may accept
max_queue        specifies the maximum number of tasks to read in at any
one time
max_retry        specifies how many times dmail tries to deliver a message
before giving up
min_space        specifies the minimum diskspace dmail needs to operate
quiet            tells dmail to direct minimal output to stdout
remind_timeout   specifies the minimum time between critical error emails
robot_try        specifies how long dmail should try to give input to a
robot
robot_wait       specifies how long dmail should wait before killing a
robot
smtp_port        sets the port that dmail will listen for smtp connections
on
tcp_timeout      specifies how long dmail should wait for a response before
giving up
warn_user        specifies when dmail is to warn the sender of a retried
delivery

---------------------------------------------------------------------------

Multiple entry settings: These settings may occur more than once.

alt_drop_path    specifies an alternative dropfile path for a particular
domain
dmail_domain     adds a domain name to the list of domains to be recognised
as being local
dns_host         tells dmail where to look for dns lookups
forward          creates a forwarding rule for all incoming mail
gateway          creates a gateway type rule for all incoming mail

---------------------------------------------------------------------------

authent_method <method>
    This setting specifies which type of user authentication DMail is to
use. <method> must be one of the following strings:

        netwin
                            Tells DMail to use netwins own authentication
method, normally only used for testing..
        unix_user
                            Tells DMail to use the standard unix user
lookup.
        nt_user
                            Tells DMail to use the standard Windows NT user
lookup.
        external
                            Tells DMail to use an external process for user
lookups.

    DMail only uses these lookups to retrieve the dropfile pathname, and
verify that the user exists. All methods except "external" will use the
pathname specified by drop_path. If the external process returns "config"
as its dropfile path, the drop_path setting will also be used (along with
any directory hashing). Otherwise, all directory hashing must be done by
the process itself. See the DPOP documentation for more details on how the
external authentication process must behave. If the "External" method is
used, the authent_process setting must also be used, the authent_number
setting may be used as well. The default is unix_user on unix and nt_user
on NT.
Example:

authent_method unix_user

---------------------------------------------------------------------------

authent_number <number>
    This setting tells DMail how many external authentication processes to
run upon startup. It has no effect unless authent_method is "external".
This number should be set depending on how fast the external program
operates, and how many clients are expected to be connected at any one
time. Unless the external program is very slow and/or a great number of
simultaneous connection are expected, there is no need for <number> to be
greater than about 2, which is the default.
Example:

authent_number 78

---------------------------------------------------------------------------

alt_drop_path <domain> <pathname>
    This setting specifies an alternative path to use for the dropfiles of
messages whose destination is <domain>. The <domain> parameter may contain
the wildcard character '*'. The path named by the pathname parameter must
exist. This setting will be ignored if authent_method is set to external.
This setting can used any number of times. This setting will be ignored
unless the <domain> parameter is specified as being local by using the
dmail_domain setting. The last applicable setting will be used.
Example:

alt_drop_path *.spammers.com /etc/trash/

---------------------------------------------------------------------------

authent_process <executable>
    This setting is used in conjunction with the authent_method setting.
When the "external" method is used, the <executable> parameter is used to
determine the name and location of the program to be used for external user
authentication. It must include the full pathname and filename of the
program. If no parameter is given, the setting is ignored, and DMail will
run as if the setting "authent_method netwin" had been used. See DPOP
documentation for details of how an external_authentication process should
work. An example authent.c program is supplied with the DMail distribution
set.
Example:

authent_process c:\mail\authent.exe

---------------------------------------------------------------------------

bomb_dec <number>

This setting is an extension to the bomb_max setting. It is used for
catching particularly devious mail_bombs which arrive over an extended
period.  The setting tells DMail how thoroughly it should clean up its
sender-recipient cache. Once an hour, DMail goes through the cache and
subtracts <number> from each counter (the entry will not be removed, even
if the counter becomes 0). Under most circumstances, the <number> parameter
should be set to be the same as the bomb_max setting. This assumes that any
mail-bomb will take the form of a surge of messages in a short time. Some
particularly devious sorts might send one message every five minutes for a
day, which would still be a mail-bomb. If this is suspected to be
happening, setting <number> to be much lower would trap the incident.
Extreme care must be taken with this setting however, as DMail will not
deliver messages it thinks are mail-bombs, and it will only keep the last
10 it has received. Basically, if DMail receives bomb_max messages in
(bomb_max/bomb_dec) hours, it will trigger a mail-bomb alert. The default
value is 50.
Example: With bomb_max 50 if we want to define 50 messages in 5 hours as
bomb we set bomb_dec to 10 ( as 5 = 50/10 )

bomb_dec 10

---------------------------------------------------------------------------

bomb_dir <pathname>
    This setting tells DMail where to put rejected mail-bomb messages. A
maximum of bomb_max messages will be placed here, the last one being the
most recent. The default value is dmail_work.
Example:

bomb_dir /dev/null

---------------------------------------------------------------------------

bomb_entries <number>
    This setting tells DMail how many sender-recipient pairs to cache for
mail-bomb detection. Every time DMail receives a message to be delivered
locally, it stores the sender-recipient pair. If the pair is already
present, it increments the associated counter. If there are <number>
entries already in the cache, DMail finds one with a low count and deletes
it to make room for the new one. The larger this setting is, the more
likely DMail is to detect a mail bomb. Performance degradation may occur if
it is made too large. The default value is 2000.
Example:

bomb_entries 500

---------------------------------------------------------------------------

bomb_max <number>
    This setting defines what DMail is to call a mail-bomb. If more than
<number> messages are received for the same user, from the same source in a
one hour period DMail will alert the system administrator and intercept any
further messages with the same sender-recipient pair. These will be placed
in the directory specified by the bomb_dir setting. To disable this
feature, set <number> to something big, like 10000. The default value is
50.
Example:

bomb_max 20

---------------------------------------------------------------------------

host_domain <domain>
    This setting adds <domain> to a list of aliases for the machine running
DMail. Any checks on a message's destination for (amongst other things)
local delivery will also compare any names in this alias list with the
destination. The first dmail_domain entry in the config  file must be the
host machine's actual name. Any messages sent from, or generated by the
host machine will use this entry in the 'MAIL FROM' line to identify
itself. Except for the first entry, the <domain> parameter may contain the
wildcard character '*'. Any number of these settings may be used.
Example:

alias someone.else        #Any mail sent to a user at someone.else will be
delivered locally

alias *                   #Any mail sent anywhere will be delivered locally
(not very useful)

---------------------------------------------------------------------------

dsmtp_path <pathname>
    This is the DSMTP installation directory. It will contain the DSMTP
help files and utility executables. The work_path and log_path default to
here.
Example:

dsmtp_path c:\mail\dmail\

---------------------------------------------------------------------------

dns_host <ip number>
    This setting tells DSMTP where to look for DNS lookups. DSMTP will
attempt to connect to the machines specified in email messages by using
this setting for all DNS lookups, except for any that match those given by
the gateway setting. If more than one dns_host has been given, DSMTP will
go through them all until it gets a valid answer. This setting can be used
any number of times. There is no default.
Example:

dns_host 127.0.0.1

---------------------------------------------------------------------------

dns_timeout <time>
    This setting tells DSMTP how long to wait (in seconds) before giving up
on a DNS lookup. If <time> is set too low, DSMTP may record a lookup
failure where none occurred. Messages addressed to a domain whose lookup
failed are placed in the retry queue. Repeated failures will cause DSMTP to
bounce the message. If this appears to be happening too often, try adding
another DNS host to dmail.conf, or increasing the <time> parameter. The
default value is 10 seconds.
Example:

dns_timeout 20

---------------------------------------------------------------------------

drop_path <pathname>
    This setting sets the default directory for mail deliveries. The only
time this dierctory will not be used for mail deliveries is when an
external user authentication program (other than the one specifed by the
Netwin setting) is used. Even then, if the program returns "config" as its
drop directory, <pathname> will be used. If, for whatever reason,
<pathname> is used, DSMTP will perform any directory hashing specified by
the hash_spool setting before writing to the dropfile. The default is an
empty string.
Example:

drop_path /etc/spool/mail/

---------------------------------------------------------------------------

dwatch_path <pathname>
This setiing gives the directory for the dsmtp.pid file. This is written by
dmail on startup and removed on normal shutdown. It is used by dwatch,
which can restart dmail if necessary. See dwatch doucmentation for more
details. A file called dmail.wat will also be stored in the same directory
which contains information on how to restart dmail and how often before
giving up etc. The default dwatch_path is the dmail_path
Example:

dwatch_path /usr/local/dwatch

---------------------------------------------------------------------------

file_alias <filename>
    This setting tells DMail which file contains the user alias
information.  The <filename> parameter must include the full pathname and
the filename of the original alias file. DMail makes a copy of this file in
its working directory to use when doing user alias lookups.
Example:

file_alias /usr/aliases

---------------------------------------------------------------------------

forward <wildcard> <address>
    Any incoming message whose next destination is of the form
<user@domain>, and matches <wildcard> will be sent to <address> instead, so
long as <address> is valid. The <address> parameter must be of the form
user@domain (i.e. it must be a valid final destination). The comparisons
are done upon receiving the RCPT setting, so internally generated messages
(such as those generated by the forward or alias settings) will NOT be
checked. Any number of these settings may be used. All applicable forward
settingsettings will be applied. The '*' wildcard character may be used in
the <wildcard> parameter.
Example:

forward bgates@windows.com sjobs@apple.com     #This will send a copy of
all Bill's mail to Steve

forward *@* root@big.brother.com               #This will send a copy of
all incoming mail to root@bigbrother.com

---------------------------------------------------------------------------

gateway <domain> <ip> [return]
    This setting functions essentially as an instant dns lookup. If the
next destination of a message matches <domain>, and is not local, DMail
will not do a dns lookup on the destination. Instead, it will use the <ip>
parameter (which must be of the form w.x.y.z). This can be used to handle
fake domains, or force the message to take a particular route. If, for
instance, the host machine cannot access the outside world, it can send all
non-local messages on to a machine that can. (The <ip> parameter must not
refer to the host machine. The setting dmail_domain must be used instead.)
The optional [return] parameter, if present, will be added to the messages
reverse-path instead of the host machine's name. Any bounce messages will
then be sent via [return]. This may be used when the the machine pointed to
by <ip> knows the host machine by some other name (that being what goes in
the [return] parameter) instead of the host machine's actual name (see
dmail_domain for information on how to set this). The last applicable
gateway setting will be used. The <domain> parameter may include the
wilcard character '*'. Any number of these settings may be used.
Example:

gateway fake.name 1.2.3.4       #Send all messages to 1.2.3.4 that are
addressed to fake.name

gateway * 1.2.3.4               #Send all non-local messages to 1.2.3.4

---------------------------------------------------------------------------

hash_spool <number>
    The setting tells DMail what kind of directory hashing it is to use for
the dropfiles. The <number> parameter identifies which hashing method to
use. There are currently three options:

        0: No hashing
        1: Sum of the first four characters, modulo 26 ( /a/user to
/z/user)
        2: The first two characters (/u/s/user)

    The directories generated by the hashing method are appended to the
pathname specified by the drop_path setting. If they don't exist, DMail
creates them. The method DMail uses MUST be the same as that used by the
POP3 server it is working with. The default is "0".
Example:

hash_spool 1

---------------------------------------------------------------------------


log_flush <switch>
    This setting tells DMail whether or not it is to use a flushing
logfile. If the <switch> parameter is set to "false", the logfile is opened
upon startup, and only closes when the program terminates normally.
Otherwise, the logfile is opened and closed every time a line is written to
it. This is the option to use if you are expecting DMail to crash : )
Example:

log_flush true

---------------------------------------------------------------------------

log_level <level>
    This setting determines how much information should be written to the
logfile. There are three levels: error, info, debug. Error is the default
setting.

   * error: the only information written will be errors, warnings, socket
     read and write information and minimal progress information.
   * info: as well as the error information, this setting gives much more
     progress information, as well as file open and close calls.
   * debug: as well as the info information, this setting gives a whole lot
     of internal status information, function calls...all sorts of stuff.

If DMail is behaving unusually, run it with the verbose option first. This
should give enough information to reveal whether or not it's a problem with
the config file. If all else fails, run it with the debug option. If DMail
is crashing or doing very peculiar things, the only things Netwin support
will have to go on are the config file and the logfile. The default setting
is normal.
Example:

log_level debug

---------------------------------------------------------------------------

log_path <pathname>
    This settingsetting specifies where the logfile dmail.log is to be
created. This can be absolutely anywhere, so long as it is a full pathname.
By default, the logfile path is the same as the work path.
Example:

log_path /etc/logs/

---------------------------------------------------------------------------

lookup_names <switch>
    This setting forces DMail to do a revers dns lookup for the name of the
IP address associated with a new connection. This can be slow! It is
disabled unless <switch> is "true". Default is false.
Example:

lookup_names true

---------------------------------------------------------------------------

max_msgsize <number>
    This setting tells DMail the maximum size a message is allowed to be
for DMail to accept it. This applies to all messages, not just those being
delivered locally. If an incoming message exceeds <number> kbytes, any
further data will be discarded. Once the message has finished, DMail will
notify both the sender and the recipient that the message could not be
delivered, with the first 20 lines from the body of the message appended.
The default is 2048 (that's 2 megabytes).
Example:

max_msgsize 10240

---------------------------------------------------------------------------

max_queue <number>
    This setting tells DMail when to stop reading in message delivery
tasks. Once DMail has run out of things to do, it scans its working
directory for new tasks, and reads them in. Once it has read in <number>
tasks, it will stop and process them. This option is primarily used for
testing, and should not be changed.

---------------------------------------------------------------------------

max_retry <number>
    This setting tells DMail how many times it should try to send a message
before giving up. The nth attempt to send the message will occur 6*(2^n)
minutes after DMail first received it. A value of 0 will mean that DMail
will not attempt to send a message more than once. The default value is 8
(Which means that DMail will give up after just over a day).
Example:

max_retry 10

---------------------------------------------------------------------------

min_space <number>
    This setting specifies the minimum amount of diskspace DMail must have
to work. If the available diskspace falls below <number> megabytes, it will
send an EMail to the system administrator alerting them to the problem, and
then it will refuse all connections. As soon as more diskspace is made
available, DMail will accept connections. Because of this, it is important
that the problem be addressed as soon as possible. The default is 10.
Example:

min_space 5

---------------------------------------------------------------------------

quiet <switch>
    This setting tells DMail to send a minimal amout of output to stdout
(such as errors, and brief info on what it's up to). The information being
logged to the log file remains unchanged. The <flag> parameter must be set
to "true" to activate this option. The default setting is "true".
Example:

quiet true

---------------------------------------------------------------------------

remind_timeout <number>
    This setting specifies how long DMail should wait between events before
alerting the system administrator of a recurring problem (see sysadmin).
DMail will not send an EMail if the event occurrs within <number> seconds
of the last one. This means that a frequently occurring problem will only
generate one error message. The default is 3600 (or one hour).
Example:

remind_timeout 7200

---------------------------------------------------------------------------

robot_try <time>
    This setting tells DMail how long it ought to keep trying to send input
to a robot if it cannot send the whole message immediately. It will
continue to try to send the robot more data until <time> seconds have
elasped since the last successful write. DMail will then give up trying to
send more data, but will wait until the time specified by robot_wait before
killing it. If the <time> parameter is larger than that specified by
robot_wait, the robot will be killed regardless. The <time> parameter is in
seconds, with the default being 120 (or 2 minutes).
Example:

robot_try 10

---------------------------------------------------------------------------

robot_wait <time>
    This setting tells DMail how long to wait after sending the message
data to a robot before killing it. If the robot is still active after this
time, DMail assumes that it has either hung, or is stuck in a loop, and
terminates it. It can be set to any integer (negative numbers will have the
same effect as 0, i.e. the robot will be killed immediately). Because there
is no standard for robot implementation, they cannot be reliably assumed to
terminate under all circumstances, so there is no option to switch off
robot killing. The <time> parameter is in seconds, with the default being
600 (or 10 minutes).
Example:

robot_wait 10

---------------------------------------------------------------------------

smtp_port <number>
    If used, this setting sets the port number which DMail will listen on
to port number  <number>. Any smtp clients wishing to talk to DMail
(including tellmail) must use this port. tellmail will look in dmail's
default config file unless told otherwise with a -i settingline switch with
the same format as that for dmail. The default value is 25.
Example:

smtp_port 1025

---------------------------------------------------------------------------

sysadmin <email address>
    This setting tells DMail who to contact if something terrible happens.
Currently, those things are:

                When DMail detects a mail-bomb incident
                When DMail runs out of disk space (as specified by the
min_space setting)

It highly recommended that this setting be included. Especially in the case
of a disk full error, when DMail will cease to accept any incoming
connections, it is most important that the problem be attended to. There is
no default value.
Example:

sysadmin someone@somewhere.mil

---------------------------------------------------------------------------

tcp_timeout <number>
    This setting specifies how long DMail should wait for a response on a
TCP/IP port before giving up. This only applies when DMail is actually
expecting data. Once <number> seconds have elapsed, DMail closes the
channel and discards the half-complete message (if receiving), or queues it
for another try (if sending). Setting <number> to something small could
have unpredictable results. The default value is 300 (or five minutes).
Example:

tcp_timeout 120

---------------------------------------------------------------------------

warn_user <number>
    This setting tells DMail when to alert the sender of a message that it
is having trouble delivering the message. The <number> parameter is in
retries, so the formula given for max_retry applies. If the <number>
parameter is larger than max_retry, DMail will only notify the user if it
completely failed to deliver the message. The default value is 4 (which
means the user will be alerted after roughtly 90 minutes).
Example:

warn_user 5

---------------------------------------------------------------------------

work_path <pathname>
    This setting tells DMail where to put all of its working files,
temporary files, data files etc. The logfile dmail.log is also placed here
by default. The default work_path is dmail_path
Example:

work_path c:\mail\dmail\work\

---------------------------------------------------------------------------


