Initial configuration to set up the database connection settings is done through a configuration file is located in the config directory
and is called
config.inc.php. You can edit this file in a simple text editor such as Notepad.

All other configuration is done through the administration area by pointing your web browser to the admin directory.

Once you are logged into the admin area you can change the majority of settings from the Options link on the menu. This is a list of default settings for how DWmail should operate
and behave.
To change a setting simply edit the relevant setting and press Update Settings. Some of these settings can be over-ridden by the user in their preferences and some cannot.

The options section is seperated into sections to make it easier to understand.

Protocol Configuration

DWmail can connect to mail servers using four protocols, IMAP4, POP3 and their
respective protocols via SSL. Each of these protocols operates on what is called
a port number. There should be no need to changes these values. These ports
will need to be allowed through any firewall you may have if DWmail is operating
in 'remote' or 'domain' mode.

This determines which protocol type to use for the standard login page.

If DWmail is running in 'remote' mode we recommend setting this to POP3, however
if it is running in 'local' mode we recommend IMAP4

Valid settings:
POP3
IMAP4
POP3 over SSL
IMAP4 over SSL

Allow SSL Connections

User Configurable: No

If this is enabled it will allow a user to connect via SSL from the advanced
login page. You will need the SSL ports open though any firewall that you may
have. You will additionally need --with-imap-ssl configured to PHP to use this

Valid settings:
Enabled
Disabled (default)

Security Settings

Flood Filter

User Configurable: No

The flood filter is a check to prevent someone sending lots of email in a
short amount of time. When a user sends an email the time is logged and they
cannot send another email until the flood filter time has elapsed. The flood
filter time is in seconds.

The default setting is 120 seconds.

Maximum Number of Recipients

User Configurable: No

This allows you to define how many people a single email can be sent to. This
is a calculated total of the to:, cc: and bcc: fields.

The default setting is 50

Advanced Spoofing Protection

User Configurable: No

By default in DWmail, when you login via the advanced login you can enter
any email address you like. Spoof protection checks that the domain after the
@ symbol in the email address is contained in the mail server details. For
example if your email address is fred@fred.com and your mail server is mail.fred.com
you'll be allowed in. However if your email address is fred@fred.com and the
mail server is fred@jane.com then it will be rejected.

This will only be used if 1) advanced login is used and 2) DWmail is in remote
mode

Valid settings:
Enabled (default)
Disabled

Image Verification on Login Page

User Configurable: No

Users must enter the value of a randomly generated image in order to login.
GD support is needed but will be automatically detected.

