Advanced Administration
The following covers the features that administrators would wish to set up.
Generating Stat Logs

If you are using WebMail v3.0d on a linux machine you can setup WebMail to email you General stat information about your WebMail system.

The program 'webcmdlog' which is generating the stats report can only be obtained by contacting: 'support-webmail@netwinsite.com' and asking for the 'WebMail cmd.log to Stats program'. You will need to state the O/S that you are using.

An example is show below:

Sent: Thursday, December 25, 2003 12:00 PM
To: admin@domain.com
Subject: Webmail stats

*************** Analysis of WebMail cmd.log  ***************
Logged period: 1 days, 11 hours, 0 mins, 33 seconds
Total CGI instances: 282095
10 Peek Seconds: CGI's / Sec    102 98 98 93 91 90 89 88 87 87
See 'results*.txt' for details for each second.

Average CGI's / Second: 4.37
Average CGI's Calls / Second: 2.24

Total Logins: 33203
Top 10 User Logins:
          19 - john@domain.com
          7 - luke@domain.com
          5 - william@domain.com
          4 - dad@domain.com
          3 - mums@domain.com
          3 - sid@domain.com
          3 - grober@domain.com
          3 - abc@domain.com
          3 - zerba@domain.com
          3 - cat@domain.com
Average Login / Minute: 15.81


Average Login Time: 1.61 seconds
10 Peek Login Times: (Seconds - User)
          11 - john@domain.com
          6 - luke@domain.com
          6 - william@domain.com
          6 - dad@domain.com
          6 - sid@domain.com
          6 - mums@domain.com
          6 - abc@domain.com
          6 - zerba@domain.com
          5 - cat@domain.com

See 'results_user.txt' for more details.

Total CGI Commands Excluding Logins: 282095
10 Most Common Commands:
   (Count) (Max Time) (Avg Time) (Part) (Max Time) (Avg Time)
    58154 -      684 -     3.03 |      -          -          - reload_mail
    50271 -        7 -     1.01 |      -          -          - LOGINSCREEN
    30016 -       61 -     1.99 |      -          -          - quick_login
    29296 -      204 -     1.82 |      -          -          - item
    23287 -       17 -     1.03 |      -          -          - menubar
    12194 -      288 -     3.16 |      -          -          - delsel
    10223 -       38 -     1.28 |      -          -          - logout_go
     8748 -      121 -     2.12 |      -          -          - list
     8472 -       27 -     1.13 |      -          -          - itempart
     7093 -      234 -     3.82 |      -          -          - send
10 Most Failed Commands:
   (Count) (Max Time) (Avg Time) (Part) (Max Time) (Avg Time)
See 'results_cmd.txt' for more details.


This program also created 3 or more files called:
    results_user.txt - Has the user login information
    results_cmd.txt  - Has the CGI command information
    results*.txt     - Has the time sliced in seconds

All these files are tabs seperated list designed to be imported
into spreed sheets
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5             372M   92M  261M  26% /
/dev/sda1              45M   14M   29M  32% /boot
/dev/sda3             1.9G  177M  1.6G  10% /home
none                  125M     0  124M   0% /dev/shm
/dev/sda2             5.3G  3.2G  1.8G  63% /usr
/dev/sda7             251M  220M   17M  93% /var

To set this up you need to first add a webmail.ini setting:

enable_cmd_log true

Then create 2 .sh files. I suggest that you place these in a separate directory off webmail called 'cmdlog'

ie.         /usr/local/webmail/cmdlog/

startlog.sh
rm -f /usr/local/webmail/cmdlog/cmd.log
rm results*.txt -f
/var/www/cgi-bin/webmail.cgi -ini /var/www/cgi-bin/ -enable_cmdlog /usr/local/webmail/cmdlog/cmd.log

stoplog.sh
/var/www/cgi-bin/webmail.cgi -ini /var/www/cgi-bin/ -disable_cmdlog
rm /usr/local/webmail/cmdlog/results*.txt -f
sleep 10
rm -f /usr/local/webmail/cmdlog/file.txt
/usr/local/webmail/cmdlog/webcmdlog /usr/local/webmail/cmdlog/cmd.log >/usr/local/webmail/cmdlog/file.txt
df -h >>/usr/local/webmail/cmdlog/file.txt
mail -s "Webmail stats" admin@domain.com >/usr/local/webmail/cmdlog/file.txt
rm results*.txt -f

