# Frequently Asked Questions

> #### Q1. I currently have CWMail/DMailWeb - what changes do I have to make when I add WebMail?

> #### Q2. What software do I need to run WebMail?

> Q3. What is the difference between WebMail and CWMail/DMailWeb?

> Q4. Can I customize WebMail?

> Q5. Does WebMail display the folders from my other mail clients?

> Q6. How do I get extra checkboxes to work on the user option screen?

> Q7. How do I install WebMail on Mac OS X?

> Q8. What changes do I need to make to the templates to get bulletins working?

> Q9. I get an error page for new users - how do I fix it?

> Q10. When I ran the CGI I got the error "Failed to Load INI {webmail} and {webmail.ini}" - why?

> Q11. How do I setup multiple template sets?

> Q12. I am getting one of the following errors "You don't have permission to access ..." or "... you should check read/write privileges." How do I fix it?

> Q13. How do I move my WebMail/WebIMAP system to a new server?

> Q14. How do I setup WebMail so that it is used for 'mailto' links?

> Q15. I have changed the IP/domain name of my mail server. How do I get WebMail to change all of my current user@mail_host directories to use the new mail server?

#### Q1. I currently have CWMail/DMailWeb. What changes do I have to make when I convert to WebMail?

> Converting to WebMail from CWMail/DMailWeb can be done in using the following method:

> 1. Download and install WebMail on the same machine but ensure that the directories are NOT the same as CWMail/DMailWeb. WebMail directories and files are NOT capabile with CWMail/DMailWeb.
>    Warning: If they use the same directories it will damage your data.
> 2. Play with WebMail for a while to get the feel of it to ensure that it's what you are after.
>    Possible re-designed the templates to what you are after.
>    NOTE: WebMail's templates are not capabile with CWMail/DMailWeb templates.
> 3. Once you are happy with what WebMail offers and are ready to convert all the CWMail/DMailWeb users across, using the program called:

>    cwmail_cvt

>    This program will convert cwmail or dmailweb users. Any refences to CWMail within this program also refers to DMailWeb. This program will convert all the users data across. It will keep as the many of the user setting it can, including address books, pick list, real name etc..
>    NOTE: Doing the conversion will cause all Email messages to lose their flags. (i.e. read/unread, reply, attach, etc)

>    How to convert:

>    > a. Delete all user profile directories in webmail.

>    > rm -rf /var/spool/webmail/u_*

>    > b. Convert users data over:

>    > ./cwmail_cvt /var/spool/dmailweb /var/spool/webmail

>    > It will prompt you for questions to confer it and it will then convert them over.
>    > IT WILL NOT change the orginal CWMail/DMailWeb files, so you can full back to CWMail/DMailWeb if you wish.

>    > c. If you wish to rerun the convertion process you MUST repeat step 'a' as well, to ensure the profiles directories are empty. Otherwise users will see mutiple email messages.

> If you have a large numebr of users and you do not wish to convert all the users over while you play with WebMail, you can setup WebMail to convert users as needed when they login. It is only suggested that you use this while you are tesing the conversion process and playing with WebMail. Keeping in mind when you do convert all the users any settings or changes they made in WebMail will be LOST.

> What this feature will do is when a users log's into WebMail for the first time it will check for a matching CWMail/DMailWeb user convert the user settings over and then log the user in. So you will see their CWMail/DMailWeb address books and settings.

> To enable this you need to add the following webmail.ini setting:

> > > cvt_cwmail_live true
> > > cwmail_workarea /var/spool/cwmail
> > > # cwmail_hash_method 0

> The 'cwmail_hash_method' setting is optional but if the the hashing method between the products is setup differently then you MUST uncomment this line as well and state the method being used.

> If you have any questions please Email: support-webmail@netwinsite.com

Q2. What software do I need to run WebMail?

> Version 1.3b of WebMail requires an IMAP4, IMAP4REV1 or POP3 server. WebMail was initially designed using

> > > INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1 (rfc2060)

> In version 1.3a IMAP4 was added.

> > > INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4

> As long as your server is compatible with the above protocols there shouldn't be any problems. WebMail also uses SMTP protocol for sending Email.

