Configure IlohaMail

Introduction
All configuration files are located in "IlohaMail/conf". IlohaMail will work with just the default settings. In fact, it is recommended that you make sure your installation was successful before making the changes documented in this page (that way, if something breaks, you know it was some change you made to the config files).

Please look in the respective config files for up-to-date documentation!

login.inc

This file contains configuration options related to the login screen and login/logout process.

default_hosts

The $default_host variable can be used to determine how user's select the email server to log into and.
Value of $default_hostEffect
empty string a text box will be displayed (allowing users to specify any IMAP server).
"imap server" The imap server will be hard coded in a "hidden" tag.
array A popup menu containing all specified servers will be displayed. The popup will use the keys as the actual host string, but display the actual values of the array.

$adv_mode
Temporarily unused.

$default_port
The $default_port actually specifies the default "protocol", and should be set to 143 (IMAP) or 110 (POP3). If advanced mode is enabled, the user will be able to select either protocols, although this variable will still be used to set the default.

$default_rootdir
Default root directory. Rootdirs are not used for POP accounts, and are rarely used with IMAP accounts. The rootdir setting can be used if you want IlohaMail to ignore all folders except for those under a specific path. For example, if the folder list shows everything in ~user/ but all mailboxes are in ~user/mail/, set rootdir to mail (or ~/mail/).
If advanced mode is enabled, the user will be able to change the rootdir. Note, however, that the rootdir only has any effect the first time the user logs in. On subsequent logins, the user's preferences will be used (which can be changed in the Prefs panel after logging in).

$default_lang
Default language to use if user doesn't specify one when first logging in. See include/langs.inc for available languages.

$hide_host
Hides the "Server" field in login screen if $default_host is specified. (set to 1 to hide, 0 to show)

$hide_protocol
Hides protocol selection menu in login screen, uses $default_port. (set to 1 to hide, 0 to show)

$hide_rootdir
Hides rootdir field in login screen, uses $default_rootdir. (set to 1 to hide, 0 to show)

$hide_lang
Hides language selection menu (set to 1 to hide, 0 to show). If hidden, $default_lang will be used.

$logout_url
URL to redirect to when user logs out. Default is "index.php" which is the login screen.

$AUTO_APPEND
This directive allows you to specify a string to be appeneded to user ID's upon login. Different strings can be specified for different hosts. In the example below, "@domain1.com" will be appended for users logging into mail.domain1.com, and "@domain2.com" will be appended for those logging into mail.domain2.com.

$AUTO_APPEND["mail.domain1.com"] = "@domain1.com";
$AUTO_APPEND["mail.domain2.com"] = "@domain2.com";

conf.inc

Look at the comments inside the actual conf.inc file for up-to-date information!

backend

You can specify what kind of data backend to use.
Value of $backendExplanation
FS Default setting. All data stored on HD
MySQL Uses MySQL back-end for some, or all, features.
Make sure the conf/mysqlrc.inc file is properly set up.

$UPLOAD_DIR - Path to "uploads" directory
$CACHE_DIR - Path to "cache" directory
$USER_DIR - Path to "users" directory
$SESSION_DIR - Path to "sessions" directory

log

Settings related to the log feature. The log is deactivated by default. To store log entries in a database, make sure the appropriate table is present and configured (e.g. for MySQL in conf/mysqlrc.inc).
VariableExplanationsValue(s)
$log_active Turn logging on/off. Off by default. true or false
$log_file Path to log file (for file-based log only). Use absolute path or path relative to source directory. Make sure PHP has write privileges to the specified path/file. string, path to file
$log_template Template log entry (for file-based log only). Keywords in the template will be replaced with appropriate data when making an entry in the log. Keywords:
  • "date" : Date and time of entry
  • "ip" : client's IP address
  • "acct" : Account user is logging in as
  • "comment" : error message or comment
template string

Spam Prevention

This feature is not for blocking incoming spam, but for preventing possible use of IlohaMail for spamming purposes.
VariableExplanationsValue(s)
$max_rcpt_message Maximum number of recepients per message integer
$max_rcpt_session Maximum recepients per session. Once this value is sent, the user must log out and log back in in order to send again. integer
$log_template Minimum interval between "Send"operations. This is to prevent automated spamming, but make sure the value is not prohibitively high. (Anything more than 60 seconds might cause undue inconveniences for the user.). integer (seconds)
$report_spam_to Useful for ISP's that have some address where users can report spam. If this string is not empty (it is assumed to be an email address), a "Report Spam" link will be added in the read message window. Clicking on the link will open a message composition window with the value of this setting in the "To" field and the full message header+body in the message box. string (email address)

AUTH_MODE

This directive allows you to specify the default authentication method when connecting to IMAP servers.
Value of $AUTH_MODEExplanation
"plain" Default. Always uses plain text authentication
"auth" Attempt to use encrypted authentication methods (currently CRAM-MD5), and revert to "plain" if that fails.
"check" Checks for authentication methods supported by the IMAP server. It'll use encrypted authentication if available, otherwise plain text authentication will be used.