You should change the directories as needed for your system, and the 'admin@domain.com' email address. The next step is setting up 2 cron jobs so that the start and stop scripts are called at the correct times. An example of this is:

CRON
# /etc/cron.d
0 0 * * 3 root /usr/local/webmail/cmdlog/startlog.sh
0 0 * * 4 root /usr/local/webmail/cmdlog/stoplog.sh

You should only run the stats over 1 day, as this does impact on the system performance when turned on.

Not only does the program provide information as above, but you can also get it to give you a breakdown of a command. To do this you run the file like this:

./webcmdlog cmd.log -cmd "LOGINSCREEN" >file.txt
./webcmdlog cmd.log -cmd "quick_login" >file.txt
./webcmdlog cmd.log -cmd "reload_mail" >file.txt
./webcmdlog cmd.log -cmd "logout_go" >file.txt

It will generate a report like this:

WebMail CMD Stat
*************** An Analysis of WebMail 'cmd=LOGINSCREEN'  ***************
Total Count: 49727
 Sec  Count  Percent   Total Percent
   1  49712     99.97%   99.97%
   2     15      0.03%   100.00%

*************** An Analysis of WebMail 'cmd=attach_send'  ***************
Total Count: 1241
 Sec  Count  Percent   Total Percent
   1    758     61.08%   61.08%
   2    458     36.91%   97.99%
   3     15      1.21%   99.19%
   4      3      0.24%   99.44%
   5      3      0.24%   99.68%
   6      2      0.16%   99.84%
   7      2      0.16%  100.00%

You can also give a break down of the commands that take longer than 10 seconds, like this:

./webcmdlog slow.log -slow_report >> file.txt

It will generate a report like this:

WebMail CMD Stat
*************** An Analysis of WebMail 'slow'  ***************
Total Count: 28
 Count  User Path
     1  d:\surgemail\web_work\u_ni\nimble@test.com\
    15  d:\surgemail\web_work\u_la\largetest@test.com\
     1  d:\surgemail\web_work\u_aa\aa@test.com\
     1  d:\surgemail\web_work\u_ab\ab@test.com\
     4  d:\surgemail\web_work\u_ab\ab@test.com\
     1  d:\surgemail\web_work\u_ab\ab@test.com\
     5  d:\surgemail\web_work\u_te\test@test.com\
 
Server Farming

WebMail can support server farming, where you set up a copy of the CGI on each machine.

On one machine you set up a workarea where all the user profiles are stored.

ie.    /var/spool/webmail

Then, on each of the other machines, you set up a (map/link) to this location. This way each machine can be set up to point to the one workarea location. On each machine, set the workarea ini setting to match the map/link you have setup.

With the templates you have a choice. You can either do the same as above where there is only 1 copy of the templates and each CGI points to it, or you can have a separate copy of the template set on each machine, thus saving networking bandwidth.

NOTE: If you are running the CGI on multiple machines you will need to purchase a license for each machine. Talk to sales@netwinsite.com about discounts for multiple purchases.

Auto-Login

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 stored temporarily on SurgeMail, 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 set up:

netwin_autologin_id <id> <url> <product directory> <extra>

The <id> is the id number that you wish to be set up as. ie 10

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 set up multiple ini settings like the following:

netwin_autologin_id 0 /cgi-bin/webnews.cgi /var/spool/webnews
netwin_autologin_id 1 /cgi-bin/webmail.cgi /var/spool/webmail
netwin_autologin_id 2 /cgi-bin/webmail.cgi /var/spool/webmail
netwin_autologin_id 3 /cgi-bin/cwmail.cgi /var/spool/cwmail &vhost=this_host_name&tpl_set=config

The 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 set up, 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.

Below are the common autologin setups in WebMail and how to set them up. Any ini setting changes stated will also have next to them the ini file name brackets like '(4th Setting)' What this means is that this is the autologin setting position it is expected to be in. For example the '4th setting' means that there is expected to already be 3 other autologin ini settings in the ini file before these settings. The above only matter for (netwin_autologin and not netwin_autologin_id)

If the order of the autologins do change, then WebMail logins will not login to the expected product. If you wish to change the order OR the order has to be different due to already setup settings then you will need to also change the templates commands to also match this.

