A manager's page is provided as part of the cgi in order to let the system administrator change settings in the user.dat files. On this page it is possible to change any setting for a wildcard selection of users, and to perform other managerial tasks. See below for an example of how to change the disk_quota of all your users.
To access the manager's page you enter an url of the following form:
http://my.site.com/cgi-bin/webimap.cgi?cmd=manager
In order to access the manager's page, you will require the use of a 'managers_password' which must match the corresponding setting in the webmail.ini configuration file. Before any manager function can be used you must enter the manager's password.
An example of the manager's page (after entering the password) is shown below:
On the manager's page it is possible to examine/edit the details of any user. It is
also possible to make changes which affect all users, or a select group of users. To
do this, enter the wild card user list, the variable to change, and the new value. In the
example setting, the 'default_quota' of each user is changed to 1000
kilobytes.
When using WebMail on an nsf server, you will need to add the following to your ini file:
nfs_server true
lock_force_wait trueThis will ensure that only one cgi at any time will have access to the user information..
You should also see server farming is you place to un WebMail on more than 1 machine.
WebMail support mutiple template sets. Allowing differnent styles or even different languages on the one site. Each template can have it own template directory as well as it own image location. In your ini file you add one line for each template set that you wish to have inthe following layout:
tpl_set <number> <templates_dir> <nwimg> <name>
The 'number' is the template number that is used to determine which template you are using, this should be unique. The 'templates_dir' is the full path to the template directory.
The 'nwimg' is the web server relative path to the images.
And 'name' is just text that is displayed to the user about the template set.Example:
tpl_set 1 /var/spool/webmail/marble /nwimg/mail/marble Marble
tpl_set 2 /var/spool/webmail/iconic /nwimg/mail/iconic Iconic
tpl_set 3 /var/spool/webmail/globe /nwimg/mail/globe GlobeThe next step is changing the templates to allow allow the users to select which templates they want to use. Below are the template additions needed to allow the user to select which template to use.
login.tpl
||ifdef||multiple_tpl||
<!--- If you wish multiple template set to be user selected then remove the following --->
<!--- The uses then can select their template sets on the configuration page. --->
<tr>
<td align="right">Select Template Set:</td>
<td> <select name="selected_tpl" size=1>
<option value="">(Default)</option>
||begin_tpl||
<option value="||tpl_number||">||tpl_text||</option>
||end_tpl||
</select>
</td>
</tr>
||endif||config.tpl
||ifdef||multiple_tpl||
<tr>
<td align="right">Select Template Set:</td>
<td> <select name="_selected_tpl" size=1>
||begin_tpl||
||ifequal||_selected_tpl||tpl_number||
<option selected value="||tpl_number||">||tpl_text||</option>
||else||
<option value="||tpl_number||">||tpl_text||</option>
||endif||
||end_tpl||
</select>
</td>
</tr>
||endif||
WebMail does support bulletins were only WebMail users will see. So you can tell WebMail users about htee lastest changes and updated to WebMail. Or any other informtion that you want WebMail users to have.
Their are a few ini setting which are used for bulletins these are:
bulletin_path /var/spool/webmail/bulletins
bulletin_users lynden,ralph,adim*
bulletin_dflt_time 30
bulletin_max_time 30The 'bulletin_path' must be setup and the directory exists for bulletins to work. This is where all the bulletin emails are stored. The 'bulletin_users' are the list of users that are allowed to send bulletins. The last two settings are used to determine how long the bulletin will last before it is removed automatically.
The template 'send_bull.tpl' is the template that is used to send a bulletin message. The template 'bulletin.tpl' is the template that lists the current bulletins available. When sending a bulletin you can specific the list of users if you wish that will receive this bulletin, where the default is that all users receive the bulletin.
When their are bulletins that users have not seen before when they login they will automatically be shown the bulletin lists instead of the email list so that they are forced to see at least the subject of the bulletin. When using frames template set the 'frame.tpl' has the code that redirects the page.
ie. ||ifdef||display_bulletin||
<frame src="||action||?cmd=bulletin&utoken=||utoken||" name="list">
||else||
<frame src="||action||?cmd=list&utoken=||utoken||" name="list">
||endif||When using non-frames the template change is done internally by the CGI.
WebMail can support server farming, were you setup copy of the CGI on each machine.
On one machine you setup a workarea where all the user profiles are stored.
ie. /var/spool/webmail
Then on each of the other machines you have to setup (map/link) to this location. This way each machine can be setup to point to the one workarea location. Depending on what map/link you setup on each machine you setup the workarea ini setting to match.
With the templates you have a choice, you can do the same as above where their is only 1 copy of the templates and each CGI points to it. Or you can have a seperate copy of the template set on each machine, thus saving networking band width.
NOTE: Since that you are running the CGI on multiple machines you will need to purchase a licence for each machine. You should talk to sales@netwinsite.com about discounts for multiple purchases.
WebMail can support multiple groups of users in several different ways. The method you choose will depend on which IMAP/POP and SMTP servers you use, and how they support virtual domains. The first method is the most popular because it allows the greatest flexibility and control.
METHOD 1:
The most powerful method is to use the vhost, vend and ini settings. This gives the greatest amount of flexibility. After WebMail is running on one domain, vhost blocks can be added to your ini file, thus creating settings specific to each domain. If users from domain1 use the url 'http://domain1/cgi-bin/webimap.cgi' and users from domain2 use the url 'http://domain2/cgi-bin/webimap.cgi', both access the same copy of webmail.cgi but will be kept separate by the vhost sections of webmail.ini.
A typical example might be
vhost domain1
domain domain1
pophost pop.domain1
vhost domain2
domain domain2
pophost pop.domain2
vendIn the line
vhost xxx
the xxx is matched against the host name in the url. (This is usually taken from the cgi environment variable SERVER_NAME but you can match against anything else - say HTTP_HOST by adding an ini setting 'vhost_match HTTP_HOST')
If the same pophost is to be used but with a username suffix, the above would be changed to:
vhost domain2
suffix /d2
vendor
vhost domain2
suffix @domain2
vendThe vhost - vend can bracket any ini settings and can be applied to any users from that domain. For example, to use different templates for domain1 we might have:
vhost domain2
suffix /d2
templates \webmail\domain2
vendor
vhost domain2
suffix @domain2
templates \webmail\domain2
vend
METHOD 2:
If you only have a few virtual domains, duplicate the webmail cgi and ini files, and run multiple copies specifying different pophost, smpthost and domain settings. An advantage to using this method is that you can allow each domain to administer it's own ini file.
METHOD 3:
This method will work for everybody, so may be the best option if you are not able to use method 4. In this method, user's enter a POP host as part of the login page, either as a separate field or as a part of their username. This requires one of the following to be setup in the ini file:
@pop true
@imap truee.g. username: lynden@domain2
Also it would be best to setup WebMail to only allow the mail servers you wish to use. To do this you use the ini setting 'allow_host_login'. This setting can also have wild cards and have many values.
allow_host_login 1.2.3.4
allow_host_login 1.2.3.*
METHOD 4:
This method will work for everybody, so may be the best option if you are not able to use the last method. This method, the user's selects a POP host to use and enter their username and password. This requires a template change on the login.tpl changing the host setting to be a pulldown menu instead of a text field.
<select name="host">
<option value="1.2.3.4">Student Server</option>
<option value="1.2.3.4">Student Server</option>
</select>Also it would be best to setup WebMail to only allow the mail servers you wish to use. To do this you use the ini setting 'allow_host_login'. This setting can also have wild cards and have many values.
allow_host_login 1.2.3.4
allow_host_login 1.2.3.*
The template files can be edited to provide an interface in a language other than English. In addition, the names of folders such as Trash, Sent, ...etc can be changed using ini file settings. WebMail also has a language file where all WebMail generated messages can be translated. In order to setup the cgi to use this lang file or any other lang file, you need to add the following to your ini file:
lang_file lang.dat
The lang.dat file will contain two lines for each error or message contained in the package. Lines beginning with a # denote comments. The lines look like this:
I23 %d of %d users from %s user directories deleted successfully
Translation of: I23 %d of %d users from %s user directories deleted successfullyThe I23 identifies the particular message. Normally 'I' is used for information, 'E' for errors and 'W' for warnings. The second of each pair of lines should be replaced with a translation into whichever language you want to use. When editing the line, be careful not to remove the %d %s parts as these are replaced at run time with relevant information. In the example above, the actual message shown might be:
I23: 1 of 1234 users from c:\webnews\u_* user directories deleted successfully
If you are running multiple template sets in different languages you may also like the INBOX, Sent, Draft, (and other folders) to be translated into another language. In this case, setup the folders in one language, (i.e. English).
i.e.: waste_name Trash
copy_name SentWhen the ||fld|| or ||folder|| is being displayed to the user, use the ||lang||x|| template command. This will take the folder name and do a lookup in the lang.dat file.
i.e.: ||lang||folder||
Next, place the appropriate translation in your lang.dat file.:
INBOX
Translation of: FRENCH_INBOXTrash
Translation of: FRENCH_TrashSent
Translation of: FRENCH_SentOther common folder names can be translated as well if you wish.
In version 2.0s of WebMail and higher on the item template is the TPL code:
||ifdef||email_charset||
<meta http-equiv="Content-type" content="text/html; charset=||email_charset||">
||endif||The template varaible 'email_charset' is being setup depending on the charset setup by the email message. Due to this should not be translated into a different language because it may be labelled with different charset values depending on the message's charset, and so might cause display issues.
WebMail supports the use of user global address books. This allows users (or admin) to setup address books that other users can setup to access. Below are the steps to creating a global address book.
- Select (or create) a user to administer the address book (eg. addresses@your.domain
- Create an address book ensuring that it starts with the name:
pub_
ie. pub_book- Add users details to this address book.
The above will setup an address book that other users can access if they setup in their global address book setting on their address book page.
If they enter the name of the user(s) that has the global address book setup inside their 'Public address book' setting they will then have access to view their address books. A user can enter more than 1 user by seperating the names with commas.
ie. addresses,john,ralph
Only the user which setup the address book can add/change fields inside the address book.
If as an admin you wish to make all current user have an global address book setup that you have just setup you can use the managers page (http://your.domain.com/cgi-bin/webmail.cgi?cmd=manager) to set the user varaible 'gaddr_books' to the user that you have setup with the address book.
ie. addresses,john,ralph
If then want all new users to WebMail to also have this setup you will need to add the setting to the default.dat file in the templates directory (in each template directory). If this file is not already their you should create it ad add the line like the following:
gaddr_books addresses,john,ralph
WebMail version 2.0g and higher supports the use of external global address books. This allows the cgi to talk to the external program, which in turn talks to the external address book.
The external address book is a globally accessible address book which you can ask for queries. Only the administrator can change and/or update the data. This is normally done with some other external program. Users can only read the information.
The interface and details of the external address book protocol used, can be found at: External Address Book.
WebMail versions 2.0f and higher have the ability to auto-login to any other Netwin products which include the auto-login feature. This saves time for the user because he/she can go from one product to another without having to login each time. The password is encrypted and saved in a temporary file on the machine (not accessible from the net), making the process relatively safe.
In order to create links in WebMail which auto-login to another Netwin product, the following ini setting needs to be setup:
netwin_autologin <url> <product directory> <extra>
The <url> is the relative or full url to the other product. The product directory is the workarea directory of the product. WebMail also allows multiple auto-logins, so you can setup multiple ini settings like the following:
netwin_autologin /cgi-bin/webnews.cgi /var/spool/webnews
netwin_autologin /cgi-bin/webmail.cgi /var/spool/webmail
netwin_autologin /cgi-bin/webmail.cgi /var/spool/webmail
netwin_autologin /cgi-bin/cwmail.cgi /var/spool/cwmail &vhost=this_host_name&tpl_set=configThe cgi must have write access to the 'product directory' because an encrypted password file is created which the other product uses for the login.
Once the ini setting is setup, the next step is to add a link somewhere in WebMail (on any template that logs the user into the other product). The links are as follows if the above 'netwin_autologin' ini settings are used (note: the order of the ini settings above must correspond to the numbers used in these urls):
<a href="||action||?cmd=netwin_login-0&utoken=||utoken||">Login to WebNews</a>
<a href="||action||?cmd=netwin_login-1&utoken=||utoken||">Login to WebMail</a>
<a href="||action||?cmd=netwin_login-2&utoken=||utoken||">Login to WebMail</a>
<a href="||action||?cmd=netwin_login-3&utoken=||utoken||">Login to CWMail</a>NOTE: This will only work if the username and password are the same for both products.