#### Q3. What is the difference between WebMail and CWMail/DMailWeb?

> The Major difference is that WebMail supports IMAP4 servers as well as POP3 servers. CWMail/DMailWeb only support POP3 servers.

> Features which WebMail has, that CWMail and DMailWeb do not are:

> > > - Separate Distribution List and Address Book.
> > > - More advanced Address Book.
> > > - Multi-Host and Fetch Accounts.
> > > - Supports both POP3 and IMAP servers
> > > - Multiple Signatures.
> > > - WebMail Bulletins.
> > > - Todo List.
> > > - Searching for Emails.
> > > - Advance Email Attachments.
> > > - External Address books (http://netwinsite.com/webmail/address.htm)
> > >   (LDAP/SQL)

> Features that CWMail/DMailWeb have, that WebMail does not are:

> > > - Parent/Child Accounts (we expect these to be available soon for WebMail)

Q4. Can I customize WebMail?

> Yes! One of the major features of WebMail is the ease with which you can change the graphics and general layout . To see what some of our customers have done, you are welcome to take a look at our gallery at:

> http://netwinsite.com/webmail/gallery.htm

> When WebMail was installed, a templates directory should have been setup (where the files with the extension .tpl reside). WebMail uses these template files to build the HTML pages that are returned to the webserver and then to the user's browser. For a quick explanation of what each template is used for, try the following link:

> > > http://netwinsite.com/webmail/templates.htm

> Each template file is in HTML format with labels like the one below throughout:

> > > '||xxxxx||'

> The CGI replaces these labels with the correct information. For more details about what each
> label means, look here:

> > > http://netwinsite.com/webmail/templates.htm#variables

> If you have any questions, please feel free to contact our WebMail support team by Email at:

> > > > support-webmail@netwinsite.com

Q5. Does WebMail display the folders from my other mail clients?

> It depends on how your client is set up. Mail clients are usually set up in one of two ways:

> > 1. Folders are stored on the Mail client and not the Mail server. These are local folders and WebMail cannot see or access this type of folder.
> > 2. The Mail client uses the Mail server to store the folders (this type of folder is only available on IMAP servers, not on POP servers) These are remote folders and therefore can be accessed by WebMail. You will need to set up this option.

> If your IMAP client stores folders on the IMAP server and you still cannot see the folders with WebMail, the IMAP prefix is incorrect. The IMAP prefix is used to determine where WebMail will find/store the folders on the IMAP server. WebMail defaults to having an IMAP prefix of 'mail/' (see user option page).

> Find out which IMAP prefix your old IMAP client is using and set this up in WebMail.
> Here are a few common IMAP prefix's that you should also try.

> > > > (none)
> > > > ~/
> > > > INBOX.
> > > > /

> Once you determine the correct IMAP prefix for your system, add the following ini setting:

> > > > imap_prefix mail/

> This ini setting is used to setup and add NEW users to WebMail.

> Note: POP clients use local folders which cannot be accessed by WebMail.

Q6. How do I get extra checkboxes to work on the user option screen?

> The easiest way to explain this is by using an example. Say we are adding two checkboxes called; '_logout_prompt' and '_adverts' respectively.

> On the user option template (configf.tpl and config.tpl) you need to add the following line inside the form:

> <input type=hidden name="remove_setting" value="_logout_prompt,_adverts">

> This line forces the CGI to remove these settings so that when the box is not checked the old setting is removed (the browsers do not send anything for unticked checkboxes).

> Next you need to add the checkboxes:

> <input type=checkbox name="_logout_prompt" value="checked" ||_logout_prompt||>Logout Prompt
> <input type=checkbox name="_adverts" value="checked" ||_adverts||>Display Adverts

> These lines need to be in the same form as the 'remove_setting' input line.

> The variable for boxes which have been checked is called 'checked'.

> > > e.g. Checking for ticked result.
> > > ||ifequal||_adverts||checked||
> > > (Display advert)
> > > ||endif||

> > > or Checking for no tick
> > > ||ifndef||_logout_prompt||
> > > (JavaScript to automatically direct user to another page)
> > > ||endif||

Q7. Installing WebIMAP on Mac OS x?

> 1. I followed the normal install instructions of downloading to a temporary directory, uncompressing, and then untaring.
>    NB: I did not use /tmp as the temporary directory to download to, as from previous experience of DMail that directory seems to be a funny link and upsets the installation wizard, dmsetup. So I created, /unpack
> 2. Changed directory to,
>    /unpack/webmail
>    and entered,
>    ./wmsetup
> 3. Answered the questions giving,
>    i. a CGI path of,
>    /Local/Library/WebServer/CGI-Executables
>    NB: the capital letters.
>    This matches the default apache installation setting in,
>    /Local/Library/WebServer/Configuration/apache.conf
>    ScriptAlias /cgi-bin/ "/Local/Library/WebServer/CGI-Executables/"
>    ii.accepted the default templates and manuals directories of,
>    /var/spool/webmail
>    and
>    /var/spool/webmail/manuals
>    iii.gave my images directory as,
>    /Local/Library/WebServer/Documents/nwimg/mail
>    because I had already created the nwimg directory for CWMail and added an alias for it to my apache server configuration, i.e. in the file,
>    /Local/Library/WebServer/Configuration/apache.conf
>    I added the line, Alias /nwimg/ "/Local/Library/WebServer/Documents/nwimg/"
>    After adding this alias to apache I had to stop and restart it in order for it to take affect. On my machine there is a file in, /etc/startup called 2000_WebServer, so from that I borrowed the following script commands which appear to be somewhere in the root user's path,
>    apachectl stop
>    and then
>    apachectl start
>    iv. accepted the default relative URL for images of /nwimg/mail as that uses the Alias set up in iii.
>    v.accepted the correct domain for my machine
>    vi. removed 'mail.' from the start of my suggested mail server domain name.
>    vii.accepted the same server name as for the mail server for my SMTP server as all servers are on the one machine, i.e. the same as the web server.
>    viii.let it create an original copy of the templates
>    ix. did not let it delete the temporary unpack files for now
> 4. At this point I pointed my web browser at the WebMail CGI, with
>    a URL like,
>    http://my_domain/cgi-bin/webmail.cgi
>    and I got a message about it being a forbidden page.
>    After changing the CGI to world execute access, i.e.
>    chown 755 webimap.cgi
>    in the CGI-Executables directory, I realized that the CGI was owned by the user 'nobody'.
>    This what CGIs are generally run as by apache on other platforms. However, next to the ScriptAlias setting in apache.conf it states that on some platforms there are problems with that and that a userID of www can be used - and that seems to be what the default installation has set up for my CGIs to run as.
>    i.e. in apache.conf
>    there are settings,
>    User www
>    Group www
>    So I changed back the permissions on the webmail.cgi file to,
>    750
>    and did a,
>    chown www webmail.cgi
> 5. Tried the URL again. The CGI then ran but it complained about not being able to write a log file and it could not find the template,
>    /var/spool/webmail/error.tpl
>    So I changed to the directory,
>    /var/spool
>    and entered the following to set the directory/file ownership to the www user and group,
>    chown www:www WebMail
>    chown www:www webmail/*
> 6. Tried the URL again and the login screen now comes up as expected but without images.
>    So after a bit of checking I found that the images in the directory /nwimg/mail did not have world read access, so I went to,
>    /Local/Library/WebServer/Documents/nwimg/mail
>    and entered,
>    chown +r *
>    ( I suppose I could have just chown'd them to the user www)
> 7. Tried logging in again and bingo - it worked nicely. Hooray :-)

Q8. What changes do I need to make to the templates to get Bulletins working?

> Firstly, you need to be running version 1.4r or later to get bulletins working. Below are the template changes that are required to get bulletins working correctly. The sections in bold are the changes that are required.

> menubar.tpl and nfmenu.tpl:
> <table border="0" cellpadding="0" cellspacing="0">
> <tr valign="top">
> <td valign="top" align="center">
> <input type=image border="0" src="||nwimg||/option.gif"
> name=config></td>
> <td align="center"><input type=image border="0"
> src="||nwimg||/fldrs.gif" name=fld_manage></td>
> <td align="center"><input type=image border="0"
> src="||nwimg||/addrsbk.gif" name=pick_edit></td>
> </tr>
> <tr><td>
> <td align="center"><input type=image border="0"
> src="||nwimg||/bulletin.gif" name=bulletin></td>
> ||ifequal||_bulletin_user||true||
> <td align="center"><input type=image border="0"
> src="||nwimg||/newbulletin.gif" name=new_bulletin></td>
> ||endif||
> </tr>
> </table>
> frame.tpl:
> ||ifdef||display_bulletin||
> <frame src="||action||?cmd=bulletin&utoken=||utoken||" name="list">
> ||else||
> <frame src="||action||?cmd=list&utoken=||utoken||" name="list">
> ||endif||

> item.tpl

> There have been many changes in this template and you should replace your item.tpl with the one provided in 1.4r or later. Then make any changes that are required to get back to the look and feel that it had before.

Q9. I get an error page for new users - how do I fix it?

> This might occur if you have upgraded to version 2.0n or higher. All that is needed is to add to the newuser.tpl file inside the form the following line:

> > > <input type=hidden name="force_connection" value="true">

Q10. When I ran the CGI I got the error "Failed to Load INI {webmail} and {webmail.ini}?

> This occurs when the CGI cannot locate the ini file. You should double check that the ini file is in the same directory as the CGI. If it is, it may be that the webserver has setup a workarea which is not at the same location where the CGI is.

> You can either change the web server workarea for the CGI (you need to read your web server manual about this), or you can locate the file called:

> > > init.log

> As this file should have been created as long as it had access rights to do so in the workarea, placing the ini file in same location should solve the problem.

> If you cannot file the init.log file, you should try placing the ini file back one directory.

> On some NT/2000 web servers scripts and cgi-bin directories are setup. You should try placing the ini in the cgi-bin, and then try placing the CGI there as well.

> If none of the above works, contact WebMail support at:

> > > support-webmail@netwinsite.com

Q11. How do I setup multiple template sets?

> Here is an example of what you might have in your ini file for multiple template sets:

> > tpl_set 1 /webmail/Iconic /img/Iconic Iconic Set
> > tpl_set 2 /webmail/Globe /img/Globe Globe Set
> > tpl_set 3 /webmail/Marble /img/Marble Marble Set
> > tpl_set 4 /webmail/Vanilla /img/Vanilla Vanilla Set

> I'll just run through the components of the first line here...

> - "tpl_set 1" is fairly self explanatory
> - "/webmail/Iconic" is the directory where all the iconic templates are stored
> - "/img/Iconic" is the relative URL to the images that are used for the Iconic set (like the nwimg setting for this set)
> - "Iconic Set" is the name of the set that will be displayed on the select list

Q12. I am getting one of the following errors: "You don't have permission to access ..." or "... you should check read/write privileges." How do I fix it?

> These errors indicate that the user whom the WebMail CGI is being run as by your webserver does not have read and write access to all the files in your templates directory, and/or does not have execute access to the webmail.cgi file and/or the template directories (required to open directories).

> You will need to use the 'chown' command and possibly the 'chmod' command to change the ownership of the WebMail files to allow WebMail to run correctly. e.g.:

> > chown -R www:www /var/spool/webmail
> > chown www:www /usr/local/apache/cgi-bin/webmail.*
> > chmod +x /var/spool/webmail
> > chmod +x /usr/local/apache/cgi-bin/webmail.cgi

> The user whom the webserver runs CGI applications like WebMail as, is set in your webserver configuration files. For Apache webservers, the setting is in the httpd.conf file on lines like the following:

> > # If you wish httpd to run as a different user or group, you must run
> > # httpd as root initially and it will switch.
> > # User/Group: The name (or #number) of the user/group to run httpd as.
> > User nobody
> > Group nobody

> Note: You should generally only need to change the owner/group of the files, the read, write and execute permissions should be correct if the ownership's are correct.

Q13. How do I move my WebMail/WebIMAP system to a new server?

The easiest way to do this is to do a fresh install of the latest version of WebMail on the new server machine. You should be able to download the latest version from here:
http://netwinsite.com/webmail/download2.htm

If you are still within your 1 year upgrades and support period, you can do this for free. Otherwise, you can do a fresh install of your old version, or you can contact sales@netwinsite.com about renewing your upgrade period.

If the machine name of your new server is different from the old one, you will have to get a new key. Contact sales@netwinsite.com about this.

Setup WebMail on your new system so it works the way you want it to be. If you have edited your templates, you can just copy these into your new templates directory (copy *.tpl files and all your images).

Of course the bit you will be really worried about is copying your users to your new system. When doing this, it is a good idea to take the system off line. This will prevent any inconsistencies from occurring between the old system and the new one.
All you have to do is copy all the files and folders in the workarea of your old system into the workarea of your new one. The workarea is specified in your webmail.ini file (or webimap.ini file). If you have no workarea directory specified, the templates directory is used. Once these files have been copied over you can put your new server online.

Q14. How do I setup WebMail so that it is used for 'mailto' links?

Here are the changes you need to make to WebMail to get:
<a href="mailto:your@this.domain.com">Name</a>
to call WebMail. In Version 3.0k+, the below template changes are in the default template set (the 'Panel' set), and also in the 'Marble' template set.

Required ini settings:
=================
authent_cookie true

Template changes:
=================

sendf.tpl (and send.tpl)
-------------------------------

You should have the body like this:

<body onLoad="start()">

And inside the 'start()' function you should add this:

||ifdef||email||
str = "||email||";
ptr = str;
for (i=0;i<str.length;i++) {
if (str.substr(i,1) == ':') {
i++;
ptr = str.substr(i,str.length-i);
}
}
document.sendform.to.value = ptr;
||endif||

frame.tpl
------------

The frame set should look something like this:

<frameset rows="90,70%">
<frame src="||action||?cmd=menubar&utoken=||utoken||" name="menu"
marginwidth="1" scrolling="no">

||ifdef||error||
<frame src="||action||?cmd=show&page=error.tpl
&error=||href_text||error||&utoken=||utoken||" name="list">
||else||
||ifdef||email||
<frame src="||action||?cmd=msg_new
&utoken=||utoken||&email=||email||" name="list">
||else||
||ifdef||display_bulletin||
<frame src="||action||?cmd=bulletin&utoken=||utoken||"
name="list">
||else||
<frame src="||action||?cmd=list&utoken=||utoken||" name="list">
||endif||
||endif||
||endif||
</frameset>

Login.tpl
-----------

Inside the login form I added the line:

||ifdef||email||
<input type="hidden" name="email" value="||email||">
||endif||

I also change the 'cookie login' to also be checked by default if
the ||email|| is defined.

ie.
||ifdef||email||
<td align="right"><input type="checkbox" name="set_cookie"
value="ON" checked></td>
||else||
<td align="right"><input type="checkbox" name="set_cookie"
value="ON" ></td>
||endif||

---------------------------------------------------------------------

The following is what the user needs to setup on his/her machine so that WebMail is called when they press a mailto link:

Registered file types:
URL:MailTo Protocol

Actions: OPEN
"C:\Program Files\Plus!\Microsoft Internet\Iexplore.exe"
http://your.domain.here/cgi-bin/webmail.cgi?email=

You will need to update the above as necessary.

---------------------------------------------------------------------

What happens is when you click on a 'mailto' link it opens up another
IE with the URL in the following layout:

http://your.domain.here/cgi-bin/webmail.cgi?email=%20mailto:you@domain.com

The variable 'email=' is setup and then is used on the login page
and frame set to display the send page.

If they currently have a VALID cookie to autologin with it will go to
the send page straight away. If not, the login page will appear asking
you to login first. :-)

NOTE: The above is only setup to work correctly on the frame set. For
non-frames you need to do a redirect on the list.tpl/listf.tpl if
the variable 'email' is setup. :-)

Q15. I have changed the IP/domain name of my mail server. How do I get WebMail to change all of my current user@mail_host directories to use the new mail server?

You can do this using the command line prompt manager function which is run from the command line like this:

./webmail.cgi -manager

You will be prompted for the managers password (which can be setup in your ini file using the managers_password setting) and then you will be displayed a list of options. Select the option

s. Switch user directories from one pop host to another.

This will do the convertion of your user directories for you.

This feature is only available in versions 3.0k and later, so if you are running an earlier version of WebMail you will need to upgrade.