Note: The versions stated below in each, are the version you need to get ALL of the feature stated. Older versions of WebMail will have some of the below, but some features will not be avalible without extra template changes.

WebMail <--> SurgeMail

You need to have WebMail v3.1a and SurgeMail v1.6h product version for this to work as there are template changes that are already included in these versions. For simple addition of this feature. SurgeMail defaults to use these settings and normally no changes are needed unless you are upgrading from an earlier version. If you are setting up WebMail on a separate machine to that of SurgeMail, or using another web server, you will need to do some of the changes below as well.

What this interface does:

  • In WebMail, on the user configuration page they can:
    • Change their mail password.
    • Setup Server Spam Settings.
    • Setup Holiday Settings
    • Centerpaid Settings
    • SMS Settings
    • Forwarding Settings and others
  • In SurgeMail the users can move to WebMail without having to login.

Setup:

As long as you have the stated version above or higher, all you should need to do is add a few ini settings in WebMail and the interface should work for the default installations. No changes to SurgeMail are needed as it will default to having these settings setup.

WebMail.ini

friends_only true
autorespond true

netwin_autologin_id 0 http://1.2.3.4:7080/cgi/user.cgi
                     C:\surgemail\work lcmd=user_load_pass&||na_extra||
netwin_autologin_id 1 http://1.2.3.4:7080/cgi/user.cgi
                     C:\surgemail\work lcmd=user_load_fcommon&||na_extra||
netwin_autologin_id 2 http://1.2.3.4:7080/cgi/user.cgi
                     C:\surgemail\work lcmd=user_load_fwd&||na_extra||
netwin_autologin_id 4 http://1.2.3.4:7080/cgi/user.cgi
                     C:\surgemail\work lcmd=user_spam_load&||na_extra||
netwin_autologin_id 5 http://1.2.3.4:7080/cgi/user.cgi
                     C:\surgemail\work lcmd=user_load_centipaid&||na_extra||
netwin_autologin_id 6 http://1.2.3.4:7080/cgi/user.cgi
                     C:\surgemail\work lcmd=user_sms_load&||na_extra||
netwin_autologin_id 7 http://1.2.3.4:7080/cgi/user.cgi
                     C:\surgemail\work lcmd=user_spam_load&||na_extra||
netwin_autologin_id 8 http://1.2.3.4:7080/cgi/user.cgi
                     C:\surgemail\work lcmd=user_listmb&||na_extra||
netwin_autologin_id 20 http://1.2.3.4:7080/cgi/user.cgi
                     C:\surgemail\work lcmd=user_load_pass&vhost=||vhost||
netwin_autologin_id 21 http://1.2.3.4:7080/cgi/user.cgi
                     C:\surgemail\work lcmd=user_load_fcommon&vhost=||vhost||
netwin_autologin_id 22 http://1.2.3.4:7080/cgi/user.cgi
                     C:\surgemail\work lcmd=user_load_fwd&vhost=||vhost||

WebMail <--> DBabble

You need to have WebMail v3.1a and DBabble v1.1m product version for this to work.

What this interface does:

  • When you are in WebMail you can quickly move to DBabble web based session sending instant messages to friends and work mates.
  • When you are in DBabble web based session you can quickly move to WebMail to read and send emails.

Setup:

For this you need to add 1 ini setting and 1 template line in each product so that you can move between the products.

WebMail.ini (10th Place)

netwin_autologin_id 10 http://1.2.3.4:8132
                     C:\dbabblesvr\work

WebMail Template Addition

<a href="||action||?cmd=netwin_login-10&utoken=||utoken||">Check DBabble</a>

DBabble.ini (10th Place)

auto_login_user nobody
auto_login 10 http://$(server)/scripts/webmail.exe
                     c:\webmail

DBabble Template Addition

<a target="||u_top||" href="||action||?cmd=send_auto_login&n=10&tok=||tok||">Read Mail</a>

WebMail <--> WebNews

You need to have WebMail v3.1a and WebNews v1.1o product version for this to work.

What this interface does:

  • When you are in WebMail you can quickly move to WebNews read your news articles without having to login to WebNews.
  • When you are in WebNews you can quickly move to WebMail read your emails, send a few out without having to login to WebMail.

