Configuration Settings Specific to DSMTP:

This page details only those dmail.conf settings which apply specifically to DSMTP.
For more settings see: Settings Common to DPOP and DSMTP, Settings Specific to DPOP and Settings Specific to DList

Note: After modifying a DSMTP setting you should do a tellsmtp reload command or send a reload command to the DSMTP server using DMAdmin.

Compulsory settings:

(If omitted, DSMTP may function unpredictably, or not at all.)
host_domain NOW a COMMON setting to both DSMTP and DPOP
dsmtp_path Location of DSMTP executable (and default for many path settings).
sysadmin The email address of the system administrator and 'postmaster' for DSMTP.

Often Used Optional settings:

(These settings may be omitted, and all have reasonable defaults)

ban_ip   Specifies an IP address that DSMTP should not talk to.
ban_ip_except  Alows ip's to be exempted from the ban_ip list.
ban_mailfrom   Specifies patterns for banned mail from lines.
ban_rcptto   Specifies patterns for banned rcpt to lines.
bomb_dec   Mail Bomb; Specifies how much to decrement the entries in the mail-bomb cache by.
bomb_dir   Mail Bomb; Specifies which directory mail-bomb messages are to be stored in.
bomb_entries  Mail Bomb; Specifies how many entries to store in the mail-bomb detection cache.
bomb_exception_from  Mail Bomb; Specifies sender-based exception to mailbomb checking.
bomb_exception_ip  Mail Bomb; Specifies ip-based exception to mailbomb checking.
bomb_exception_to  Mail Bomb; Specifies recipient-based exception to mailbomb checking.
bomb_max   Mail Bomb; Specifies DSMTP's tolerance for detecting a potential mail-bomb.
dns_host          Set specific DNS servers to be used for domain lookups (instead of using system DNS settings).
dns_timeout  Specifies how long (in seconds) DSMTP should wait on a DNS lookup.
drop_max  Specifies how big DSMTP should let dropfiles get (in kbytes).
log_data  Specifies whether or not DSMTP should log the TCPIP data it gets.
max_msgsize  Specifies the maximum message size DSMTP may accept(in kbytes).
max_rcpts  Use to limit the number of recipients DSMTP should allow per message.
max_rcpt_except_ip  Allows ips's to be exempted from max_rcpts.
max_rcpts_session Use to limit the number of recipeints per session.
max_retrytime  Specifies the maximum time in hours to continue attempting (once every 2 hours) to deliver a message.
message_process  Specifies an executable to run for processing of every message.
message_process_action  Specifies what action to take based on return code of the program set in message_process.
msg_filter  Tells DSMTP to use a message filter (in specified file) on all incoming mail.
no_max_msgsize  Specifies addresses exempt from max_msgsize restrictions.
quiet  Tells DSMTP to direct minimal output to stdout
retry_interval This tells DMail how often to retry sending messages in the queue.
robot_try  Specifies how long DSMTP should try to give input to a robot before giving up (in seconds).
robot_wait  Specifies how long DSMTP should wait before killing a robot.
shell_prefix  Robot; tells DSMTP to use a prefix for autoresponder exec calls.
smtp_port  Allows you to alter to a non-standard value the port that DSMTP will listen for SMTP connections on.
tarpit_start  Anti-Spam; Number of Recipients before DSMTP should start responding slowly.
tarpit_except  Lists IP addresses which are exceptions to tarpit_start.
tcp_max  Specifies the maximum number of TCPIP channels that DSMTP listens on.
tcp_timeout  Specifies how long DSMTP should wait (in seconds) for a response before giving up on ALL TCPIP connections (except sendlog connections).
timezone  Tells DSMTP to fake its timezone info with this value.
use_forward_files  Used to stop DSMTP from checking for users' forward files.

Obscure Optional settings:

(These settings may be omitted, and all have reasonable defaults)

add_footer  Appends the given footers file if the envelope from matches the given domains.
alias_file  Specifies file where DSMTP is to look for user alias information.
alias_file_domainSpecifies file where DSMTP is to look for domain specific, user alias information.
alt_drop_path  Specifies an alternative dropfile path for a particular domain (use only when not using external authentication).
auth_allow  Sets various permissions for ESMTP/AUTH success.
auth_hide  Switches off the announcing of ESMTP AUTH under various conditions.
bounce_body  Specifies whether or not to include the message body in a Deliver Status Notification message (DSN).
bounce_maxlen  Specifies (if bounce_body is true) how much of the body (in kbytes) to include in a Deliver Status Notification.
cache_clear_file  Activates authent cache clearing when specified file is modified.
check_lwrusername   Allows control over what case DSMTP should do lookups in
domain_chroot  (UNIX) Robots; Enables chroot functionality for domains.
dotstuff_robot  Makes DSMTP dotstuff robots for backwards compatibility.
external_processor  Activates DSMTP's message processing daemon functionality.
external_viruschecker  Tells DSMTP to use an external virus checker on MIME attachments from extract_mime
extract_mime  Tells DSMTP where to extract particular MIME attachments.
fallback_address Enables a 'catchall' address for a specific domain.
forward  Creates a mail re-direction rule to be checked against all incoming mail.
forward_cc  Creates a carbon-copy mail re-direction rule to be checked against all incoming mail.
forward_on_from  Creates a mail re-direction rule based on the senders address.
forwardcc_on_from  Creates a carbon copy mail re-direction rule based on the senders address.
forward_from  Anti-SPAM; specifies a domain that is exempt from relaying restrictions.
forward_from_and_ip  Anti-SPAM; specifies a domain and ip that is exempt from relaying restrictions.
forward_from_ip   Anti-SPAM; specifies an IP address that is exempt from relaying restrictions.
forward_user  Anti-SPAM; turns on an anti-relaying system that allows relaying only after a recent DPOP login.
forward_window  Anti-SPAM; sets time (in seconds) in which relaying is allowed after POP login (i.e. expiry time of forward_user records).
fromip_max  Anti-SPAM; sets a limit on message throughput per hour from any IP number.
fromip_nolimit  Anti-SPAM; specifies IP addresses which are exempt from the fromip_max setting.
gateway  Bypass DNS lookups by specifying domain-IP_address pairs for DSMTP to use.
lock_id  (UNIX); sets a file locking id for multi-server systems.
log_days  Tells DSMTP how long (in days) to keep summary log files.
maps_action   Invokes certain actions should the connecting server be registered with MAPS RBL.
max_loglen  Specifies the maximum size (in kbytes) of DSMTP's log files.
max_others  Specifies the maximum number of recipients recorded for each message in summary files.
max_queue  Sets the number of rcpt lines from queue files that DMSTP queues up in memory.
max_rcvd  Anti-SPAM; Specifies the maximum number of received lines allowed in an incoming message.
max_send  Sets maximum outgoing channels, which limits maximum simultaneous outgoing messages.
max_send_domain  Sets maximum number of channels that DSMTP will use for sending to one single domain.
max_simultaneous   Limits the amount of channels coming from a single ip simultaneously.
max_simultaneous_exempt   Specified ip exemptions from max_simultaneous.
min_space  Specifies the minimum disk space (in Mbytes) DSMTP needs to operate.
no_autohost  De-activate the auto adding of hosts to DSMTP's internal host_domain list.
no_dotforward   (UNIX) tells DSMTP not to look for .forward files but .fwd files instead.
noquota_from   Allows exemptions from quotas based on users from address.
oneline_stats   Makes DSMTP use a single line per message in new format for its sent message log - for tellpop statistics command.
orbs_action   Invokes certain actions should the connecting server be registered with ORBS.
hide_rcvd_ip  Makes DSMTP hide the specified IP address in the 'received' message header.
ras_domain  RAS Dialup; This setting is NOT necessary in almost all cases. It specifies the domain on which authentication is to occur (NT only).
reject_no_reverse Tells DSMTP if it should reject messages where reverse DNS on connecting IP address fails (requires reverse_lookup to be set).
relay_to  Permits unconditional relaying to particular domains.
remind_timeout  Specifies the minimum time (in seconds) between critical error emails.
rotated_logs  Sets the number of old log files DSMTP keeps.
show_8bitmime;  Makes DSMTP revert to pre version 2.5c default of advertising 8 bit MIME capability (not recommended).
show_ehlo;  Switches on the announcing of various ESMTP extensions.
smtp_welcome;  A template for the welcome line. Accepts \\r\\n delimited lines, and $DATE, $HOST and $QFILES macros.
spool_dir;  Activates a mail spooling directory for incoming mail. DSMTP will deliver any mail found in this directory..
suspend_domain;   This tells DSMTP to not send any messages to the specified domain until an ETRN is received.
suspend_domain_timeout;   This will cause messages being suspended for a domain to bounce when the time set has been reached.
unix_case  (UNIX)Tells DSMTP to use strictly case sensitive user lookups.
user_quota  Enables a per-user mailbox quota system and optionally sets the default quota(true/false/kbytes).
vdomain_passwd  Common setting to DPOP and DSMTP
virtual_user_post  Adds a sendmail style virtual user table, actioned immediately before lookup.
virtual_user_pre  Adds a sendmail style virtual user table, actioned before any other local-user rules apply.
virus_robot  Specifies location of virus daemon. This setting has been specially added for use with RAVDMAIL.
warn_user  Specifies when (after x hours) DSMTP is to warn the sender of a delayed delivery.


