The DMail Email
This manual describes DPOP (a POP3 mail server), DSMTP (an SMTP mail server), and DList (an
email list server). Together they provide a complete email server solution for small and
large internet and intranet service providers.
DPOP is a highly efficient scaleable POP3 mail server which operates as
a single process, and can handle a large number of concurrent email client sessions. It is
a drop-in replacement for popper and other POP3 servers. It provides an efficient and
scaleable solution for email providers. It places no unnecessary limits on concurrent
connections, though smaller systems may opt to limit concurrent connections to a few hundred.
The total number of user or client email accounts may be limited by the type of license.
(for example <5, <50, <500 or unlimited versions are available) Systems with
500,000 client accounts and many hundreds of concurrent connections are quite achievable,
even with relatively modest hardware.
DSMTP is an efficient and scalable SMTP mail delivery server. It
operates as a single process and can handle a large number of concurrent connections. It
is a drop in replacement for sendmail. It works with DPOP in order to provide a complete email
solution. When a user sends email, their email client package connects to an SMTP server
(DSMTP). If the email is for a local user, DSMTP writes directly to the dropfile, if the
email is for a remote site then DPOP will connect and transfer the email as required.
DList is an easy to use and efficient email list server. It allows
mailing lists to be easily setup and maintained. It can be entirely controlled via email.
A Web based manager for the DList administrator and email list moderators will be
Table of Contents:
Internet Mail Servers
The provision of internet email depends on a number of software
components working together. These days, most email users access email by running an email
client application such as Eudora or Pegasus mail on a personal computer. This client
application talks to two server applications which are normally located on a host machine
which is run by an internet service provider or local computer service group.
In order to provide internet email to computer users, three applications must work
together - the client, the collection server and the delivery server. The collection server
is what an email client connects to in order to collect or read the user's email. The
delivery server is what the client connects to when it wants to send a message.
An email client sends outgoing mail to an SMTP server which transfers
the mail to other SMTP servers and eventually one of them stores it on the machine from
which the client will read it. DSMTP is Netwin's SMTP server product. It would often
replace applications such as sendmail.
The most common collection servers use the POP or POP3 protocol when
interacting with the client. Such a server is referred to as a POP server. DPOP is
Netwin's POP3 server product. It would often replace applications such as popper, or
A fourth optional component of most email systems is an email list
server. Email lists are lists of email users to whom you can send messages as a group. For
example, you might have a group of users who are all part of the social club organizing committee.
When discussing the organization of social events via email, you need to be able to send
messages to all of the committee members. This is sometimes handled by a simple list of
email addresses stored on the users PC within the email client software. This is very
inefficient in that the same message is sent repeatedly from the client PC to the host
server and then perhaps from there to various other sites. A more efficient method is to
have a list server running alongside the mail server. It accepts messages for a pseudo
user named social_cmty, for example, and passes them on to all users listed on its social
committee list. This avoids the need to repeatedly send messages, and avoids the need for
the users to all maintain a list of people on the committee. It can also provide other
features such as an archive of emails to the list, a set of shared files which list
members can download etc. DList is Netwin's email list server product. It would often
replace such applications as majordomo.
Traditionally, the various parts of the email server family, particularly
on Unix platforms, have not been designed with efficiency in mind. Email was traditionally
short text messages, and the number of users small. Each connection was a sort of pseudo
login starting a new process up and interacting with the client software. With much larger
numbers of users and larger email messages which often contain file and image attachments,
more efficient systems are required. The management of the components of an email server
system, and the gathering of usage statistics were also problematic. The setup and
maintenance of mailing lists was often sufficiently complex as to deter many small groups
of users from using real mail lists. The NetWin suite of mail products; DSMTP, DPOP and
DList were designed to overcome these limitations, and to allow the hosting of complete
mail systems on quite modest hardware. The ease of management of email servers was also
paramount in the design.
Controlling the DSMTP/DPOP
Following installation, various options and settings can be adjusted to
tailor DSMTP and DPOP to your specific requirements. You may also want to check on the
current status of the servers in order to see how many connections are in use etc.
In addition to the settings in the configuration file, command line utilities Tellpop and Tellsmtp are provided for such management tasks on each of
Of special note are the 'reload' commands, on both utilities, which cause the server
specific to that utility to reload the configuration file without having to restart, e.g.
'tellpop reload' makes DPOP reload the configuration file.
Alternatively, both of the configuration settings and the commands to the server
can be managed with the DMAdmin utility, which also controls all three servers.
DMAdmin is a graphical user interface for controlling DSMTP/DPOP/DList
and their configuration settings. It runs on the Windows 95 or Windows NT platform. It is
automatically installed and then started by DMSetup on these platforms. It can also be
used to control a Unix version of DMail/DPOP
Tellsmtp Command Line Utility
A command line application. This runs on all systems and provides a
quick and simple method of controlling and monitoring DSMTP.
Tellpop Command Line Utility
A command line application. This runs on all systems and provides a
quick and simple method of controlling and monitoring DPOP.
NOTE 1: Initial installation and setup of DSMTP and DPOP is best handled
by the DMSetup wizard. Tellpop, Tellsmtp and DMAdmin are for later fine tuning etc.
NOTE 2: Modifying a dmail.conf setting which is relevant to both DPOP
and DSMTP requires you to reload both servers individually with
their reload configuration file commands, e.g. tellsmtp reload and tellpop
reload. DMAdmin will do this automatically.
Controlling the DList
Following installation, various DList
options and settings can be adjusted in order to tailor DList to your specific requirements.
You may also want to create additional mailing lists and check on the status and use of
current lists. To perform such tasks you edit the configuration files appropriate to
DList, dmail.conf and lists.dat or use the DMAdmin utility, which will do the editing for
you. Simple administration of lists, e.g. subscribing someone to a list, can also be
carried out by sending messages to a list request address,see the DList mail commands page, in particular the Note to Moderators.
DMAdmin is a graphical user interface (GUI) for controlling
DSMTP/DPOP/DList and their configuration settings. It runs on the Windows 95 or Windows NT
platform. It is automatically installed and then started by DMSetup on these platforms. It
can also be used to control a Unix version of
DMail/DPOP remotely. See DMAdmin:
for more detail.
The DList list server settings are held in dmail.conf, some are in
common with the other two servers, e.g. log_path, but those given in the summary list DList settings in
dmail.conf are specific to DList only.
Management settings for who may be a moderator, who may join a list and
other list specific settings are edited in the lists.dat file.
NOTE 1: All settings can be changed by directly editing the DList settings in
dmail.conf or the lists.dat
file in a text editor. Alternatively, the DMAdmin GUI server management utility will do the
editing for you.
NOTE 2: Initial installation and setup of DList is best handled by the DMSetup wizard. DMAdmin and
direct editing are normally used for later fine tuning and creation/modification of
DMAdmin is a graphical user interface for controlling DSMTP, DPOP, DList
and their configuration settings. This will be available for Windows 95 and Windows NT, but
can also be used to control Unix versions remotely.
Copy dmadmin.exe and dmail.hlp to your PC using a 'binary' transfer
mode. Install it in a DMail subdirectory and then add it to your button bar in the usual
way. The default directory should be set to c:\dmail or wherever you installed it on your
Using DMAdmin remotely
First you must set the DMail administration password. In order to do this, type in
on the actual machine running DMail:
tellpop password xxxxxx (replace xxxxxx with a
Then in DMAdmin you can select your mail server as the host to
administer and type in the same password. Then it will be able to control your mail server
Logging of information and error messages:
Various informational messages are logged during the normal operation of
the DSMTP, DPOP and DList servers. These events logged include such things as server
startup, creation of work files , rejection of connection request etc. These messages
appear in separate log files for each application; dpop.log for DPOP, dsmtp.log for DSMTP
and dlist.log for DList
When the log file exceeds a preset maximum size it is renamed and a new
file is created. For example, dpop.log becomes dpop1.log This is referred to as log file
rotation. For DPOP, four old log files are kept - dpop4.log is the oldest and dpop.log is the
current log file.
The path for the log file is normally the same as the work directory but
can also be set individually in the configuration file using the log_path setting. For
In addition, error, warning and debug messages can optionally be stored
in the log file. The level of information logged is set by the log_level setting in the
configuration file.The available settings are shown in the table below:
||only logs error messages
||logs warning messages and error messages
||logs informational messages and error messages
||logs debugging messages, informational messages and error messages
The default setting is info. The log_level setting may
also be changed temporarily using the Tellpop or Tellsmtp log_level commands:
e.g. tellpop log_level info
The logging level will revert when the system is restarted or when the
configuration file is reloaded.
Controlling client access to
DPOP provides a variety of methods for limiting access from clients
trying to read mail.
First the client must use a valid username. This is limited by a
wildcard list of valid names in the configuration file.
There must be a drop file for that user.
The username/password combination must be valid. This can mean a valid
Unix or NT user/password. A variety of other methods for checking this combination are
provided for and controlled by settings in the configuration file. An external
authentication routine can also be used, see authenticate settings in configuration file.
The from address ip_name or number can be limited using wildcard lists
in the configuration file
By using an external
authentication process other controls may be imposed, such as limiting access from
certain classes of users or users of certain machines to specific times of day. For
example, student users on laboratory machines may not be allowed to read mail during work
hours. An example external authentication program is provided with DPOP. See the next
section for details.
External authentication of users
DPOP allows the use of an external application for authenticating client
by setting the Authentication method in the configuration file to
To set the authentication method to external, set the
following two settings in the dmail.conf file,
||# sets up external as
||# uses program myauth.exe
as authentication process
Plus some other settings you may require,
External authentication can be used for adding special connection
restrictions, for example, allowing email from laboratory computers only outside working
hours. A sample authentication program is supplied with the distribution set, the C code
for it is shown on this page, nwauth.c.
On NT, use Visual C to build an authent process as pipes don't appear to work with
some versions of Borland C.
You must also provide a path to the executable which you want to use. Let us
assume that you wish to use an application called myauth.exe for authentication. The
application myauth.exe must read commands from standard in and write replies to standard
out. The commands and replies defined allow the same system to be used by both DPOP and
DSMTP. Note some parts of the reply are not needed for DPOP.
The only three input commands are:
The replies are
+OK username drop_file_path
+OK username drop_file_path
-ERR reason (less than 100 bytes)
UID can be given as 0 on systems which don't require a uid. It
cannot be left out.
The exit input tells the external authentication program to shutdown.
username: The username that the user used to connect to DMail. DMail
adds on the @domain to the username. The domain name that it uses is either the domain
name of the machine which DPOP is running on, or the domain name returned by matching the virtual
domain line, vdomain, in the configuration file.
password: The username that the user used to connect to DMail
fromIPaddress: The IP address from which the user connected.
The lookup input is as per the check input. It is used when the drop
file path is needed but the user is not connecting, so the password does not need to be
Returned if the user lookup has been successful. It can have the
following information about the user attached.
username: As per above.
drop_file_path: Full path to the dropfile, including filename, for the
uid: User ID, can be a number or a name or zero or left out. If it is a
number, Unix uses that uid number when it checks the ownership of the drop file. If it is a
name, then DPOP/DSMTP looks up that name in the Unix password file and uses the
corresponding uid. If uid is the number 0 or is left blank, the drop file ownership
is not checked.
forward: An email address. If returned, DSMTP should forward
messages to the given address rather than delivering them here.(not used by DPOP)
The error reply, giving a reason, which is less than 100 bytes in
- The @domain is only sent by DPOP if the configuration file contains line:
- The returned drop file path must contain the full path and filename of
the drop file for that user.
- If any directory hashing is required it must be included in the returned
- The forward field is not used by DPOP (only by DSMTP) and may be left
blank if not required.
- If 'forward' is returned then uid must also be returned.
- If the normal drop file path specified in the configuration file is to be
used then the drop file path in the response may be replaced by the single word config
- The uid is used to set/check user ownership of drop files.
- The uid returned may be numeric or an alphanumeric username.
- If no uid checking/setting for drop files is to be used then the uid
returned may be blank.
- The @domain passed as part or the username can often be ignored. It is to
allow for the use of virtual
domains where a single DPOP server responds to connections to several IP addresses. In
this case, two users with the same username but who read their mail from different domains
may connect to DPOP. See virtual
domains for more details.
Depending on delays and the speed of the authentication process, it may
be advantageous to run multiple copies of the authentication process. This can be set in
the configuration file by adding the line
# To tell DPOP to run five copies
all requests will be then be queued to these five processes
It is often appropriate to cache these authentication requests. DPOP
will optionally cache the responses. The default is to cache the last 1000 successful
requests with a time-out of 12 hours on entries for individual records. Failing
connections are always checked on real data as well as the cache, so a changed password is
immediately recognized. The number of entries to be cached can be set in the configuration
file by adding the line:
authent_cache 3000 # To tell DPOP
to cache 3000 entries
Note: the DPOP process size will grow with cache usage at about 100 bytes
per cache entry, so a 10,000 user cache will add about 1 megabyte to the process size.
Virtual Domains (Added in version 1.08)
An ISP may wish to provide email server support for several distinct groups of users
who collect their email from supposedly different mail servers. For example, there may be
two distinct users both with username fred, let us call them fred1 and fred2
Both mail.domain.one and mail.domain.two point to a single machine with multiple IP
numbers running one copy of DPOP. In order to handle these two 'virtual-domains' and not
mix up fred1 and fred2 even though they have the same username, DPOP must keep them
separate. When a connection is made to DPOP, it checks the IP number that the connection
was made to. This is then matched against entries in the dmail.conf file of the form;
vdomain Btwo 184.108.40.206 mail.domain.one /var/spool/mail/B
vdomain C 220.127.116.11 mail.domain.two /var/spool/mail/domaintwo
The entries in these virtual domain lines are as follows:
- Prefix string used to identify this domain
- IP number users reading from this domain will connect to
- domain name which translates to number above
- path for drop files for users of this domain.
These are used to enable the username@domain
passed to the authentication process to contain enough information to allow the two users
to be distinguished and assigned different drop file paths and passwords.
From the above it might appear that virtual domains can only be supported when an
external authentication process is used, as two different passwords for user fred are
required. This is not the case, virtual domains can also be supported using normal Unix
user/passwords by using the following scheme:
- User fred from domain one is known as A_fred and user fred from domain B is known as
B_fred. The usernames and uid's use the form A_fred and B_fred in order to keep them separate. The
user does not need to change the email client settings, as the translation from fred to
A_fred is done by DPOP. The vdomain prefix can be a string rather than a single letter.
- Connections to IP numbers not listed in vdomain records will use the normal drop_path
form and will have normal usernames, dropfile and binfile names.
- The drop file path for for each virtual domain is specified in the vdomain record
- If the a bin path has been specified for bin files, this is used for all domains BUT a
prefix of A_ B_ etc. is used to distinguish files for users from different virtual
- If bin files are stored in the same place as drop files then the drop paths from vdomain
records are used.
An example: As virtual domains can be used in a number of different ways, a simple
concrete example is probably useful in understanding the use of virtual domains. Imagine
the scenario below:
- You currently have a DPOP server running on machine my.server.domain at ip address
- Your email clients connect using addresses such as email@example.com
- Their drop files are stored in a directory /var/spool/mail
- You provide no virtual domain support
- You use simple Unix user/passwords for authentication
Then you are asked to take over (or add) email server support for a second group of
users who used to get their email from johns server using addresses such as firstname.lastname@example.org What do you need to do
to provide a service for this second group:
Suffix Based Virtual Domains
As an alternative to having multiple IP numbers, virtual domains can be setup by asking
users of the virtual domain to connect using email usernames of the form Fred/jds. This
form of virtual domains can be used with no changes to the POP server, but of course
inconveniences all the users who have to change their client software settings to connect
as username/suffix instead of just username.
No settings are needed in DPOP to handle this form of virtual domains, but it is
sometimes convenient to still use vdomain lines as follows:
Mappings from usernames of the form name/domainsuffix can also be handled by the use of
vdomain records, where the IP number is replaced by /domainsuffix. For example, we might
vdomain J /jds johns.server.domain /var/spool/mail/johnsusers
This config setting determines how the drop file name is constructed when virtual
domains are being used. Drop_prefix can be set to true or false. The default is true. When
this setting is true, the drop file name will include the virtual domain prefix. For
example, consider the case when the following vdomain line is being used and a user fred is
connecting to abc.com which maps to ip number 18.104.22.168
- vdomain abc 22.214.171.124 abc.com /mail/abc_com
If drop_prefix is true, the drop file used will be /mail/abc_com/abc_fred
while if drop_prefix is false, the drop file used will be /mail/abc_com/fred
The LDAP authentication module (not yet
available) will also provide support for virtual domains.
Multiple IP numbers on a single machine:
It is fairly easy to add multiple IP numbers for a single machine, up to 255 per
interface is fairly straightforward. 1024 is usually possible with minor patches. The
exact method varies from one form of Unix to another see http://www.nethelp.no/net/vif/readme.html
for more information.
As an example on Linux you would do the following:
su - root
ifconfig eth0:2 9126.96.36.199 up
to add a second ip number 9188.8.131.52. The number :2 can be anything between :1 and
Should I use username suffixes or multiple IP numbers for virtual domain
Multiple IP numbers has the advantage that the users do not need to change their
username setting in their email client packages. Username suffixes save you having to
configure your server machine to respond to multiple ip numbers. The two schemes work as
If a vdomain setting line has an IP number like 184.108.40.206 in it, DPOP checks what ip
number the user was connecting too and does stuff based on matching vdomain lines. If the
vdomain setting line has a suffix string rather than an IP number in the same place ( e.g.
/xusers) then when users connect to DPOP and send user fred/xusers DPOP picks up the
/xusers and uses that to match a vdomain line. The suffix is stripped off and the prefix
is added just as it would be for an ip based vdomain. From then on, the two systems are the
same. The other question is what do we end up with as a drop file name?
Consider the two vdomain lines:
- vdomain abc 220.127.116.11 xdomain.com /var/spool/mail/xdomain
- vdomain abc /xdom xdomain.com /var/spool/mail/xdomain
If a user connects to 18.104.22.168 or uses a username fred/xdom
Then the Unix username used will be
and the drop file used will be
Some mail transport systems find it easier to deliver to a drop file
To allow for this another setting has been added
if this setting is true, DPOP will use the second form for the drop file name.
Gathering connection statistics
DPOP can optionally provide a per connection log of client usage
statistics for use in charging clients etc. In order to disable this feature, modify the
configuration file to include a blank path for the stats_path:
stats_path # To disable logging of connection statistics for charging
A new statistics file is produced each day with a filename
For example, for the first of January the file name will be
The statistics file is a printable text file containing one line per
connection with the six fields separated by spaces:
- start time of connection in seconds
- end time of connection in seconds
- from host name
- bytes transferred
- number of messages transferred
The command: tellpop
stats can be used to summarize the information from a collection of .stats files. It
will produce a one line summary for each user, giving number of connections, number of
messages, average time between connections etc. See Tellpop commands section for more details.
The performance of DPOP will obviously be effected by the type of mail
messages being received by your users and the frequency of connections etc. However, some
benchmark figures taken from test configurations we have run with user simulation software
are as follows:
Two machines were tested with similar results:
The first machine was a 133MHz Pentium laptop running windows NT with
32meg of RAM and a thinwire network connection: The second machine was a 66MHz 486 running
Linux with 20meg of RAM.
- With 86 concurrent connections and 5000 mail accounts, the process is
<2meg and completes (connect/check drop file/quit) in an average of 0.1 seconds for
empty drop files.
- Processing a drop file with 3,000 ten line messages takes about 3
- Retrieving large messages is non blocking, so does not effect response to
- DPOP processes messages a line at a time, so large messages do not effect
the process size.
- Total user accounts will effect process size, but 200,000 accounts will
add less than 4 megabytes to the process size.
- Caching of authentication will add to process size, but only about 1
megabyte for every 10,000 users cached
DMail Free Trial
You may try out the DMail package free of charge for one month by
downloading the free trial version from our web site. It includes the DSMTP, DPOP and
DList servers, management utilities and full documentation. During this trial, email
support is provided free of charge. If you decide to continue using DMail, you then need to
register your copy in order to receive a key to keep it working. This ensures that you do not waste the
effort involved in configuring DSMTP, DPOP and DList for your situation. Once you receive
your key you can continue using the DMail servers without any need to reinstall or modify
settings. Registration requests are normally sent by email, and a key is emailed to you
within two days of receipt of payment.
Download Trial Version
To generate the registration details to email or fax to NetWin, use the
tellsmtp register (or tellpop register if just DPOP is being used)
It will ask you a series of questions and then generates a register.txt
file which you can
We can be contacted in a number of ways:
DMail & DPOP Mailing
A mailing list for people interested in DPOP and the other
DMail servers. This can be used to exchange experiences with these products and, of course,
announcements on new features etc. will be posted to this list.
To join the DPOP mailing list, send an email message to email@example.com with a message
containing the line
You can then send messages to the list by sending to firstname.lastname@example.org
Other NetWin Products