Setup:

For this you need to add 1 ini setting and 1 template line in each product so that you can move between the products.

WebMail.ini (200th Place)

netwin_autologin_id 200 /scripts/webnews.exe
                     C:\webnews

WebMail Template Addition

<a href="||action||?cmd=netwin_login-200&utoken=||utoken||">Read News</a>

WebNews.ini (varies)

netwin_autologin /scripts/webmail.exe C:\webmail

WebNews Template Addition

<a href="||action||?cmd=netwin_login-1&utoken=||utoken||">Read Mail</a>

WebMail --> NetAuth

You need to have WebMail v3.1a and Netauth v4.2l product version for this to work as their are template changes that are already included in these versions. (Note: See WebMail <--> SurgeMail if you are using Surgemail as your mail server)

What this interface does:

  • When you are in WebMail and you move to the configuration page you can select to 'Change Your Password' for the main mail account. This calls NetAuth which is will do the change and then return back to WebMail.

Setup:

NetAuth has been out-dated due to SurgeMail, so WebMail templates do not have the NetAuth links and need to be manaully added.

WebMail.ini (11th Place)

netwin_autologin_id 11 /scripts/netauth.exe C:\netauth
                     &show=passwd.tpl

Config Template Change

In one of the config templates you will need to add this link:
<a href="||action||?cmd=netwin_login-11&utoken=||utoken||">Change Password</a>

WebMail <--> WebShareIt

You need to have WebMail v3.0u build 42 and WebShareIt v1.0j product version for this to work as their are template changes that are already included in these versions, for simple addition of this feature.

What this interface does:

  • When you are in webmail and you are writing an email and you wish to attached a file that is stored in WebShareIt you can just click on the 'webshareit' link that will appear on the attachment page where normally you attach a file. It will popup a window which will login to webshareit and then allow the you to select 1 file that they wish to attach. Which is then passed back to webmail, allowing the user to then send the email, and the file will be attached.
  • When you are in WebShareIt a new button called 'Email' will appear when you are looking though your folders. If you select 1 file and then clcik this button it will popup window which will login to webmail open a new message and attached the selected file. So the user can continue writing the email and send it off.

Setup:

As long as you have the stated version above or higher all you should need to do is add 4 ini settings, 2 in WebMail and 2 in WebShareIt and the interface should work for the default installations.

WebMail.ini (12th Place)

display_webshareit c:\webshareit\users
netwin_autologin_id 12 /scripts/webshareit.exe
                     C:\webshareit\users
                     show=webmail.tpl&path=||_webshare_path||

WebShareIt.ini (1st Setting)

display_email true
autologin /scripts/webimap.exe d:\webmail
                     &process=show&page=framenew&
                     listcmd=share_file&file_path=||send_file_path||

WebMail <--> External Program or Single Sign On, SSO

The below explains what an external program mst to do autologin to WebMail.

You need to have atleast WebMail v3.0u build 42 and SurgeMail v1.6h product version for this to work.

External Program --> WebMail

  • First the external program MUST have access to the username and password of the account you wish to login with.
  • The program encodes the user/pass using the following code:
    encoded_pass = pass_user_decrypt(pass,user);
    char *pass_user_encrypt(char *pass, char *user)
    {
    	if (user && pass) {
    		static char enc[BFSZ];
    		char *u, *p;
    
    		lcpy(enc, pass, BFSZ);
    		for (u=user, p=enc; *p; p++) {
    			*p += *u++;
    			if (!*u) u = user;
    		}
    		return enc;
    	}
    	return NULL;
    }
    
  • The external program then opens a SurgeMail's POP port and send the encoded pass like this:
    C: putp encoded_pass
    S: +ok id
    The 'id' that the SurgeMail must be passed on to WebMail.
  • The last step is calling WebMail with the following information:
    ?cmd=auto_login&user=user&id=id