MAX_EXEC_TIME
This directive specifies the maximum execution time for individual pages, and overrides the PHP defaults (usually 30 or 60 seconds). Set this directive to a numeric value (includig 0 for "unlimited").

TRUST_USER_ADDRESS
Deprecated - For all intents and purposes, TRUST_USER_ADDRESS is always on since alternate sender identities allows users to override From and Reply-To fields. However, the username and host the user is logged in as is now in Received header.

SMTP_SERVER
This directive specifies which SMTP to send messages through, when using the custom SMTP library (which is disabled by default). For information on the custom SMTP library, refer to the documentation included in the source distribution.
SMTP_USER, SMTP_PASSWORD - For use with SMTP Authentication. Leave blank if you want to use actual user's account to authenticate.

TAG_LINE
Text to be auto-appended on out-going messasges.

TAG_LEVEL
This option is only for database backends. In the database backend, each webmail user is given a "user level". If you set the $TAG_LEVEL to 1, then all all users whose level is 0 will have tag lines appended to their messages, while users with level of 1 or higher will not.

MAX_SESSION_TIME
Maximum duration of sessions. Once a session expires, users will be prompted to log out and log back in. With a database backend, there's is a maximum limit of 24 hours.

MIN_FOLDERLIST_REFRESH, MIN_RADAR_REFRESH
Version 0.8.x allows users to specify the refresh interval for both the radar (upper right corner that checks for new messages in IMAP accounts) and folder list (also only in IMAP). See comments in actual conf file for more info.

defaults.generic.inc

Specify default values for user configurable options. All of the settings here can be changed by the user. All you can do is set the default values.
If your webmail interface will be supporting multiple servers that require different default settings (i.e. for rootdir, sent box name, etc), you can do so. See the next section for more info.

$default_colors
Element Description
tool_bg Tool bar background color.
folder_bg Folder list background color
folder_link Folder list text color
main_bg Main frame background color
main_hilite Main frame hilite color. Used on alternating lines in main list display.
main_text Non-link text color in main frame.
main_link Link color in main frame.
quotes Color of quoted text.

$default_prefs Value(s)
Element Description
colorize_quotes Detect and colorize quotes (lines beginning with '>'). 1=On, 0=Off
detect_links Detect URLs, and show as links 1=On, 0=Off
view_max Maximum number of messages to show on a page in the list view. integer value
show_size Show message sizes in list view. 1=On, 0=Off
save_sent Save sent messages. If set to 1 (on), there must be a value folder name entered in the next value ("save_box_name"). 1=On, 0=Off
sent_box_name Name of folder where sent items should be stored. Previous value (save_sent) must be set to 1, for this feature to take effect. string: folder path
delete_trash When this is enabled, the trash is automatically emptied. 1=On, 0=Off
trash_name Name of folder where deleted items are stored. If none are specified, message marked for deletion are deleted immediately. string: trash folder path
rootdir Root directory, where all email folders are located. IlohaMail will only list folders inside the rootdir. $rootdir (Allow user to specify during login)
-OR-
root directory name
user_name User's display name. Leave this one blank...
email_address User's email address. Typically, this should be left blank.
signature1 Signature...leave blank
show_sig1 Attach sig by default? Disable, since there is no sig by default. 0
lang Language to use for the interface. $lang (allow user to select when logging on)
-OR
language code
charset Character set encoding to use. $lang_charset (if you set "lang" to $lang)
-OR-
character set code
sort_field Default sort field in list view. "DATE","SUBJECT","SIZE", or "FROM"
sort_order Default sort order in list view. "ASC" or "DESC"
list_folders Show folder list (in a column on the left hand side) as default 1=Show, 0=Don't show
view_inside Read messages inside the frame. Turn off to show in new window. 1=In frame, 0=New window
timezone Default timezone Integer: -12 to 12
html_in_frame Show html message in frame/window instead of external window
Some messages may not render correctly, or show unfavorable content.
0 or 1
show_images_inline Always show image attachments inline, after main message 0 or 1

$init_from_address
This specifies how to format the user's email address, especially when it does not take the form user@host.
Value Description
"%u" Use if user name is the email address
"%u@domain.com" This will set the address to user@domain.com even if the mail server is called something else (like "mail.domain.com")

defaults.host.inc

If you're supporting multiple IMAP servers that require different default settings, you can do so by creating multiple defaults.host.inc files. In other words, if you had two servers "exchange.domain.com" and "imap.domain.com", simply create a file called "defaults.exchange.domain.com.inc" and "defaults.imap.domain.com.inc".

If a matching defaults.host.inc file isn't found, IlohaMail will attempt to use the defaults.generic.inc file, so make sure it's available (and properly filled in).