Multiple entry settings: These settings may occur more than once(repeated from lists above).

add_footer  Appends the given footers file if the envelope from matches the given domains.
alias_file_domain specifies where DSMTP is to look for domain specific user alias information
alt_drop_path     specifies an alternative dropfile path for a particular domain
ban_ip  Specifies an IP address that DSMTP should not talk to.
host_domain       adds a domain name to the list of domains to be recognized as being local
dns_host          Set specific DNS servers to be used for domain lookups (instead of using system DNS settings).
fallback_address           enables a catchall address for a domain
fromip_nolimit           enables exceptions to fromip_max
forward           creates a forwarding rule for all incoming mail
forward_cc           creates a carbon-copy forwarding rule
forward_from      establishes relaying restrictions
forward_from_ip   establishes relaying restrictions
forward_from_and_ip establishes relaying restrictions
gateway           creates a gateway type rule for all incoming mail
relay_to           permits unconditional relaying to particular domains
vdomain_passwd    common setting to DPOP and DSMTP


Detailed Descriptions of DSMTP Configuration Settings:


add_footer <filename> <domain>[,<domain>,...]

This setting specifies a footer file to be added onto the end of all messages sent out by DSMTP, from users on any of the specified domains.

The <filename> can be specified with a path, or without. If a path is not given then DSMTP looks in the directory specified by the dsmtp_path setting.