External Program <-- WebMail

  • Once you have WebMail setup to have the correct webmail.ini settings to call the autologin to the external program. (see above for settings).
    WebMail will call the external program like this:
    ?cmd=auto_login&user=user&id=id
  • The program then need to grab the 'id' section and opens a SurgeMail's POP port and send the ID like this to get the encoded_pass:
    C: getp id
    S: +ok encoded_pass
  • The external program can then decode the encoded_pass using the function below and then verify the user/pass to ensure that the login is allowed.
    pass = pass_user_decrypt(encoded_pass,user);
    char *pass_user_decrypt(char *encoded, char *user)
    {
    	if (user && encoded) {
    		static char enc[BFSZ];
    		char *u, *p;
    
    		lcpy(enc, encoded, BFSZ);
    		for (u=user, p=enc; *p; p++) {
    			*p -= *u++;
    			if (!*u) u = user;
    		}
    		return enc;
    	}
    	return NULL;
    }
    
Auto-Login (Without SurgeMail)

WebMail versions 3.0u 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.

Since that you are not using our mail server (SurgeMail) you have to use the old method which has a limiting factor.

"The WebNews and WebMail products MUST be able to get access to each other workarea's."

The reason for this is that the password is encoded and stored in a file which the other product then grabs and uses.

This means that the programs need to be on the same machine or that you have to setup network drives so that each can store files in the correct location. In this case you have to be careful of ownership of files that each will create as both will need to read/write and delete the files.

WebMail <--> WebNews

You need to have WebMail v3.1a and WebNews v1.1o product version for this to work.

What this interface does:

  • When you are in WebMail you can quickly move to WebNews read your news articles without having to login to WebNews.
  • When you are in WebNews you can quickly move to WebMail read your emails, send a few out without having to login to WebMail.

Setup:

For this you need to add 1 ini setting and 1 template line in each product so that you can move between the products.

WebMail.ini (200th Place)

netwin_autologin_id 200 /scripts/webnews.exe
                     C:\webnews

WebMail Template Addition

<a href="||action||?cmd=netwin_login-9&utoken=||utoken||">Read News</a>

WebNews.ini (varies)

netwin_autologin /scripts/webmail.exe C:\webmail

WebNews Template Addition

<a href="||action||?cmd=netwin_login-1&utoken=||utoken||">Read Mail</a>

WebMail <--> External Program

The below explains what an external program mst to do autologin to WebMail.

You need to have atleast WebMail v3.0u build 42 for this to work.

External Program --> WebMail

  • First the external program MUST have access to the username and password of the account you wish to login with.
  • The program encodes the user/pass using the following code:
    encoded_pass = pass_user_decrypt(pass,user);
    char *pass_user_encrypt(char *pass, char *user)
    {
    	if (user && pass) {
    		static char enc[BFSZ];
    		char *u, *p;
    
    		lcpy(enc, pass, BFSZ);
    		for (u=user, p=enc; *p; p++) {
    			*p += *u++;
    			if (!*u) u = user;
    		}
    		return enc;
    	}
    	return NULL;
    }
    
  • The external program then opens a file in the workarea of WebMail and save the encoded_pass in this file. The fIle MUST end with '.tmp'
  • The last step is calling WebMail with the following information:
    ?cmd=auto_login&user=user&pass_file=file
    The file must NOT have the file extention (.tmp) on it.

External Program <-- WebMail

  • Once you have WebMail setup to have the correct webmail.ini settings to call the autologin to the external program. (see above for settings).
    WebMail will call the external program like this:
    ?cmd=auto_login&user=user&pass_file=file
  • The program then need to grab the 'file' open it to get the encoded_pass. The program should then remove this file.
  • The external program can then decode the encoded_pass using the function below and then verify the user/pass to ensure that the login is allowed.
    pass = pass_user_decrypt(encoded_pass,user);
    char *pass_user_decrypt(char *encoded, char *user)
    {
    	if (user && encoded) {
    		static char enc[BFSZ];
    		char *u, *p;
    
    		lcpy(enc, encoded, BFSZ);
    		for (u=user, p=enc; *p; p++) {
    			*p -= *u++;
    			if (!*u) u = user;
    		}
    		return enc;
    	}
    	return NULL;
    }
    
WebMail Command Prompt Options

WebMail has a few built in commands that you can run via command prompt. The list of the availabel commands in your current version of WebMail can be view by running WebMail like this:

       ./webmail.cgi -h
or    ./webmail.cgi -?

This will then list all the available command like this:

Welcome to WebMail v3.1m

