The VisualMail configuration file visualmail.conf

The visualmail.conf file contains all the configuration parameters of VisualMail and is located in the /etc directory.

 

The Banned Users file

The banned.cfg file contains a list of users that can't have access to VisualMail, one per line. Is suggested that you add any root users of your system to this list in order to avoid force brute password cracking.

 

The Language file

The language.cfg file contains all the messages displayed by VisualMail listed one per line. Modifying this file, you can customize date formatting options, error messages and some default texts.

The language file is common to both versions of VisualMail. Don't delete or add any line(s) of the language file, or you will receive error messages.

The date formatting macros are the same used by strftime():

 

The HTX Language

VisualMail creates all the HTML files using a languange called HTX.
The HTXs files contain a mini language used to place dynamic text and objects in the HTML that is displayed to the end-user.
The structure of the VisualMail HTXs is similar to the HTXs used by Microsoft Internet Information Server.
This language is very simple, it has only 'if' and 'while' control commands and tags used to print dynamic information and HTML objects.

Let's view an example of the HTX language:

1:<H1>Welcome <% UserFullName %> to VisualMail!</H1><BR>
2:<% if HaveMail %>
3:<B><U>You have mail!</U></B><BR>
4:<% while GetMail %>
5:<HR>
6: Message from: <% MsgFrom %><BR>
7: Subject: <% MsgSubject %><BR>
8: Size: <% MsgSize %><BR>
9: Date: <% MsgSize %><BR>
10: <% while end %>
11: <% else %>
12: <B><U>You don't have mail.</U></B><BR>
13: <% end if %>

Line 1 prints the Full Name of the current logged in user.
Line 2 checks if the user has mail on his mailbox, and if this condition is true the HTX is parsed until the <% else %> directive is found, otherwise the HTX is parsed from the <% else %> to the <% end if %> directive.
Line 4 is parsed from the <% while %> to the <% end while %> as many times as messages in the mailbox.
Lines 6 to 9 print information about each message.

Each HTX page has different commands, but there are some global commands that can be referenced from any page.

The following table describes the function of each HTX file:

File

Name

Description

login.htx

Login screen

Where the login is performed.

error.htx

Error screen

Displayed when an error occurs.

index.htx

Index Screen

Displayed after the user logs in, usually this screen is used to specify frames information.

optbar.htx

Option Bar Screen

Displayed as a frame, contains a toolbar.

This screen doesn’t contain additional HTX commands.

inbox.htx

InBox Screen

Where the messages are listed.

viewmsg.htx

Message View Screen

Where a message is viewed.

options.htx

Options Screen

Where the user selects which section to configure.

filterconf.htx

Filters Configuration Screen

Where the filters are configured.

This screen is only available in the enterprise version.

persconf.htx

Personal Configuration Screen

Where the personal options are configured.

servconf.htx

Server Configuration Screen

Where the additional mail servers are configured.

address.htx

Address Book Screen

Where the e-mail addresses and mailing lists are maintained.

folder.htx

Folder Screen

Where the folders are maintained.

This screen is only available in the enterprise version.

signconf.htx

Signature Configuration Screen

Where the signature is configured.

compose.htx

Message Compose Screen

Where the messages are composed.

logout.htx

Logout Screen

Displayed when the user logout.

 

As you can see this is a very simple language but very helpful to customize VisualMail and change default behaviors.

If you want to write your own HTX files, use as a guide the examples that come with VisualMail and read the Appendix A ( HTX command reference).