(NB: DON'T specify a path in version 2.8b, i.e. put the footer file in your dsmtp_path directory.)

One or many domains can be specified. Use a comma separated list (no spaces) to specify a list of domains to which the setting should apply. In addition, you can use one of the keywords to save typing,
hostdomains - means that DSMTP should add the full list of host_domain settings to the list
vdomains - means that DSMTP should add the full list of vdomain domains to the list
default - means that this should be applied to any domain that does not have a specific add_footer setting.
local - means that this should be applied to any from address matching any local domain.
remote - means that this should be applied to any from address that is not a local domain.


Example1:
add_footer footer.txt domainx.com
would add the footer file, dsmtp_path/footer.txt onto any outgoing messages sent by users on the domain, domainx.com


Example2:
add_footer footer.txt default
would add the footer file, dsmtp_path/footer.txt onto any outgoing messages sent by users on any domain (unless their domain had a specific footer of its own as set by another add_footer setting).


Example3:
add_footer footer.txt host,domainx.com
would add the footer file, dsmtp_path/footer.txt onto any outgoing messages sent by users on any host_domain as well as those on the domain, domainx.com (presumably a virtual domain).


alias_file <filename>

This setting tells DSMTP which file contains the user alias information. The <filename> parameter must include the full pathname and the filename of the original alias file. DSMTP makes a copy of this file in aliases.dml, in its working directory to use when doing user alias lookups. Alias files are textfiles containing lines of the following format:
user: destination
e.g.
username: user@domain
username: /files/path/dropfile
username: |/usr/bin/autoresponder

Lines starting with a hash are treated as comment. Destinations that have multiple words should be within quotes. e.g.
username: "|/usr/bin/autoresponder arg1 arg2"

NOTE: All aliases found for a user by DSMTP are applied.

You can include another alias file using the :include: in the destination, e.g. to include the alias file /etc/aliases2 you could use the following line,
username: :include:/etc/aliases2

As the examples above show, you can use an alias in the same way as you can use a forward setting to make DSMTP write incoming messages directly to file or to pass them to a robot with the pipe symbol, | .

Note: The alias must be entered without a domain, but the destination for the alias should contain a domain - otherwise DSMTP will assume that the domain is the domain given in the first host_domain setting. If you do not wish to specify the destination domain and you don't like the host_domain default then you should put the alias in a domain specific alias file, identified in dmail.conf with the alias_file_domain setting.

You do not need to enter virtual domain prefixes in the alias file. E.g. with a vdomain prefix of dom1_ the following line is incorrect,
dom1_bob@domain1.com: dom1_fred@domain1.com
it should be,
bob@domain1.com: fred@domain1.com

Aliases only apply to valid local users, so DSMTP will check that an incoming message is for a valid local domain before it checks for an alias, whereas a forward rule can apply to local or non-local users, i.e. any domain.

For more information, see the Forwarding and Aliasing section.

Example:

alias_file /usr/aliases


alias_file_domain <domain> <filename>

This setting works exactly the same way as alias_file, except that the alias file <filename> is only applied to domains matching <domain> which may include wildcards.

This allows you to set up alias files for specific domains and also to create global aliases.

To create global aliases you can add the setting,
alias_file_domain * global_aliases and then within the file, global_aliases, you can add aliases which you want to apply on ALL domains.

NOTE: All aliases found for a user by DSMTP are applied.

NOTE: You do not need to enter virtual domain prefixes in the alias file. E.g. with a vdomain prefix of dom1_ the following line is incorrect,
dom1_bob: dom1_fred@domain1.com
it should be,
bob: fred@domain1.com
or even just,
bob: fred

If a domain is not specified on the destination, e.g.,
bob: john
then DSMTP will assume the destination user is on the same domain.

In version 2.7m and above you can use the syntax,
alias_file_domain domain filename suffix
where suffix is appended to any alias destinations with only subdomain names, e.g.
bob: fred@machine1
becomes a legal setting if the suffix was set to
.domain.com
, i.e. fred@machine1.domain.com.
NB: DSMTP only adds the suffix if there is no dot in the destination domain.

For more information, see the Forwarding and Aliasing section.

Example:

alias_file_domain /usr/aliases


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 be used any number of times.

Note: This setting will be ignored unless the <domain> parameter is specified as being local by using the host_domain setting. The last applicable setting will be used.

Example:

alt_drop_path *.spammers.com /etc/trash/


auth_allow [relay],...

This setting specifies various permissions or actions which are allowed for any user who has authenticated to DSMTP using the SMTP AUTH command.

This setting is a comma separated multiple value setting which can take any of the following key words:
KeywordAllows the authenticated channel or user to ...
relayrelay mail to non-local domains.

If 'relay' is set then DSMTP will automatically advertise,
AUTH PLAIN LOGIN
in response to the EHLO command. You can control this with the setting, show_ehlo.

If a non-local recipient is accepted then DSMTP will log,

Command RCPT OK (authenticated channel)

More about SMTP AUTH ...
SMTP AUTH allows users to turn SMTP AUTH on in their email client. SMTP AUTH means that the email client will provide the username and password (same as on DPOP server) to authenticate on your DSMTP server when connecting to send out mail.

NB: adding this setting will mean that some email clients like Netscape Mail force the users to turn on SMTP AUTH. Generally this is not a problem, as Netscape Mail instructs them on how to do it, but it may be confusing to some users.

If using the forward_user system as well then you should probably set the setting,
hide_auth recentpop
so that unnecessary auth lookups are not done.

We also have a new proxy widget called SmtpAuth (currently only in windows beta form) which takes a username and password to authenticate to an SMTP server with.

So users with an email client that does not support the SMTP AUTH command can run this on their machine and point their client at it instead of directly at your smtp server. It then authenticates to your server before sending on any mail feed to it.

If it is a whole domain coming through another trusted server then they could use the SmtpAuth proxy and feed all their outgoing mail through it. As we only have SmtpAuth on NT their server would have to be running on NT. If their server is DSMTP then we plan to add a setting so that DSMTP 'auths' all outgoing connections to a given ip address. So contact DMail Support if you need that setting.

Example:

auth_allow relay
Allows any user that authenticates successfully to relay messages to non-local domains bypassing any other relaying settings like forward_from_ip.



auth_hide <ipnumber>,<ipnumber>,...["recentpop"]

This setting switches off the announcing of ESMTP AUTH under various conditions, so that AUTH lookups are not done when not necessary.

You can use <ipnumber> to specify ip addresses. It can be,
x.x.x.x
or
x.x.x.* (a wildcard)
or
x.x.x.y-z (a range)

This setting is a comma separated multiple value setting which can also take the following key words:

KeywordMeaning ...
recentpopadd all ip addresses in the forward_user POP before SMTP system to the list

The 'recentpop' keyword, makes DSMTP check the ip address of a connection against its list of ip addresses which have recently successfully logged in to the DPOP server. This setting is only of use if you have set, forward_user to be true.

Example:

auth_hide 127.0.0.1,1.2.3.4,recentpop
This will stop DSMTP from advertising SMTP AUTH to those users connecting from local IP addresses, 127.0.0.1 and 1.2.3.4, as well as anyone connecting from an ip address that has recently checked for mail on the DPOP server.


ban_ip <IPaddress>

This setting specifies an IP address that DSMTP should not talk to. If something attempts to connect to DSMTP from this IP address, DSMTP serves them with this line:

551 You have no permission to talk, Goodbye

at the end of which the connection is dropped by DSMTP.

Example:

To stop anyone connecting from the IP address 1.2.3.4, use

ban_ip 1.2.3.4
ban_ip 1.2.*


ban_ip_except <IPaddress>

Allows specified ip's to be exempted from whatever is set in ban_ip

Example:
ban_ip_except 1.2.3.5


ban_mailfrom <string>

Specifies patterns for banned MAIL FROM: lines. If set, DSMTP will scan all MAIL FROM: lines in the SMTP envelope to see if the sender's email address contains the given string. If it does, DSMTP will bounce the message.

NB: DSMTP does not check the message headers for the specified string.

This setting can be given multiple times in dmail.conf.

Example:

ban_mailfrom bob.com

will make DSMTP bounce all messages which are sent by a user whos address contains the string 'bob.com'.


ban_rcptto <string>

Specifies patterns for banned rcpt to lines.If set, DSMTP will scan all RCPT TO: lines in the SMTP envelope to see whether any of the message recipients' email addresses contain the given string. If they do, DSMTP will bounce the message to only that specific recipient.

NB: where a message is to multiple recipients, DSMTP will still deliver the message to any other recipients that do not match the given string.

NB: DSMTP does not check the message headers for the specified string.

This setting can be given multiple times in dmail.conf.

Example:

ban_rcptto bob.com

will stop DSMTP from delivering mail to any destination address (given in the envelope RCPT TO: line) that contains the string 'bob.com'.


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 DSMTP how thoroughly it should clean up its sender-recipient cache. Once an hour, DSMTP 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 DSMTP will not deliver messages which it thinks are mail-bombs, and it will only keep the last 10 it has received. Basically, if DSMTP 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 a bomb we set bomb_dec to 10 ( as 5 = 50/10 ): bomb_dec 10


bomb_dir <pathname>

This setting tells DSMTP 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 work_path

Example:

bomb_dir /dev/null


bomb_entries <number>

This setting tells DSMTP how many sender-recipient pairs to cache for mail-bomb detection. Every time DSMTP 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, DSMTP finds one with a low count and deletes it to make room for the new one. The larger this setting is, the more likely DSMTP 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_entries <number>

This setting tells DSMTP how many sender-recipient pairs to cache for mail-bomb detection. Every time DSMTP 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, DSMTP finds one with a low count and deletes it to make room for the new one. The larger this setting is, the more likely DSMTP 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 DSMTP 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 DSMTP 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


bounce_body <switch>

This setting tells DSMTP whether or not it should include the body of a message in its Delivery Status Notification (DSNs can result from a failed delivery (bounce) or a successful one, if requested by the sender as set out in the Extended SMTP RFC). DSN requests are added by the sender's email client to the MAIL FROM: line of the ESMTP envelope, e.g.
MAIL FROM: <bob@netwinsite.com> RET=FULL
would request the full body to be returned with the DSN, and RET=HDRS requests that only the headers be sent if there is a DSN.

This setting can take true, false (= never) or always as an argument, with the following meanings:

true - if requested by the sender, send the message body with the notification message.
false - never send the message body with the notification message, even if it is requested by the sender.
always - always send the message body with the notification message, even if the sender only requests that the headers be sent.

The default is false, which means that only the headers will be returned to the sender on a bounce or DSN.

Example:

bounce_body false
will mean that the body of a message is never bounced, even if the user requests it as part of the ESTMP DSN.


bounce_maxlen <number>

This setting specifies when to truncate the body of a bounced message. If the message body exceeds <number> kb, DSMTP will truncate it. The default is 20.

Example:

bounce_maxlen 5


cache_clear_file <filename> [max_frequency_limit_seconds]

Activates authent cache clearing when specified file is modified.

If you modify a user's details in the user database, including the quota="x" or fwd="y" fields, then the changes will not be noticed by DSMTP until it's authentication cache is cleared.

Usually this is done with the tellsmtp command,
tellsmtp clear_cache_all.

The NetAuth Web user authentication interface can also be set to do this.

This setting allows you to make DSMTP notice when a user's information has changed and reload the cache itself.

If the file is changing frequently, then you will probably want to use the optional max_frequency_limit_seconds option, to limit how often DSMTP can refresh the cache by clearing it. If you set this to 600 seconds, for example, then users will have to wait up to a maximum of 10 minutes for their database changes to take affect.

This setting was added in version 2.9a

For details on the authentication cache, see
authent_cache

Example:

cache_clear_file c:\dmail\nwauth.add
would make DSMTP reload the authentication cache every time it noticed that the nwauth.add file had changed, i.e. every time a user's entry was added or changed (checked every minute).

cache_clear_file c:\dmail\nwauth.add 900
would make DSMTP reload the authentication cache every time it noticed that the nwauth.add file had changed, but not more than once every 15 minutes.


check_lwrusername <true / false / always>

This setting lets you control the casing of lookups in DSMTP for recipients. If you set it to always, it will always do lowercase lookups on the username. If you set it to true, it will try a lowercase lookup first, and if it cannot find a match it will then try an exact match.


dns_host <ip number>

NOTE: By default, DSMTP will use any DNS servers which you have set up your operating system to use (this includes any domains listed in your hosts file (commonly /etc/hosts or \winnt\system32\drivers\etc\hosts). So you probably don't need to use this setting.

This setting is provided so that you can specify a list of DNS servers that DSMTP should use to lookup domains (resolve them to an IP address) INSTEAD of any DNS servers setup for use in the operating system.

For outgoing mail, 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.

This setting can be used any number of times or take a comma separated list of IP addresses. If multiple hosts are given, DSMTP will go through them all until it gets a valid answer.

The default is to use the system DNS setup, i.e. no dns_host setting.

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


domain_chroot <domain> <path> (Unix based platforms only)

It is possible to configure DSMTP to make use of user-maintained alias files (using alias_file_domain for instance) and forward (.fwd) files. These can include references to files and/or autoresponders. Particularly in the case of virtual domains, it may be necessary to chroot to a particular directory before performing the desired operation. domain_chroot does this. The <domain> parameter may contain wildcards, DSMTP does not check that <path> exists.

Example:

vdomain prefix 1.2.3.4 vdomains.r.us.com /usr/local/vdomsrus/var/spool/
domain_chroot vdomains.r.us.com /usr/local/vdomsrus/

If a domain has a domain_chroot setting then references to robots and different drop files in forwarding rules and the like, can take relative paths. E.g. in the example above, the domain_chroot for vdomains.r.us.com would mean that a forward rule for a user in that domain to a drespond robot would have to call the robot from a relative path, with its root based at the chrooted domain, i.e. /usr/local/vdomsrus, e.g.
forward bob@vdomains.r.us.com "|/drespond /message.txt"
where /drespond means run the drespond program from the root of the chrooted directory, so the file being run is,
/usr/local/vdomsrus/drespond
and the message file is similarly located in the same directory.

NB: domain_chroot is intended for Unix based platforms only.


dotstuff_robot <true/false>

In versions 2.5d and 2.4k DSMTP's default behaviour was changed on Unix platforms so that it no longer does dotstuffing on messages going to robots. On Windows platforms the dotstuffing of messages to robots still occurs. This setting is provided for backwards compatibility only. If set true then DSMTP will carry out dot stuffing on messages that it writes to robots.

Example:

dot_stuff true


drop_max <number>

This command tells DSMTP how big to let dropfiles become. If a dropfile is bigger than <number> kb, DSMTP will not deliver the message (it will alert the sender to the problem, but not the recipient). This setting should be used in conjunction with user_quota because when a user checks their mail, DPOP clears the dropfile and sorts the messages within it into its own 'bin' files. So a user can have an empty dropfile but still use up a lot of space in message storage on your email server.

Example:

drop_max 5120


dsmtp_path <pathname>

This is the DSMTP installation directory. It will contain the DSMTP executable, help files and utility executables. The work_path and log_path default to here. The DMSetup installation wizard will by default create a directory called 'dmail' and point all of the server's home directories at it, i.e. dpop_path, dsmtp_path and dlist_path are all made to point to the directory called DMail by default.

This setting applies indirectly to DSMTP,DPOP and DList. It is global across all domains and by default cannot be changed by domain administrators.

Example:

dsmtp_path c:\mail\dmail\


external_processor <true/false>

This activates dsmtp's message processing daemon functionality. This allows you to run a process on all incoming mail before DSMTP delivers it to local or non-local users.

message_process_action is newer and much easier to use plus more powerful, we recommend you use this instead.

When this setting is set to true, DSMTP writes a file called m_x.dmn in the work_path directory when it receives the closing dot of an incoming message. It will write the incoming message to a temporary file, m_x.tmp.

NB: the value x will be a unique number starting at 0, e.g. 0 or 1 or 2 or, 99999 etc.

It is then up to the external processor (daemon) to detect this file, and process m_x.tmp, i.e. a file of the same name but with the ending '.tmp'.

NB: it is important that the external processor does not touch the .tmp file until the .dmn file appears, as DSMTP may still be writing to it.

The processor can make whatever modifications to the message file m_x.tmp that it sees fit, including removing the file altogether. Common things are removing objectionable content, infected attachments, adding/removing footers, altering/removing headers, etc. The only proviso is that if it leaves the file it must leave a valid message otherwise DSMTP may not be able to deliver the message.

DSMTP waits for a file, m_x.rdy to be created by the external processor. When that file arrives, DSMTP processes the message according to what it finds in the .rdy file.

1. If the .rdy file is empty then DSMTP will deliver the message it finds in the m_x.tmp file.

2. If the .rdy file is empty and the .tmp file has disappeared then DSMTP will bounce the message and give a permanent error response code (i.e. 500 level).

3. If the .rdy file has a first line with an SMTP-style reply line, DSMTP will use that response code and message for it's SMTP response to the message data and not deliver the message, i.e. DSMTP will bounce the message with that response code. A negative SMTP-style reply line starts with a '4' or '5', i.e. >=400

It is possible to run multiple daemons. The first daemon can write a m_x.2 file to trigger a second daemon, so and on, until the final daemon writes the m_x.rdy file.

NB: DSMTP freezes the incoming message channel until it sees the .rdy file and knows how to respond. So the external_processor has up to tcp_timeout seconds to process the message and create the .rdy file. It it does not DSMTP will drop the TCPIP connection and tidy up the external_processor files. In practice it probably has a much shorter time to deal with the message, because email clients generally have a much shorter timeout for sending the message than the tcp_timeout value. Email clients typically have a timeout value of 15-30 seconds.

NB: be careful not to set this setting true if there is nothing there to process the files, - otherwise the mail will never be delivered.

This setting was added in version 2.8i

Example:

external_processor true
causes DSMTP to write incoming messages to a .tmp file in the work path, and create a .dmn file when it has finished. The system administrator's daemon then detects the .dmn file and processes the .tmp file as it wishes. When it is finished it writes a .rdy file. The .rdy file contains a response code if the message is to be rejected or the .tmp file has been deleted by the daemon.


external_viruschecker <command_line>

Tells DSMTP to use an external virus checker on MIME attachments from extract_mime.

For every attachment extracted with extract_mime, DSMTP spawns this command line and replaces the macro $FILE$ with the full filename of the extracted attachment file.

NB: DSMTP only spawns the external virus checker on MIME attachments that it checks. It does not run the virus checker on EVERY message.

DSMTP expects the virus checker to delete infected files, and does not examine the output of the virus checker itself.

If any of the attached files have disappeared, DSMTP will reject the message and send a 'infected attachment' warning to the sender.

This setting was added in version 2.8n.

Example:

extract_mime c:\dmail\extract
external_viruschecker c:\virus\viruschecker.exe -delete -quiet $FILE$


extract_mime <path> [file_extensions_list]

Tells DSMTP where to extract particular MIME attachments.

If set, DSMTP will extract all MIME attachments or those of the type specified with the optional file_extensions_list to the given <path>. It then just leaves them there.

It is intended that the external_viruschecker command is used in order to make DSMTP take further action with the attachments.

This setting could be used by itself to archive attachments, e.g. images, that are passed through your system.

Notes:

  • If file_extension_list is not specified then DSMTP will extract attachments of any file type to that directory
  • file_extension_list is a space delimited list of the tail end of file types, e.g.,
    exe    =    windows executable file
    tar
    Z
  • On UNIX based platforms it is case sensitive
  • Do not put dots in the file_extension_list
  • You can not use wildcards in the file_extension_list
  • You can use multiple extract_mime settings to extract different file types to different directories
  • DSMTP extracts the attachment with a filename of, tmpxxx_filename, where xxx is the channel number of the incoming message, and filename is the attachment filename.

If any of the attached files have disappeared, DSMTP will reject the message and send a 'infected attachment' warning to the sender.

This setting was added in version 2.8n.

Example:

extract_mime c:\dmail\extract
will result in DSMTP extracting any MIME attachments that it can to the directory c:\dmail\extract

extract_mime c:\dmail\images gif jpg bmp
will result in DSMTP extracting any MIME attachments that it can that ends in the file extension .jpg or .gif or .bmp to the directory c:\dmail\extract.


fallback_address <domain> <address>

This setting sets up a fallback address for a given domain. If a message is sent to a user at the given domain, but that user doesn't exist (or no longer exists), then the message will be sent to the given address.

The FAQ, I want all domain1 email which does not go to a specific user . . . is a common use for this setting.

Example:

fallback_address my.company.com boss@my.company.com


fromip_max <number>

This setting activates a restriction on the number of messages an IP number can send through DSMTP per hour. The default value is 10000.

Example:

fromip_max 50


fromip_nolimit <ip number>

This setting allows exceptions to fromip_max for local/trusted IP numbers. Wildcard characters are permitted.

Example:

fromip_nolimit 127.0.0.1


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 TO: SMTP line, 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 settings will be applied. The '*' wildcard character may be used in the <wildcard> parameter. The message will not be delivered to the original recipient, so if you want the original recipient to receive the message use, forward_cc.

Note: There is a fallback_address setting that can pick up addresses not covered by a forward rule, see the faq I want all domain1 email which does not go to a specific user to . . .

Forward rules can apply to any users of any domain, not just local users as they must be in an alias file.

New in version 2.8m and above, you can use forward settings for domain rewriting, i.e.,
forward    *@domain1    %1@domain2
which would result in mail arriving for 'user1@domain1' being sent to 'user1@domain2', i.e. the domain part of the address is changed to the new domain name.

For more information see the Forwarding and Aliasing section.

Example:

forward bgates@windows.com jreno@doj.gov

will send a copy of all Bill's mail to Janet


forward_cc <wildcard> <address>

This setting is matched against all recipients of a message. It causes any message addressed to recipient matching 'wildcard' to be copied to 'address'. This implies it is also delivered to whoever it would have gone to in the first place, including not delivering the message to any address other than the copy address or hitting a fallback address.

Note: DSMTP will not deliver the message to the original recipient if a forward rule exists for the same email address, i.e. DSMTP will treat two rules,
forward_cc bob@dom1 bob@dom2
forward bob@dom1 george@dom2
as two forward rules,
forward bob@dom1 bob@dom2
forward bob@dom1 george@dom2

Note: Also the original recipient may not get the message if there is a forward file for that user.

For more information see the Forwarding and Aliasing section.

Example:

forward_cc sales@bob.com bofh@bob.com


forward_on_from <wildcard> <address>

This setting is used to allow forwarding based on the senders address.
If you want to redirect all mail coming from fred@test.com to admin@test.com you would add this.
forward_on_from fred@test.com admin@test.com

Note: This is redirection, the original recipient will not get the message, if you want to just get a copy then you need to use the setting forwardcc_on_from


forwardcc_on_from <wildcard> <address>

This setting i used to allow cabon copied forwarding based on the senders address.
If you want to carbon copy all mail coming from fred@test.com admin@test.com you would add this.
forwardcc_on_from fred@test.com admin@test.com


forward_from <wildcard>

This setting is used to establish an exception to relaying restrictions. If found, DSMTP will allow the relaying of any messages where the domain in the MAIL FROM line of the envelope matches <wildcard>
NB: This is not a very strong relaying restriction. The message 'envelope' refers to the information passed as part of the SMTP protocol, so the MAIL FROM line is the line given to DSMTP by the email client (or another SMTP server) and looks like this:
MAIL FROM:
As such, this can be quite easily falsified. See Spam Rules for more details.

Notes:

  1. You can add as many of these settings as you need
  2. This setting can only be used in versions 2.4h and above.
  3. Adding any relaying restrictions, e.g. a forward_from line, automatically turns on relaying restrictions, as the default behaviour is to allow all relaying.
  4. You need to make sure that every client and server that connects to DSMTP to send messages OUT has some sort of relaying exception like this forward_from setting (forward_from_ip being the best).
  5. In version 2.7 and above, DMSetup will automatically add these two lines for you,
    forward_from_ip 127.0.0.1
    and
    forward_from_ip x.x.x.*
    where x.x.x is the first three sections of the IP address of your machine. This stops your server from being an Open Relay when you have just installed it.
  6. In version 2.5f and above this setting is case insensitive, so,
    forward_from domainx.com
    covers, DOMAINX.com Domainx.com etc.
  7. A forward rule (e.g. a forward setting or an alias) bypasses any relaying restrictions

If a non-local recipient is accepted because of a forward_from setting then DSMTP will log on info log_level,

Command RCPT OK (forward_from allowed)

Example: To allow relaying ONLY from domains "below" local.domain, say bob.local.domain put this line in dmail.conf
forward_from *.local.domain

to allow relaying from local.domain AS WELL AS domains below it, use this line instead,
forward_from *local.domain

because 'wildcard' is a simple string search.


forward_from_ip <wildcard>

This setting is used to establish exceptions to relaying restrictions. If this command is present, DSMTP will not accept mail for non-local addresses unless the sender's ip number matches the <wildcard> parameter. If the forward_from_ip rule specifies the sender, then they are allowed to relay messages, i.e. DSMTP is happy to try and send mail to users at other machines for them.

Notes:

  1. You can add as many of these settings as you need
  2. This command overrides any forward_from commands, e.g. if the sender's IP address matches this setting they can relay no matter what domain they say they are from.
  3. Adding any relaying restrictions, e.g. a forward_from_ip line, automatically turns on relaying restrictions, as the default behaviour is to allow all relaying.
  4. In version 2.7o and above, DMSetup will automatically add these two lines for you,
    forward_from_ip 127.0.0.1
    and
    forward_from_ip x.x.x.*
    where x.x.x is the first three sections of the IP address of your machine. This stops your server from being an Open Relay when you have just installed it.
  5. If you add any forward_from_ip settings you will probably want to add entries for your server's IP address and for 127.0.0.1, so that anything that generates messages on your server can send messages to non-local users, e.g. DList or an autoresponder robot.
  6. You need to make sure that every client and server that connects to DSMTP to send messages OUT has some sort of relaying exception like this forward_from setting (forward_from_ip being the best).
  7. A forward rule (e.g. a forward setting or an alias) bypasses any relaying restrictions

Example:
To allow relaying only for connections coming from IP addresses starting 1.2.3. add the following rule,
forward_from_ip 1.2.3.*

also to allow messages to be sent to users at other machines from your server, add
forward_from_ip 127.0.0.1
forward_from_ip IPaddress.my.server


forward_from_and_ip <domain> <wildcard>

This setting allows users that have a email address that matches the domain in the setting and are connecting from the specified ip to be allowed to relay

example:
forward_from_and_ip domain1.com 1.1.1.1


forward_user <switch>

This setting activates relay permissions for recent DPOP users. If switch is set to true, DPOP will keep a record of all recent logins ('recent' is defined by forward_window . If a message's IP number and FROM envelope entry matches an entry in that record, relaying will be permitted for that message. This allows users to read and send their mail from anywhere, while maintaining a a server that is not an Open Relay.

If you have this setting set you should see in the dsmtp.log file (when on debug log_level) a line following every connection of either,

(x.x.x.x) is recent
or
ip (x.x.x.x) is not recent

Example:

forward_user true


forward_window <number>

This setting tells DPOP how long to let records for forward_user records to linger for in seconds. The default is 120 seconds, or 2 minutes.

Example:

forward_window 240 (sets the window to 4 minutes)


gateway <domain> <ip> [return domain]

This setting functions essentially as an instant DNS lookup. If the next destination of a message matches <domain> and is not local, DSMTP 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 doesn't have access to the outside world, it can send all non-local messages on to a machine that does. (The <ip> parameter must not refer to the host machine. The setting host_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 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 host_domain for information on how to set this).

The last applicable gateway setting will be used. The <domain> parameter may include the wildcard character '*'. Any number of these settings may be used.

In version 2.5g and above the <ip> parameter can actually be a domain instead of the ip address. If DSMTP finds a domain destination then it does a DNS lookup on this domain instead of the original domain. The domain may NOT refer a local domain and if it refers to another gateway setting then that setting will be ignored.

Examples:

gateway fake.name 1.2.3.4
will cause any mail arriving for the domain fake.name, to be sent on to the machine with IP address, 1.2.3.4

gateway * 1.2.3.4
will cause DSMTP to gateway ALL mail onto the server at the IP address 1.2.3.4

gateway domain2.com 1.2.3.4 outside.com
will cause DSMTP to gateway mail for the domain domain2.com onto the server at the IP address 1.2.3.4, but before it sends the message it will add outside.com to the reverse path instead of its domain.


lock_id <id>

When running multiple DPOP or DSMTP servers that access the same mail spool, it is necessary to give each server a unique id for file-locking purposes. lock_id does this. <id> can be any string, but for clarity, it should be a number to identify which server is using it.

Example:

lock_id 02


log_data <switch>

Normally, DSMTP doesn't log every line sent or received via its TCP channels, as it can add significant bulk to the logfiles. However, full logging can be turned on by setting <switch> to 'true'.

Example:

log_data true


log_days <number>

This setting tells DSMTP how many days worth of activity summary logfiles to keep. These files are called dmxxyy.sta and dmxxyy.log, where xx is the day and yy the month that the logfile is for. The sta files contain message statistics (number received, sent, local, failed etc), the log file contains lists of recipients and senders for all messages that day. They are retained for accounting and security reasons, but can occupy quite a lot of space if left alone. Any files older than <number> days are deleted by DSMTP. The default is 14 days.

Example:

log_days 8


max_loglen <number>

DSMTPs logfile can get very large. Once they exceed <number> kb, DSMTP rotates out the old one and starts a new one. The default value is 1024.

Example:

max_loglen 2048


max_msgsize <number>

This setting tells DSMTP the maximum size a message is allowed to be for DSMTP to accept it. This applies to all messages, not just those being delivered locally. If an incoming message exceeds <number> kb, any further data will be discarded. Once the message has finished, DSMTP 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_others <number>

This setting tells DSMTP the maximum number of recipients per message to log in the daily summary logfile dmxxyy.log(see log_days . If a significant portion of the messages going through DSMTP are mailing list messages with several dozen recipients, the summary logfile can become very large, as each recipient will be recorded for each message. max_others caps the number of recorded recipients to <number> The default is 20.

Example:

max_others 100


max_rcpts <number>

One way to identify spam is that they often have a very large number of recipients per message. To trap this, DSMTP can limit the number of recipients an individual message can have. Any further RCPT lines will be refused. Be careful when using max_rcpts as legitimate mailing lists can often have large recipient lists. By default, there is no limit.

Example:

max_rcpts 200


max_rcpts_session <number>

This setting is like max_rcpts but it is per session instead of per message. A lot of spammers will send in a lot of rcpt's but will then use a rset command and create a new message which resets the counter on max_rcpts. This setting is per session so won't be reset so will foil spammers using this method.

Example:

max_rcpts_session 200


max_queue <number>

Sets the number of recipient lines from queue files that DMSTP queues up in memory.

Default is 1000 - perfect for 99% of systems. This setting is available in version 2.7k onwards.

NB: Do not play idly with this setting :-)
This setting is provided for tweaking of delivery performance. For example if a server has to deal with a number of large mailing lists you might want to increase it - carefully monitor any changes that you make to it.

All messages that arrive at DSMTP's door get put in the work_path directory as queue file (in pairs - q_x.itm being the message and q_x.idx being an index of the envelope etc.). The way that DSMTP deals with these messages is complex. This setting allows you to change how many of the messages from the queue are stored in memory (the actual message is not stored in the queue, just information on it). DSMTP does things like scanning the internal queue reordering it, moving messages on and off it etc, so a bigger queue does not necessarily lead to improved efficiency.

See also the queue file section, under Disk Use and Files.

In version 2.7l we have made a considerable change to the efficiency of DSMTP's queue. So if you are moving to this version or higher and you are not running the default for this setting you should re-check its value is correct for your system.

Example:

max_queue 1000
will make DSMTP internally queue up to 1000 of the rcpt lines stored in queue files


max_rcpt_except_ip <ip>

This settting allows you to exempt specified ip's from being affected by the max_rcpts setting.

Example:
max_rcpt_except_ip 127.0.0.1


max_rcvd <number>

This setting sets the maximum number of Received: lines that can be in an incoming message's headers before DSMTP bounces the message. Received headers are added by SMTP servers when they receive a message, for this reason it is used to check that the message has not ended up in a loop. A loop example is where you have two SMTP servers forwarding the same message back and forth to each other.

By default DSMTP rejects (bounces) messages with 15 Received: header lines. These days SMTP servers can generally talk directly to one another, so one or two received lines is normal.

This setting and its default were added in version 2.4e.

Example:

max_rcvd 25
will make DSMTP accept messages with up to 25 Received headers (given it does not reject the message for some other reason).


max_retrytime <number>

This setting tells DSMTP how long, in hours, it should continue to attempt to send a message. If the message cannot be delivered after this time, DSMTP will give up. The default is 24 hours.

DSMTP re-tries to send all queued messages every two hours by default.
The interval at which DSMTP tries to resend messages can be configured with the setting retry_interval

Example:

max_retrytime 24
will result in DSMTP attempting to send each message until it is successfully sent or it has unsuccessfully tried 12 times (each attempt being 2 hours apart).


max_send <number>

This setting sets maximum number of outgoing TCPIP channels, which limits maximum simultaneous outgoing messages.

The default of 10 is normally adequate. The maximum value is 50.

NOTE: More outgoing channels does not necessarily lead to better sending performance. This setting is provided to allow you to improve performance for your setup, e.g. relays and servers with heavy mailing list loads might require adjustment of this setting. We suggest that you only increment this by 10 channels at a time and carefully monitor any effects.

Use tellsmtp showsend to see a snapshot of the number of outgoing channels in use. Tellsmtp showchans shows you all channels in use, those in state 2 are sends. (those with the socket of -1 are no longer in use).

Example:

max_send 25
Sets the maximum number of outgoing TCPIP channels to 25.


max_send_domain <number>

This sets the maximum number of outgoing channels that DSMTP will use for any particular domain. This can be useful in preventing DSMTP from using all channels up on one domain.
The default value is 10.

Example:
max_send_domain 15


max_simultaneous <number>

This sets the maximum number of simultaneous channels that will be accepted by DSMTP from a single ip. This obviously will stop DOS attacks where someone could open hundreds of connections to your server.

Example:
max_simultaneous 5


max_simultaneous_except <address>

This allows addresses to be exempted from the max_simultaneous setting.

Example:
max_simultaneous_except user@this.domain.com
max_simultaneous_except *@hotmail.com


min_space <number>

This setting specifies the minimum amount of disk space DSMTP must have to work. If the available disk space 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 disk space is made available, DSMTP will accept connections. Because of this, it is important that the problem be addressed as soon as possible. The default is 10, i.e. 10 Megabytes.

Example:

min_space 5


message_process <executable> $FILE

This setting fires off the specified executable for every message that passes through the server. $FILE is the macro that contains the actual message, you may edit the message as much as possible and then your program can return an error code instructing DSMTP to either reject, accept or vanish the message. You can choose what action to take based on the error codes using the setting
message_process_action
Example: message_process /usr/local/dmail/process_mail $FILE


message_process_action <return code> <action> [message to sender]

This setting sets what actions to take based on the error code returned by the program processing the messages,
Valid actions are:
reject (Rejects the message)
accept (accepts the message)
vanish (pretends to accept the message but silently deletes it)

Example:
message_process_action 0 accept
message_process_action 1 reject
message_process_action 2 reject "Too much cussing"
message_process_action 5 vanish


msg_filter <filename>

This setting tells DSMTP which file to use for its message filters. The file is a simple text file, containing any number of the following types of entry, one per line:
<rule> <part> <string>
<rule> may be either 'reject_case'(case sensitive) 'reject_nocase'(case insensitive) or 'accept'.
<part> may either be 'body' or a header entry such as 'Subject', 'Return-Path' or 'attachment'.
<string> can be any text string, may include wild cards.

For example, a text file filter.txt might look like:
reject_nocase body eschatology (nocase = not case sensitive)
accept subject yak
reject_case subject *cat*arm*
reject_nocase attachment happy99.exe
accept_nocase attachment *.txt

The first line will cause DSMTP to reject any message with eschatology anywhere in the body.
The second line will cause DSMTP to accept any message with yak as the subject line.
The third line will cause DSMTP to reject any message with 'cat farming','cat charming' etc. in the subject line and the case must match.
The fourth line does a case insensitive match looking for attachment names of happy99.exe and rejects them.
The fifth line will accept any message that has an attachment matching *.txt even if it hits other filters.

Note: DSMTP does a different type of search depending on whether it is checking a message header or the message body. Please see the notes below for specific differences.

White space is counted so the below examples are different
reject_nocase body "batty"
reject_nocase body "  batty "
Quotes are used in the above example to show the white space a bit earier :).These should be omiited however.
The first example would ban any instance of "batty" no matter where found even if part of a greater word. The second example has a space at either end so DSMTP would only reject it if it is found in the email also with spaces at either end

If a message is rejected then DSMTP will give a message rejection code at the end of the DATA stage of the SMTP protocol, i.e.,
570 Command DATA Message rejected due to content.

Notes:

  • The last applicable rule has priority. For instance using the above example, a message with eschatology in the body and a subject line reading "yak" will be accepted.
  • You must not use wild cards in a body rule. e.g. you can not have a rule,
    reject body *.exe     (bad - do not use!)
    it should be,
    reject body .exe
    or to be less general,
    reject body .exe"
    This is because the search type done on a message body is different to the wildcard match done on a message header, as the need for processing speed is much greater.
  • In versions prior to 2.8h, you must restart DSMTP for a message filter file change to take effect. For versions after 2.8h a tellsmtp reload is sufficient.
  • You can see a list of your current active filters by doing a
    tellsmtp filters
    on some versions you may have to do a
    tellsmtp filters *
  • For message body searches, the <string> has to be at least 3 characters in length. There is no such limitation on message header searches.

Example:

msg_filter /etc/dsmtp_filter


no_max_msgsize <address>

This allows addresses to be exempt from the max_msgsize setting. You can specify addresses that match the senders address.

Example:
no_max_msgsize fred@mydomain.com, bill@mycomain.com


no_autohost <boolean>

If set to true, deactivates the auto adding of hosts to DSMTP's internal host_domain list. Default is false.

DSMTP keeps an internal list of all host_domain entries that DSMTP has read from dmail.conf. If DSMTP does a DNS MX lookup on a domain and finds that the end result points to itself (either IP address or domain) then it adds the domain that it looked up to its internal list of host_domain settings.

NB: it only adds Canonical or Primary names to its internal list. If the lookup resulted in a secondary domain that pointed to itself, DSMTP would not add the domain to its host_domain list and instead fail delivery and retry delivery later (hopefully when the primary server has come back online). For more information on this setting and its implications, please see
Your DNS (MX) Entries

Example:

no_autohost true


no_dotforward <boolean> (UNIX based platforms only)

If set to true, deactivates DSMTP's default behaviour of looking for a .forward file in the user's home directory as specified in the /etc/passwd file. Instead DSMTP will look for a .fwd file in the same directory as the user's drop file (including any directory hashing). The default is FALSE.

DSMTP has a method of creating forwarding rules where you create a file called, drop_file_name.fwd in the same directory as a user's drop file. To make DSMTP compatible with Sendmail systems, DSMTP will normally check to see if a user has any forward rules set up in a file called .forward in the user's home directory. DSMTP finds the location of the user's home directory by using the system call to retrieve that information from the /etc/passwd file. If the administrator sets up a domain specific passwd file with the domain_passwd setting, then DSMTP will check that file for the user's home directory.

For more information on .forward and .fwd files see, Forward Files in the 'Forwarding and Aliasing' section.

Example:

no_dotforward true


noquota_from <address>

The specified address/wildcard will be exempted from any quota restrictions.

Example:
noquota_from *@test.com


hide_rcvd_ip <ipaddress>

The specified IP address will be hidden by DSMTP in any Received header lines that it creates.

This option has been added so that DSMTP hides internal (made up) IP addresses on a LAN when it is acting as the gateway, so that they are not visible to the outside world.

NOTE: The IP addresses will be hidden in ALL received header lines, i.e. those added to BOTH incoming and outgoing messages.

Example:

hide_rcvd_ip 999.999.999.1
will ensure that DSMTP does not put the IP address, 999.999.999.1 in the received line of any messages that it receives.


oneline_stats <true/false>

If set true, DSMTP will use a single line per message in the new format below for its delivery message log.

Detailed statistics can then be found using the tellpop statistics command.

The new format is also more convenient for creating your own script or program for parsing the DSMTP delivery log.

NB: this setting was only added (and the tellpop statistics command) in version 2.9a.

DSMTP creates delivery logs in the log_path directory, with the filename of the form,
dmDDMM.log
where DD is a 2 digit day and MM is a 2 digit month.

The new syntax of the deliver lines is,
date_stamp fail/delivered date <date> from <address> to <address> size <size> messageid <message-id>

NB: we may add extra information to the line at any stage, hence the 'name value' style syntax. We will try to only add to the end of the line.

Example:

oneline_stats true


orbs_action <ban | reject | vanish>

If set, any of the listed actions causes DSMTP to lookup the ip address of the incoming connection on the ORBS database. If the sender is found to be from a listed site the specified action below is taken with the message.

Due to changes made to the ORBS database as of February 1, 2001, the relays.orbs.org database has been discontinued. DSMTP 2.9 orbs_* settings now use the inputs.orbs.org database. Version 3.0 introduces support for multiple RBL databases, including the various new databases introduced by ORBS.

Actions:

ban: causes the incoming connection to be dropped. DSMTP writes a message to the channel informing the sender that they have 'no permission to talk'.

vanish: the incoming mail is accepted if otherwise ok but is then deleted and is not recoverable.

reject: DSMTP will give 500 errors to all recipient lines.

NB: you may only specify ONE action

We have now added support for the MAPS RBL database which our customers inform us is more reliable as it is a list of known spamming IPs rather than just open relay sites. The setting for MAPS RBL lookups is,
maps_action <ban | reject | vanish>

You can set DSMTP to lookup incoming IP addresses on both databases, however the action specified for the ORBS setting will occur if the IP address is on both lists.

For more information on the ORBS database see,
http://www.orbs.org
and for MAPS RBL see,
http://maps.vix.com/rbl/

Examples:

orbs_action ban

orbs_action reject

orbs_action vanish

maps_action ban

maps_action reject

maps_action vanish


quiet <boolean>

This setting tells DSMTP to send a minimal amount 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 <switch> parameter must be set to "true" to activate this option. The default setting is true.

Example:

quiet true


ras_domain <domain> (WINDOWS PLATFORMS ONLY)

Specifies a string containing the domain on which authentication is to occur.

If left blank the domain in which the remote access server is a member.

An asterisk specifies the domain stored in the RAS phonebook for the entry.

It must be a full domain name. See the FAQ for details on running a dialup mail server (NT only).

Example:

ras_domain my.pet.domain

(it is recommended not to use this setting)


ras_entry <string> (WINDOWS PLATFORMS ONLY)

The <string> parameter contains the name of the dial-up entry in the RAS phonebook that DSMTP should use when running in RAS mode.

Example:

ras_entry My Connection


ras_number <number> (WINDOWS PLATFORMS ONLY)

The <number> tells DSMTP which phone number to use when dialing up in RAS mode. This should match the RAS phonebook entry.

Example:

ras_number 5551234


ras_password <string> (WINDOWS PLATFORMS ONLY)

If the RAS entry requires a password, it must be entered here. This should match the RAS phonebook entry.

Example:

ras_password mypassword


ras_smtpip <ip number> (WINDOWS PLATFORMS ONLY)

Once DSMTP has established an RAS connection, it must contact an SMTP server to retrieve messages that are waiting for it. The <ip number> parameter tells DSMTP where it is.

Example:

ras_smtpip 1.2.3.4


ras_timeout <number> (WINDOWS PLATFORMS ONLY)

After contacting the SMTP server given in ras_smtpip messages will start arriving.

This is because after opening up the connection to the remote SMTP server, DSMTP sends the Extended SMTP command, ETRN domain, for all of the domains specified in the host_domain and vdomain settings in dmail.conf. The ETRN command causes the remote SMTP server to send all mail waiting in its queue for the specified domain.

If DSMTP does not receive any messages for <number> minutes, it will hang up the RAS connection. The default is 2 minutes. the minimum is 1 minute.

Example:

ras_timeout 5


ras_timer <number>

If using an RAS connection to get its mail, DSMTP will reconnect every <number> minutes. The default is 30 minutes, the minimum is 5 minutes. It would be unwise to set this number to less than ras_timeout as DSMTP would never hangup the connection. Which somewhat defeats the purpose.

Example:

ras_timer 60


ras_username <string>

When establishing an RAS connection, a username is needed. This command tells DSMTP what that is.

Example:

ras_username Simon Travaglia


reject_no_reverse <switch>

Normally, DSMTP doesn't bother doing a reverse lookup on incoming connections, as it can take time. However, it is sometimes desirable to reject incoming mail from machines that fail a reverse lookup. To do this, turn on reverse lookups and then set <switch> to true.

NB: This setting will be ignored unless you have the lookup_names setting set to true.
DPOP also ignores this setting.

Example:

reject_no_reverse true


relay_to <domain>

The relay_to setting permits unconditional relaying to a particular domain.

If DSMTP accepts a message for non-local delivery because of a relay_to setting it will log,

Command RCPT OK (relay_to allowed)

Example:

relay_to somewhere.com


remind_timeout <number>

This setting specifies how long DSMTP should wait between events before alerting the system administrator of a recurring problem (see sysadmin . DSMTP will not send an Email if the event occurs 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


retry_interval <time in minutes>

This setting tells DSMTP how often to retry sending messages in the queue that have failed for some reason on past delivery attempts. It will keep trying at this interval until max_retrytime is hit.

example: retry_interval 30


robot_try <time>

This setting tells DSMTP 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 elapsed since the last successful write. DSMTP 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 of whether or not DSMTP was able to send the whole message to it. The <time> parameter is in seconds, with the default being 120 (or 2 minutes).

Example:

robot_try 10

When the write to the robot fails you will see a log line like, '*** Warning *** robot 11631 choked on 77 bytes' in dsmtp.log. If the robot_try time is reached then you will see a log line like, 'gave up trying to feed robot'.


robot_wait <time>

This setting tells DSMTP how long to wait after sending the message data to a robot before killing it. If the robot is still active after this time, DSMTP 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


rotated_logs <number>

DSMTP rotates it's logfile out once it reaches 1 megabyte in size. dsmtp.log is rename dsmtp1.log, dsmtp1.log is renamed dsmtp2.log, and so on. The total number of logfiles kept can be set by using rotated_logs. The default value is 4.

Example:

rotated_logs 10


shell_prefix <string>

Normally, DSMTP will run robots/autoresponder by directly forking and exec'ing the process. Sometimes this doesn't work, or doesn't have the desired effect. It is possible to set shell_prefix to fix this. If <string> is set to, say, "shell -c", DSMTP will run all autoresponders by forking, then exec'ing

shell -c "/usr/bin/whatever" instead of

/usr/bin/whatever

Example:

shell_prefix shell -c


show_8bitmime <boolean>

If set to true, then DSMTP will advertise its 8 bit MIME compatibility as part of the Extended SMTP welcome banner.

The default is false, i.e. do not advertise 8 bit MIME support.

When an email client or SMTP server opens up a connection to DSMTP, it sends the SMTP command HELO. For Extended SMTP servers, like DSMTP, it can send EHLO. In response to EHLO DSMTP sends a number of lines to tell the client what its capabilities are, e.g. here are the opening lines of an SMTP connection from the clients end,
220 tosh DSMTP ESMTP Server v2.5c
EHLO domainx.com
250-server.com. Hello domainx.com (161.29.2.46)
250-ETRN
250-DSN
250 HELP

If you want DSMTP to advertise 8 bit MIME as one of its capabilities set show_8bitmime to true, then DSMTP will show its 8 bit MIME capability, e.g.
220 tosh DSMTP ESMTP Server v2.5c
EHLO domainx.com
250-server.com. Hello domainx.com (161.29.2.46)
250-ETRN
250-DSN
250-8BITMIME
250 HELP

In versions prior to 2.5c DSMTP always advertised its 8 bit MIME compatibility, but we think that 8 bit MIME is a strange thing :-) and so DSMTP no longer does by default.

Note: If DSMTP advertises as 8 bit MIME and accepts a message in that format, then it cannot pass the message on to a server or client that is not 8 bit MIME compatible (e.g. if that server only accepted 7 bit MIME messages), it will simply bounce the message back to the sender.

Example:

show_8bitmime true
will make DSMTP always advertise its 8 bit MIME compatibility in its welcome banner.


show_ehlo [8bit],[vrfy],[auth]

DSMTP supports the ESMTP (Extended SMTP protocol) and as part of this if a client connects with the EHLO command DSMTP must respond by advertising which of the SMTP Extensions it supports.

The problem with this is that, if advertised, most clients tend to try to use the latest and greatest things, even if they are not sensible. So this setting is provided to allow you to decide what DSMTP advertises as its capabilities.

DSMTP will always respond to EHLO with, ETRN,DSN and HELP, e.g.
250-netwin.co.nz. Hello bob.com (1.2.3.4)
250-ETRN
250-DSN
250 HELP
this setting lets you set what other things it advertises.

This setting is a comma separated multi value setting which takes any of the key words in the following table:
KeywordMakes DSMTP Advertise
authAUTH PLAIN LOGIN
8bit8BITMIME
vrfyVRFY

NB: this setting only affects what DSMTP advertises not whether it supports each of the commands, e.g. whether you make DSMTP advertise VRFY or not, what DSMTP does in response to the VRFY command is set with the setting, fake_verify.

NB: If you have set,auth_allow relay, then you should not need to set, show_ehlo auth, as DSMTP will automatically advertise support for AUTH PLAIN LOGIN.

See also show_8bitmime which this setting can be used to replace.

Example:

show_ehlo auth,vrfy,8bit
will make DSMTP advertise AUTH PLAIN,VRFY and 8BITMIME as well as the normal ETRN,DSN and HELP.


smtp_port <number>

If used, this setting sets the port number which DSMTP will listen on to port <number> Any SMTP clients wishing to talk to DSMTP (including Tellsmtp) must use this port. Tellsmtp will look in DSMTP's default config file unless told otherwise with a -i setting on the command line, see the tellsmtp commands section. The default value is 25, of course.

Example:

smtp_port 1025


smtp_welcome <string[$HOST,$DATE,$QFILES]>

A template for the SMTP welcome line, given by DSMTP when it first opens a connection.

Warning - do not play with this setting unless you have a reason, and always monitor your server for any effects after altering it.

The <string> can be a template that accepts the following macros:

$DATE = the day's datestamp.

$HOST = the hostname of the machine DSMTP is running on.

$QFILES = the number of files in the queue at this point in time (not normally used, added by request for a customer's system where the sending device would distribute load based on this information).

Accepts \\r\\n delimited lines, so that it can be a multiple line response although this is not particularly recommended.

The default at time of writing this is,
220 $HOST DSMTP ESMTP Mail Server

NB:

  1. You should start your line with the response code '220 '
  2. You should include the word ESMTP in your welcome line so that other servers know that your server knows about Extended SMTP extensions. If you don't put it in then by RFC other servers should not try to use ESMTP commands with your server.

Example:

smtp_welcome 220 Welcome to ESMTP server, $HOST .
which might result in the welcome line,

smtp_welcome 220 Welcome to ESMTP server, smtp.mymachine.com .


spool_dir <path>

Activates a mail spooling directory for incoming mail. DSMTP will deliver any mail found in this directory which is in a file with the ending, .msg.

If a message is written to file in this directory with the a filename ending in .msg, DSMTP will open the file, parse it and try to deliver it to the destination given in the message headers, namely the To: header.

The format of the .msg file should be a valid email message including headers, a separator blank line and a message body, e.g.


From: <user@domain1.com>
To: <user@domain2.com>
Subject: hello
 
First line of message body
Second line of message body

NB: the address(es) MUST be enclosed in angle brackets.

Webservers with CDONTS:

This setting allows you to send messages with CDONTS from web pages. In version 2.9a we have added checking for the CDONTS default file ending of .eml as well as .msg files.

Time delayed delivery:

If a message file name starts with a digit then DSMTP will try to work out a time setting from the file name. If it can then it will wait until that time (to the nearest 5 minutes) and then deliver the message.

If DSMTP can not work out the time setting it will deliver it immediately.

The format is,
YYYYMMDDHH.msg
where YYYY is a 4 digit year,
MM is a 2 digit month
HH is a 2 digit hour (24 hour clock)

E.g. 2000310813.msg DSMTP will try to deliver this message within 10 minutes of 1 PM, on the 31 August in the year 2000.

Notes:

  • DSMTP looks for the To: header and if not found looks for the X-Rcpt-To: header.
  • Multiple destination addresses should be given within angle brackets, so in this format,
    To: blah<address1>blah<address2>
    So addresses can be comma separated or whatever, but must be in angle brackets.
  • The resolution is 5 minutes, so a message can take up to 5 minutes to be found by DSMTP. (this is because the file processing needed can be intensive)(NB: in 2.8n the resolution was 1 hour, and was set down to 5 minutes in 2.9a)
  • Don't start message filenames with a digit else DSMTP may try and apply a time delayed delivery (in most cases it will realize and deliver immediately, but we can't guarantee that).
  • This setting requires at least version 2.8n of DSMTP
  • In 2.9a a file locking mechanism was added. If you set,
    spool_readyfile true
    in dmail.conf, then DSMTP will not read the .msg files until you create a file of the same name with the extension, .rdy. This means that you can create a .msg file and then when you have finished make a .rdy file with the same base name, and only when the .rdy file appears will DSMTP read the .msg file.
  • Checking for messages with the .eml extension was added in 2.9a. NB: .eml message files can not make use of the time delay feature or the file locking feature.

Example:

spool_dir c:\dmail\spool_dir


suspend_domain <domain>

This will stop DSMTP sending any messages to the specified domain until an ETRN is received for that domain.

Example: suspend_domain test.com

See also suspend_domain_timeout


suspend_domain_timeout <time in minutes>

This will bounce messages being suspended for domains once the time has been reached

Example: suspend_domain_timeout 720

See also suspend_domain


sysadmin <email address>

This setting tells DSMTP who to contact if something terrible happens. Currently, those things are:

When DSMTP detects a mail-bomb incident

When DSMTP runs out of disk space (as specified by the min_space setting)

Also DSMTP automatically creates an alias for postmaster to this address (the postmaster alias is case insensitive and currently covers all domains).

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

This setting covers all domains and is not by default alterable by domain administrators.

Example:

sysadmin littlegreenman@area51.mil


tarpit_start <number>

This setting specifies the number of RCPT TO: lines at which DSMTP starts responding ever slower to further RCPT TO: lines in the SMTP protocol.

So if it is set to 7, for example, then when an SMTP session commences, DSMTP counts the RCPT TO: lines that the sender (i.e. an email client or another SMTP server) sends. On the 7th Rcpt To: line DSMTP will do the lookup on the email address, but then delay its response to the sender (e.g. 250 Rcpt User OK) by 1 second. After 3 more Rcpt To: lines it will delay each response by 2 seconds. Every further 4 lines received it will increase the delay by another second up to a maximum of 15 seconds.

This setting is an anti spam measure that is independent to the max_rcpts setting, but is intended to be used in conjunction with it. The slowing of the response is likened to being stuck in a tar pit, hence 'tarpit'. This is designed to be annoying to spamming robots as it clogs them up. If you simply reject a connection then it does not bother a spamming robot, but if you can slow it down then that should make your server less desirable as a spamming target.

This setting is not included by default, i.e. there is no point at which DSMTP responds deliberately slowly.

The setting tarpit_except is provided so that you can specify servers that should be an exception to this setting.

Example:

tarpit_start 5
will result in anything that tries to give DSMTP a message with more than 5 Rcpt To: lines, gradually getting a slower and slower response, starting with a one second delay on to the 5th Rcpt To: line.


tarpit_except <IPAddress>

This setting specifies any IP addresses which should never receive a deliberately slow response from DSMTP, even if the number of recipients in the session exceeds the tarpit_start setting.

This setting can take a comma separated list of IP addresses, and wildcard entries.

Example:

tarpit_except 1.2.3.4, 161.29.2.*
will result in connections from the IP address 1.2.3.4 and any IP address starting 161.29.2. not ever getting a deliberately slow response, i.e. being restricted by the tarpit_start setting.


tcp_max <number>

Specifies the maximum number of TCPIP channels that DSMTP listens on. This is the equivalent of DPOP's max_sessions setting. The default is 200 channels, or 200 concurrent incoming connections.


tcp_timeout <number>

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

NB: Setting <number> to something small could have unpredictable results. Be sure that you set this setting longer than your authent_timeout setting!

DPOP has the equivalent setting, pop_timeout.

Example:

tcp_timeout 120


timezone <string>

On NT, the _timezone variable gives unreliable results. If the timezone command is present, DSMTP will insert the <string> parameter where appropriate. i.e. In date fields:

Fri, 19 Jun 1998 02:03:30 <string>

Example:

timezone +1200 NZD


unix_case <switch>

This setting tells DSMTP if it should use strictly case sensitive user lookups for unix_user authentication. Normally, if DSMTP fails to find a user, it searches again for a case insensitive match. If only one is found, it uses that, otherwise it fails. Setting <switch> to 'true' will disable this feature.

Example:

unix_case true


user_quota <switch>

This setting activates mailbox quotas. For each user, there should exist a file called <username>_inf. In this file should be a line 'quota <number>', where number is the user's quota (in bytes). It is up to the system administrator to maintain the quota line in these files. DPOP will maintain the 'used' line, and DSMTP will not allow mail to be delivered to a dropfile whose 'used' bytes is greater than 'quota'. This setting should be used in conjunction with drop_max

Note: If there is no 'quota' setting in a user's _inf file then, DSMTP will not impose a quota restriction on that user.

The user quota setting has been extended in Versions 2.4i and above to take a numerical value instead of the 'true' setting. The value specified is a default quota (in kbytes) for users who have no 'quota' line in their username_inf file. E.g.
user_quota 40
would result in any user without a 'quota' line in their username_inf file having a disk quota restriction of 40 kbytes.

Examples:

user_quota true
would turn on disk quotas for those users with a quota setting in their username_inf file (manually entered by the system administrator).

user_quota false
would turn off all disk quotas, i.e. DSMTP would not make any checks on the user's disk usage, ignoring all quota lines in username_inf files.

user_quota 90 (ONLY valid in versions 2.4i and above)
would turn on disk quota's for all users. DSMTP would check the username_inf file for a 'quota' line, and use it if found and for all other users a default quota of 90 kbytes will be imposed.


virtual_user_post <filename>
virtual_user_pre <filename>

virtual_user_post: Adds a sendmail style virtual user table, actioned immediately before lookup.

virtual_user_pre: Adds a sendmail style virtual user table, actioned before any other local-user rules apply.

Both of these settings allow you to specify a file in which you provide aliases for user database names. In sendmail this is the common way to add virtual domains.

We have added support for such a file to help with conversion to DMail. However we strongly recommend that you move to our 'vdomain' style virtual domains so that you can take advantage of the features that they offer now, and will offer in the future. We of course always continue to support these settings so you do not have to change.

The difference between 'post' and 'pre' is when DSMTP looks up a user in these files. The 'pre' file is used as soon as DSMTP gets a RCPT TO: line, before any other checks for mail redirection, including the forward settings and alias files. Whereas the 'post' file is only checked just before the user database lookup, after all other mail redirection.

This means that if a message is addressed to bob and a lookup of the 'pre' file results in that being an alias for the user, 1234, then DSMTP will forget about 'bob' and only look for dmail.conf settings (including in alias files) for user '1234'. '1234' is also the username it will lookup in the authentication module. Whereas if that same alias was in the 'post' file you could add forward and alias settings for user 'bob' and still have his database 'username' of '1234'.

NB: the virtual_user_post file will only be looked at if the incoming message is for a local user, so this means that if you have,
@domainx.com    userx
in a virtual_user_post file, then you must have either a host_domain or vdomain setting for domainx.com, otherwise DSMTP will consider domainx.com a non-local domain and never even check for it in the virtual_user_post file.

The pre and post files have the same syntax of one 'rule' per line of the form,

<source><tab><destination>

The following are example syntaxes, along with effective changes to recipient addresses for each one:

  Syntax Comment Original Rcpt(s) 'changes to' Altered Rcpt(s)
1. user1@domain1     user2@domain2   user1@domain1 --> user2@domain2
2. user1@domain1    user2 No destination domain given, source domain implied. user1@domain1 --> user2@domain2
3. @domain1    user2@domain2 Implicit '*' wildcard for username. user1@domain1
user2@domain1
user3@domain1
...
--> user2@domain2
4. @domain1    %1@domain2 Replace %1 with the user from the matching line. user1@domain1
user2@domain1
user3@domain1
--> user1@domain2
user2@domain2
user3@domain3
5. domain1     user@domain1 If no @ in source, it's a fallback address user1@domain1 --> IFF user database lookup fails,
user@domain1

NB: DSMTP offers all of the functionality of the virtual_user file with its other settings, see,
forward
alias_file
fallback_address

NB: Syntax 4 is also possible with forward settings in versions 2.8m and above, e.g.,
forward    *@domain1    %1@domain2


virus_robot <virus daemon>

This setting activates DSMTP's virus scanning, it is far superior to the external_viruschecker setting. It is designed specially for use with RAV DMail. You simply specify where the rav dmail daemon is located.

Example:
virus_robot /usr/local/rav8/bin/ravdmail

For more infomation on this please check DMail's Anti-virus capabilties


warn_user <number>

This setting tells DSMTP when to alert the sender of a message that it is having trouble delivering the message. The <number> parameter is in retries, which occur every 2 hours. If the <number> parameter is larger than max_retry, DSMTP 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 roughly 8 hours). Delay warnings must be explicitly requested by the user by using the NOTIFY=DELAY ESMTP extension.

Example:

warn_user 5


use_forward_files true/false

This setting allows all checking of forwarding files to be turned off, so that DSMTP will not check for .fwd or .forward files.

The default is true.

For more information see,
forward files

Example:

use_forward_files false
would stop DSMTP from looking for any forward files.


Setting not found?!

You probably got here by using a link on our Complete Settings List page. That page lists all settings at the time of the latest compile, so we probably have not documented the setting you are looking for yet.

Please contact DMail Support with a list of any settings you want described and we will add them to these pages.


Back to Top of List