Layout: webmail -version
        webmail -activate  registration_number email_address
        webmail -deactivate  registration_number email_address
        webmail -password <password>
        webmail -lang_tpl
 -version     | Displays version Information
 -activate    | This will activate a webmail key
 -deactivate  | This will deactivate a webmail key
 -password    | This will set the managers password. ini setting si ignored
 -lang_tpl    | This will get webmail to rebuild the language tpl from
              | the mastersets.

Layout: webmail -admin_fns
        webmail -admin_fns_full
        webmail -manager
        webmail -deleteuser <password> wild_user [wild_user [..]]
        webmail -checkutoken <user token>
        webmail -check <user@domain>
        webmail -show_path <user@domain>
 -admin_fns      | This will force the CGI to check for
                 |         'auto_delete wild xdays [ydays]'
                 | and clear only logged in users (login.dat).
 -admin_fns_full | This will force the CGI to check for
                 |         'auto_delete wild xdays [ydays]'
                 | and clear ALL the users caches.
 -manager        | Command line managers control
 -stats          | This will geneate the manager login reports
 -deleteuser     | Command line delete user lists
 -checkutoken    | Check that the user token is currently valid
 -check          | This checks if a user account is active (login session)
 -show_path      | This will return back the full path to the user

Layout: webmail -stats
        webmail -space
        webmail -clean)
        webmail -space_pop
        webmail -clean_pop
        webmail -enable_cmdlog
        webmail -disable_cmdlog
These are more advance setting and should use with extreme care.

Layout: webmail -remove_lock <username>@<domain>
        webmail -test_lock <username>@<domain> [<sleep in seconds>]
 -remove_lock | This attempts to remove the lock files for a user.
 -test_lock   | This will test the locking routines for a user.

The '-stats' command is covered in the section 'Setup Webmail to generate more stat information' and will tell you how to setup and use this feature. Most of the others are self explanatory in their comments. I am going to talk about the '-manager' option.

The '-admin_fns' command cycle thoughs the login users (login.dat) and check to see if they should be logout and clears their cache at the same time. We suggest that you should set this up as a cron job to be run once every hour, and also including the webmail.ini setting:

command_admin_only true

This will stop the CGI from processing this command which for large systems can cause large delays once in a while.

The '-manager' is the command prompt manager screen with similar features to that of the web base manager. But were the web base can timeout for large system the command prompt does not have this issue. Once you run the manager option you will be asked for the managers password that you must have setup in the webmail.ini file before hand. Then CGI will then load all the user information in removing and empty users and display a menu like the following:

Welcome To Managers Page
------------------------


Stats:   Located xxx Users based in d:\webimap\


1. Display selected users to screen
2. Delete selected user
3. Change User.dat Variable for selected users.


d. Delete all old Accounts. (ini setting - auto_delete)
c. Clear All Users Caches. (ini setting - auto_logout)
f. Delete Users from File.
s. Switch user directories from one pop host to another.


i. Users Information. (Displays how long since they lasted logged in)
u. Delete Users Un-used for x days.


r. All the email in user Y's mailbox older than X days are removed. (POP only)
e. All the emails in user Y's folder X are removed. (POP only)
v. Verify all user.dat files - user.dat repairs.
x. Update users quotas (POP folders only).


m. Move POP folder to IMAP server.


q. exit

The number of users on your system will be shown and the list of available options. Each of these options are explained below:

1. Display selected users to screen
  If you choose this option you will be asked for a wild card list of the users you wish to select. If you enter: 'lynden@*' this will display all the 'lynden' users of every domain that has used this CGI.
You will also be given the option to save this list to a file
2. Delete selected user
  If you choose this option you will be asked for a wild card list of the users you wish to select. If you enter: 'lynden@*' this will display all the 'lynden' users of every domain to the screen. You will then be asked if you are sure you wish to remove these users.
3. Change User.dat variables for selected users.
  If you choose this option you will be asked for a wild card list of the users you wish to select. If you enter: 'lynden@*' this will display all the 'lynden' users of every domain to the screen. You will then be asked what variable name and what value you wish to change it to. You will be provide a list of common user.dat variables to select from.
d. Delete all old Accounts. (ini setting - auto_delete)
  If you have already setup 'auto_delete' ini setting this option will cycle through all your users and delete any accounts that need to be removed.