This is called a CAPTCHA technique (see http://www.captcha.net/).
CAPTCHA is a system that can generate and grade tests that most humans can pass,
but current computer programs can't pass. For example, humans can read distorted
text as used by DWmail, but current computer programs can't. This is used to
prevent automated spam bots from logging in and sending email through DWmail.
Additionally for accessibility reasons, DWmail also supports audio generated
CAPTCHAs which require the FLITE speech engine (http://www.speech.cs.cmu.edu/flite/)
and have access to the shell_exec() function in PHP.

Do you wish to allow user to send email file attachments through DWmail. Your
PHP installation must be able to accept file uploads and open_basedir have
access to the upload directory (usually /tmp). If open_basedir doesn't have
a value then that is OK too. Messages with attachments will be sent as MIME
Multipart.

Valid settings:
Enabled (default)
Disabled

Number of attachments per email

User Configurable: No

You can define the maximum number of attachments a user can send in a single
email. This doesn't include forwarded attachments.

The default setting is 4

Allowed file extensions & Disallowed file extensions

User Configurable: No

Allowed or disallowed file extensions for uploaded attachments. If you wish
to deny certain file extensions then only fill in the denied array, and if you
wish to only allow specific file extensions then only fill out allowed array.
One of the arrays must always be blank, by default it's the allow array.

This should be a comma seperated list

'.pl','.exe','.sh','.py','.bat','.pif'

Administrator signature

User Configurable: No

As the administrator you can set a signature to be added to the bottom of every
outgoing email sent using DWmail. Plain text signatures are located in the template
file signature.tpl and HTML signatures
are located in the template file signature_html.tpl.
These are in the current template set's directory.

Valid settings:
Enabled
Disabled (default)

Default compose editor

User Configurable: Yes

The default type of editor to write messages with. You can choose from: plain text, html (this must be a full HTML message) or WYWISYG rich text editor

Valid settings:
Plain Text
HTML
WYSIWYG Rich Text Editor

View Settings

Full Date Format

User Configurable: Yes

This will be displayed automatically converted to the default or user's timezone preference This must be in the form of a valid PHP date format http://uk.php.net/strftime
Default setting - %a, %d %B %Y %H:%M:%S

Default Setting:
%a, %d %B %Y %H:%M:%S

Handle Read Receipts

User Configurable: Yes

A sender of an email can request a read receipt when you view the message.
This function allows you to disable this functionality. If it is enabled you
will still be asked if you wish to send one rather than blocked them outright.
This is useful for IMAP connections, however with POP3 connections the email
always displays as a new message and so DWmail so always asks if you wish to
send a receipt.

How many messages should be displayed in the mailbox listing before it wraps
over to a next page.

The default setting is 25

View Message Type

User Configurable: Yes

You can set viewing of HTML messages to one of five settings. There is a bug in the current version of DWmail's control panel where this displays a text box requesting a numeric entry (this should be a drop down). So until this is remedied please use the following numbers for settings

Note: A very few HTML emails are incorrectly sent as text/plain which means
it will always be displayed as plain text in DWmail

This will attempt to seperate the signature from the rest of the body elements

Valid settings:
Enable (default)
Disable

Image Preview

User Configurable: Yes

When viewing an email and that email contains attached images which can be
read by a web browser, you can opt to automatically preview these below the
main body of the message. This settings can be used in conjuction with the user preference to automatically resize previewed images.

Valid settings:
Enable (default)
Disable

Time Zone

User Configurable: Yes

The default timezone setting for all users when they initially login to DWmail.

Default Setting:
GMT (Greenwich Mean Time)

Date Format & Date Format 2

User Configurable: Yes

Short Date Formats
Note this will be displayed automatically converted to the default or user's
timezone preference. This must be in the form of a valid PHP date format http://uk.php.net/date

Logs all successful logins and email composes to the system by a timestamp

Valid settings:
Enable
Disable (default)

Log IP Addresses

User Configurable: No

If Statistics Logging is enabled
you can optionally log all access attempts against IP address. If you enable
this setting you should make your users aware that you are capturing this information.

Valid settings:
Enable
Disable (default)

General

Interstitial Page

User Configurable: Yes

This makes use of a temporary redirect page when logging in. This is very
useful if you use DWmail in remote mode as logging in can take some time if
the mail account isn't on the same server as DWmail and that account holds
a lot of email.

If someone only enters a username into the login box (i.e. no @ or anything
after it), DWmail will automatically append the following domain name to that
username. Very useful for ISP based webmail where all email addresses are from
the same domain name.

The default setting is: localhost

External Email Retrieval

User Configurable: No

By enabling this setting users can import email from remote POP3 accounts
to an IMAP4 mailbox.

Valid settings:
Enable (default)
Disable

Enable Calendar

User Configurable: No

Turn on or off the calendar functionality

Valid settings:
Enable (default)
Disable

Enable Contacts (Addressbook)

User Configurable: No

Turn on or off the addressbook functionality

Valid settings:
Enable (default)
Disable

Enable Notes

User Configurable: No

Turn on or off the notes functionality

Valid settings:
Enable (default)
Disable

User Preferences

User Configurable: No

Do you wish to allow users to set their own preferences.

Valid settings:
Enable (default)
Disable

Mailbox Auto-Refresh

User Configurable: Yes

Allow the current message listing to refresh after a pre-determined number
of seconds. Note that this refreshes the actual inbox, DWmail user preferences contain the ability to use AJAX based background checking.

Default setting:
0 - NEVER (default)

Inbox Filtering

User Configurable: Yes

Inbox filtering allows a user in IMAP and DWmail in database mode to configure
filtering rules for new messages upon viewing the INBOX, such as deleting or
moving messages.

You should not enable this by default unless you have already added your
own filter rules to the database.

Valid settings:
Enable
Disable (default)

Inbox Caching

User Configurable: No

This creates a copy of the Inbox in memory for speed and efficiency so that a server request is not needed every time you reload the main Inbox. This has no effect when using the NOSORT mailbox sorting mode.

Valid settings:
Enable
Disable (default)

Cache Refresh

User Configurable: No

Automatically force a new refresh after a time period (in seconds)

Default setting:
900 seconds

Full Email Address as Username

User Configurable: No

By default, when using standard login, DWmail takes the email address entered
and uses the part in front of the @ symbol to form the username and the domain
name after the @ to guess the mail server details. However some mail servers
require the entire email address as a username. This setting allows you to let
the standard login use the entire email address as your username instead.

Valid settings:
Enable - use full email address as a username
Disable (default) - use part infront of the @ symbol in the email address as a username

IMAP Settings

These functions only work if the user is logged in using the IMAP4 protocol

Folder delimiter

User Configurable: No

This is usually a single dot, but it could be a slash or anything else. Bear
this in mind when you are giving your default folder names below. If we detect
a different delimiter in use on your server, this value will be changed automatically
for that session

Default setting:
. (a dot/period)

Save Sent Mail

User Configurable: Yes

If enabled outgoing emails are stored to the sent-mail folder. DWmail will use
the Sent Mail folder defined in the settings, if this does not exist one will be created automatically.

Valid settings:
Enable (default)
Disable

Move to Trash

User Configurable: Yes

When deleting messages in POP3 mode emails are removed immediately from the
server. Using IMAP4 you can opt to send deleted messages to the Trash folder so you
can delete them later. DWmail will use the folder 'Trash', if this does not
exist one will be created automatically.

Valid settings:
Enable (default)
Disable

Folders

Default Sent messages folder

User Configurable: Yes

Unless you know what you are doing we advise leaving this setting alone.
For advanced users, this is folder for saved messages. Note that sub-folders
take the form folder.subfolder for most mail servers so for a subfolder of the inbox it becomes
INBOX.subfolder.

Some IMAP servers do not allow folders to be created above
the inbox so changing this could break DWmail. You have been warned.

Default setting:
INBOX.sent-mail

Default Trash folder

User Configurable: Yes

Unless you know what you are doing we advise leaving this setting alone.
For advanced users, this is folder for deleted messages. Note that sub-folders
take the form folder.subfolder for most mail servers so for a subfolder of the inbox it becomes
INBOX.subfolder.

Some IMAP servers do not allow folders to be created above
the inbox so changing this could break DWmail. You have been warned.

Default setting:
INBOX.Trash

Default Drafts folder

User Configurable: Yes

Unless you know what you are doing we advise leaving this setting alone. For
advanced users, this is folder for saving draft messages. Note that sub-folders
take the form folder.subfolder for most mail servers so for a subfolder of the inbox it becomes INBOX.subfolder.
Users can change this preference if using database mode.

Some IMAP servers do not allow folders to be created above the inbox so changing
this could break DWmail. You have been warned.

Default setting:
INBOX.Drafts

IMAP Folder Subscriptions

User Configurable: Yes

If you use this we will only display folders you are currently subscribed
to. INBOX will automatically be subscribed to if it isn't when you login

Valid settings:
Enable
Disable (default)

DWmail mode

DWmail mode

User Configurable: No

There are three modes in which DWmail can be run. By default DWmail allows
users to connect to any POP3 or IMAP4 email account whether remotely serviced
OR on your local server. Other modes include, 'local mode', which only allows
connections to a single mail server (for as many domains can be accessed through
that mail server) and 'domain mode' which is a comma seperated list of domain names that
you wish to allow access to DWmail.

Valid settings:
Remote mode (default) - Allows access to any public POP3 or IMAP4 server
Local mode - Only allow connections to the server defined as the default server in the settings
Domain mode - Only allow connections to domains defined in Allowed Domains setting in the settings

Default Server for LOCAL Mode

User Configurable: No

The default server information for LOCAL mode. This is your default IMAP4
or POP3 server. When using LOCAL mode only connections to this server are allowed. If the mail server is on this computer as your DWmail installation
than you can use 'localhost'. We additionally recommend using IMAP4 as a default
mode if you use local mode if at all possible.

Default setting:
localhost

Use SMTP

User Configurable: No

By default DWmail sends email using the in built PHP mail() command. This
connects to whichever mail format is defined in your PHP settings. However
the error reporting for sending failures is not accurate via this method.

If you are using DWmail in local mode you can switch to send email directly
via SMTP which is much more reliable at detecting sending failures. Please note you should ONLY enable this setting if using LOCAL mode.

If you have enabled Use SMTP you
will need to tell DWmail what your SMTP server is. If your SMTP server is on
the same computer as DWmail you can use 'localhost'

Default setting:
localhost

Use SMTP Authentication

User Configurable: No

Some SMTP servers require something called SMTP authentication. This tries
to make sure that a user is authorised to connect to the SMTP server to send
email. Note: If you require SMTP authentication then PHP mail() may also
not work. DWmail will use your mail server connection details as the SMTP authentication settings.

Valid settings:
Enable - Use SMTP Authentication
Disable (default)

Server Name for HELO connections

User Configurable: No

If you are using SMTP you'll need to define a server name used for HELO connections.
If the SMTP server is on the SAME server as the current webserver you can use
'localhost' otherwise you should put the current name of your server. This can be thought of as a handshake between your server with DWmail installed and the mail server. The mail server says hello to the web server and the web server says hello back, but it says hello with the name of itself.

Default setting:
localhost

Allowed Domains for Domain Mode

User Configurable: No

If DWMail is set to 'domain mode' then you must also set the Allowed Domains comma seperated list. This contains the domain names you wish to allow users to check their
email for.

The format must be comma seperated such as 'domain1.com', 'domain2.com',
'domain3.com' Where you can seperate each domain by commas. Please also enclose each domain in single quotation marks.

Default setting:
'localhost'

HELO Connection Type

User Configurable: No

Some servers use the HELO command when initiating an SMTP connection some use EHLO. This allows you to switch between them.

Valid settings:
HELO
EHLO

Compatibility Settings

Unfortunately not all IMAP or POP3 servers behave in the same way. These settings
try to rectify these problems.

Compatibility Mode

User Configurable: No

If for some reason your IMAP server refuses to login with the default
settings you might want to try this compatibility mode. This is most relevant
to RedHat 8.0+ or Apache 2.0 systems. Note: Some systems will work in both
modes, if your system logs in ok, then you don't need to change this setting.

The most common way to spot this error taking place is an SSL certificate error such as:
localhost: unable to get local issuer certificate: /C=US/ST=UT/L=Salt Lake City/O=xxxxxxxx Network/OU=xxxxxxxxxxxCN=UTN-USERxxxxxxx

This is only relevant when logging in via IMAP. If you using Cyrus IMAP
server or SIMS IMAP server and are using are
using extended IMAP functionality such as moving messages between folders
or saving sent email you should enable this setting. This should also only
be used in 'local' mode.

This setting exists because these servers handle end-of-line terminators
differently to most.

Valid settings:
Enable - Yes we are using Cyrus or SIMS IMAP
Disable - No we are not (default)

RSS

Enable RSS Reader

User Configurable: No

Allow users to make use of the RSS Reader

Valid settings:
Enable (default)
Disable

Display in folder window

User Configurable: Yes

View the latest headlines automatically in your mailbox

Valid settings:
Enable (default)
Disable

CONFIG.INC.PHP Database Settings

The database settings can only be defined in the configuration file. This can be found in the config sub directory and is called config.inc.php

Use Database Library Type

User Configurable: No

The function library to use for your database connections and queries. DWmail
supports the following types

MySQL functions (default)
For PHP versions 4 & 5 and MySQL 3.x+. This should work with the majority
of MySQL systems, however you should note that if you are using MySQL 4.1+
there is a new password hashing
system
in
place
for
this
version
and PHP
can't
connect under the mysql function libraries because it cannot send the correct
password. If this is the case you must either use the MySQL command
OLD_PASSWORD() when you add
the user to the database or use the mysqli extensions.

MySQLi functions
For PHP version 5+ ONLY and MySQL 4.1+ ONLY. You do not need to use the OLD_PASSWORD()
function when creating a user if you intend to use the mysqli library but
you must have the mysqli libraries installed instead or in addition to the
mysql libraries

What is the location of your Database Server, usually this is 'localhost'

$CONFIG['db']['server'] = 'localhost';

Username to your database

The username required to connect to your DWmail database

User Configurable: No

$CONFIG['db']['user'] = 'dwmail';

Password to your database

The password required to connect to your DWmail database

User Configurable: No

Note: MySQL 4.1+ has a new password system, and PHP cannot connect to it
because it cannot send a correct password. You must use the MySQL command
OLD_PASSWORD() when adding a user to the database, or PHP cannot connect. Try to use MySQLi libraries if using PHP 5+ and MySQL 4.1+

$CONFIG['db']['password'] = '';

Database Name

User Configurable: No

This is the name of the database you wish to store your DWmail profiles and
settings in. This database must already exist before you install DWmail

The default setting is 'dwmail'

$CONFIG['db']['dbname'] = 'dwmail';

User Expiry Cleanup

User Configurable: No

You can set how many days a user's profile and details should be stored if
they haven't logged in for that period of time. For example if you set this
to 120 then if a user hasn't used DWmail for 120 days they will be deleted
from the database. You should also make people aware of this on your site otherwise
people might complain about you deleting their personal information (ALL records
including addressbook and calendar entries will be deleted)

To disable set this setting you can set this variable to 0

The default setting is 120 days

$CONFIG['db']['cleanup'] = 120;

Local Settings from Database

User Configurable: No

If this is set to 1 then all further configuration variables will be loaded from the database. This is the default setting for DWmail. If disabled then database settings will be ignored and all settings will come from the user's own preferences and those defined in the config.inc.php file.

DWmail contains a sample setting file in the config directory called config-filedist.inc.php. Rename this file to config.inc.php to use it instead of the default one.