This is normally only used if you just changed the ini settings and wish then to process straight away.
c. Clear All Users Caches. (ini setting - auto_logout)
  If you have already setup 'auto_logout' ini setting this option will cycle through all your users and logout the required accounts that match you ini settings.
This is normally only used if you just changed the ini settings and wish then to process straight away.
f. Delete Users from File.
  This option allows you to import an external file which lists (one on each line), the users you wish to remove. This option will login this file, display the list of users and ask if you are you sure you wish to remove these accounts.
s. Switch user directories from one pop host to another.
  If you are moving your users to another POP/IMAP server or even a different domain, you will need you use this feature. This will convert all the users in webmail to the new POP host. You should use this option with care. If this is not used correctly, your users might lose their settings.
i. Users Information. (Displays how long since they lasted logged in)
  If you choose this option you will be ask for a wild card list of the users you wish to select. If you enter: 'lynden@*' this will display all the 'lynden' users of every domain that has used this CGI.
This will then tell you when they last logged in and give you the option to save this to a file.
u. Delete Users Un-used for x days.
  This will allow you to delete users depending on when they last used WebMail. You will display the list of users and be asked if you are sure that you wish to delete these accounts.
r. All the email in user Y's mailbox older than X days are removed.
  This option only works for POP folders, allowing the admin to remove emails that have been there for some time.
e. All the emails in user Y's folder X are removed. (POP only).
  This option only works for POP folders, allowing the admin to remove an entire folder for a group of users.
v. Verify all user.dat files - user.dat repairs.
  This will cycle through all your users and verifying the user.dat and repairing any damage that past CGI might have caused. You will shown a list of user.dat that have been repaired.
x. Update users quotas (POP folders only).
  This will cycle through all your users and rebuild all the POP folders to ensure that the POP quota for these users are correct. It will also fix any index.dat issues.
m. Move POP folder to IMAP server.
  This feature allows you to move all the POP folders stored on the web server, to be uploaded to the IMAP server. This is only used if you are moving all your users to your IMAP server, and to move the POP folders as well.
 
Using Gnu Privacy Guard (GnuPG)

If you are using WebMail v3.0u or higher you can set it up to use GnuPG. For more information about this product see the URL:

http://www.gnupg.com/

The software for safe and encrypted e-mail-communication. GnuPG is published under General Public License (GPL) and there is a free software alternative to Pretty Good Privacy (TM), shortly known as PGP (TM). GnuPG is based on OpenPGP-standard.


To setup WebMail with GnuPG you first need to download GnuPG, compile and install in on your system. Due to the way GnuPG interfaces with the console, changes are needed to GnuPG to made so that webmail can correctly run gpg correctly. So before you build GnuPG you will need to replace '../util/ttyio.c' with the one provided here.

Windows and Linux Libc6 compiled version can be downloaded from the table below.

Windows (gpg.exe)
Linux Libc6 (gpg_netwin)

This is just the gpg.exe you will still need to download the orginal GnuPG and install it.

Once install you need to add to webmail.ini file the following:

      pgp_path c:\pgp\gpg.exe
or   pgp_path /usr/local/bin/gpg_netwin

This will then activate webmail pgp code and on the Panel tpl set on the 'Option' page. This new option called:

PGP Profile

This will give you the option to generate a new Public/Private key, which is then used when sending emails. This will also list teh current Key that other users have sent you. On the 'New Message' page at teh top a new pull down menu will apear giving you the option to send your key or sign the message using yor key.

Warning: Since GnuPG is 3rd party software, Netwin Ltd is not liable for any damage caused by the use of this software, or any licensing requirements.

Generate more Stat Information

WebMail v3.0t and higher has more stat information that you can collect and use. The main information that customers want are:

How many emails were sent this month.
How many logins occured this month.
    - Also A break down of how many times each user login.
How many times a template page was displayed. (ie login.tpl, options page etc)

To set up the above you need to add the following ini settings:

# How many emails were sent this month.
log_sent_emails true

# How many logins occured this month. (Including break down)
log_login_users true

# How many times a template page was displayed
log_template item.tpl view_email
log_template login.tpl login_page

The stat information is display on the managers page at the URL like the following:

http://your.domain.com/cgi-bin/webmail.cgi?cmd=manager

All this information is stored in WebMail's workarea, each in a seperate file. You might need to manually remove old files if they start taking up to much room.