Products Downloads Prices Support Company
DMailWeb and CWMail
Common Links
Download Now
Features
FAQ
Customer Comments
Example Gallery
Updates
License
WAP/WML Support
CWMail Links
Email Support
Demo
Users guide
Manual
DMailWeb Links
Email Support
Demo
Users guide
Manual
   


Frequently Asked Questions for CWMail and DMailWeb

Q1. What are all these cookie options?

Q2. Why does it say 'user limit reached'

Q3. How do I register?

Q4. Why am I having problems with posting attachments and IE3?

Q5. What is the difference between WebMail and CWMail?

Q6. What is the difference between DMailWeb and CWMail?

Q7. Why do the file extensions on saved attachments look strange in IE3 and IE4?

Q8. Can I use arrows in pick list and have an "add address"  button?

Q9. How can I store a extra user setting like computer type?

Q10. What options are there for controlling the default reply address users will see?

Q11. How can I make the CWMail/DMailWeb login page the default page for my server?

Q12. On login I receive "Error: E5: xcached login page for user@youremail.com (sysadmins: please read faq 12 in faqs.htm)". How do I fix that?

Q13. How do I stop malicious use of forms, JavaScript etc. in messages?

Q14. How can I replace the error messages with their translation?

Q15. How do I change the grey submit buttons to images?

Q16. How do I host email users from several domains?

Q18. What are the issues re: running CWMail on a virtual web server?

Q19. How can I make the delete message button in item.tpl an href instead?

Q20. How do I upgrade my current version of DMailWeb? ... is there an additional charge?

Q21. Version 1.8t changes the way forwards work - how did they work before and what has changed ?

Q22. Can you please provide more details of exactly what you have changed in the templates ?

Q23. Having changed the name of the 'Copy to self' folder   the list displays the 'From' field rather than  the 'To' field ?

Q24. Can I setup a hotmail like system using DMailWeb or CWMail ?

Q25. What are the advantages of using DMailWeb/CWMail over a normal email client ?

Q26. What are the issues for using GUI (WYSIWYG) editors to edit the templates (version 2.xx and above)?

Q27. Why do some user just get back to the login page when they try to send a new message?

Q28. Why do some users get the error "Already connected from another machine"?

Q30. How can I have some users who can connect direct to DPOP but others who can only connect with DMailWeb/CWMail?

Q31. I upgraded the cgi and now for an address "Fred Smith"fred@abc.com it just shows Fred Smith in pick list which fails when you try to send it.

Q32. How can I protect CWMail directories from other CGI's

Q33. Does CWMail support IMAP servers?

Q34. I can't view attachments on my raq2 server?

Q35. Can I use an href link rather than a button to change to another folder?

Q 36. Problems with WebTV users and checking of users IP address

Q 37. I want to use cmd=show page=xxx but some item variables missing

Q 38. Can I login to CWMail straight from my home page?


Q1. What are all these cookie options?

A1. There are several ini setting to do with cookies:

Setting Default Function when true
require_cookies false Forces users to use cookies
no_cookie_domain false Stops the cookies being generated as domain specific
utok_cookie true generates utoken cookie

By default cwmail uses a user token or utoken to maintain a users "logged in" status during a session. This is normally passed out as a template variable and included in all form and hrefs. As part of a url there is at least the potential for it to be stollen as part of the referer information by unscrupulus web managers. For this reason utokens are only temporarily valid and generally only valid for a given from IP address. For added security the utoken may be stored as a cookie to make it unavailable to referer's. However, particularly during testing this is frought with difficulty so it is best avoided. In moving to using cookies you need to be aware of several potential issues:

  1. In versions prior to 2.7c a failure to find the utoken cookie lead to a fairly unhelpfull error "User token not available" with no suggestion as to what to do about it. In 2.7c and later more helpfull errors apear.
  2. There are several bugs/features in several browsers which make things interesting particularly when testing they are listed next
  3. If you use an ip address like 1.2.3.4 in a url instead of fred.bill.com some browsers will not send a cookie
  4. If you use a name without any dots in it some browsers will not send a cookie ie http://mcduff/cgi-bin/cwmail.exe will not work but http://mcduff.com/cgi-bin/cwmail.exe will, even if both refer to same machine.
  5. If you tell a browser to make a cookie domain specific to x.com and you are y.com some browser will only return the cookie to y.com
  6. Many browsers will make cookies domain specific even if not told to.

With these in mind it is still quite possible to produce a more secure system using cookies, but be warned you may see problems particularly during testing which are a function of the browser more than the cgi's use of cookies.

For these reasons on new  installations require cookies is set to false. If you want to set it true start by setting all three as true, later you can make no_cookie_domain false if required.

Q2. Why does it say 'user limit reached'

A2. This was a fault in the early versions of DMailWeb, upgrade to the latest one on our site and it will fix this error.

Q3. How do I register?

A3. See the section on registering DMailWeb and it gives full details.

Q4. Why am I having problems with posting attachments and ie3?

A4. Internet Explorer 3 (IE3) does not support posting attachments.

Q5. What is the difference between WebMail and CWMail?

A5. WebMail and CWMail are competing products designed for the same market with virtually identicle features. But WebMail is at an earlier stage of development. Because of market demands and CWMail's large installed user base we have continued to develop CWMail and have developed both these products in parallel over the last 12mths. WebMail has had to catch up to CWMail and then keep pace with new devopment in that market and CWMail. But we are now at the point were WebMail matches or exceeds CWMail in all its features and future development will be focussed on WebMail. Customers will at some point in the future be given the option to upgrade from CWMail to WebMail as part of our standard upgrades program.

Now for a comparison of features:

Feature

WebMail

CWMail

Folders New Mail, Copies to Self, Trash + User Defined New Mail, Copies to Self, Trash + User Defined
Mail Protocols Supported IMAP, POP, SMTP POP, SMTP
Default Message Storage Mail Server CWMail Folders on Web Server
Disk Overhead Small Greater as users may leave messages in folders. Controlled by users' disk quota settings.
Default for "delete from POP server" False True
Manager Control Page Yes Yes
Frame Version Yes Yes
Delete means Delete from POP server Delete local copy. (It was deleted from POP server automatically after download)

Q6. What is the difference between DMailWeb and CWMail?

A6. The two packages are very similar in many ways and a particular ISP may well choose to run either or both. Describing the differences is also difficult because both are highly configurable. Perhaps it is best to first look at the general difference in concept and then look at particular differences.

In concept DMailWeb is intended to provide normal email users with the ability to occasionally view their New Mail from a web browser and to do this in a simple manner with very little disk overhead for the machine DMailWeb is running on. The users' emails are primarily stored on the POP server or on the user's own client machine by a package like Eudora or Pegasus Mail. Messages are temporarily cached on the web server.

In concept CWMail is intended to provide a complete web based email system, where people will use the web interface as their primary method of dealing with email. It stores the users' messages in multiple folders on the machine running CWMail, i.e. the web-server machine. It has additional features such as spell checking and support for multiple pop hosts.

Now for a comparison of features; note that some of the comments only apply if default settings are used:

Feature

DMailWeb

CWMail

Folders New Mail, Copies to Self, Trash New Mail, Copies to Self, Trash + User Defined
Default Message Storage POP Server CWMail Folders on Web Server
Spell checker built in Yes Yes
Disk Overhead Small Greater as users may leave messages in folders. Controlled by users' disk quota settings.
Remote Messages No For POP accounts that are set as "don't delete after download" messages are flagged as remote and processed accordingly.
Multiple POP Hosts No Allows users to easily collect messages from several POP servers or email accounts and keep and process them in a single location.
Mail filtering rules No Allows users to setup automatic processing of messages using mail filtering rules.
Default for "delete from POP server" False True
Manager Control Page Yes Yes
Frame Version Yes Yes
Delete means Delete from POP server Delete local copy. (It was deleted from POP server automatically after download)

Q7. Why do the file extensions on saved attachments look strange in IE3 and IE4?

A7. When you save an attachment with IE3 or IE4 sometimes the file extension and file type will be a strange sequence of letters rather than .exe or .xls or whatever it should be. In these cases you need to type in the correct extension rather than accepting the default. This only happens with these two browsers and appears to be a bug in the way they handle MIME headers sent by CGI programs.

We apologize for any inconvenience this causes but it is not something which Netwin can solve. This problem does not occur with the Netscape web browsers.

We have found a work around for this strange behavior which corrects the problem for .gif, .txt .zip and many other file types but unfortunately not for all file types.

The problem only exists with any link which contains a trailing "?" in other words any normal cgi reference. If the "?" exists then the file extension is lost.

If you wish to see the bug you can duplicate the behavior with any web server without even using our software, as follows: Create a web page containing two links:

<a href="http://my.server.co/test.exe">test.exe</a>
<a href="http://my.server.co/test.exe?abc">test.exe</a>

then try and save test.exe from both these links using IE3 or IE4. The second link will show a strange file extension for the saved file.

 


Q8. Can I use arrows in pick list and have an "add address"  button?

A8. Normally when you click on an address in the pick list it is immediately added to the To field, or whichever field is selected. This has the unfortunate side effect that the arrow keys cannot be used to select from the pick list. An alternative approach is to have an "add address" button and allow the arrow keys to be used for selecting from the pick list. This can be achieved by modifying the send.tpl and sendf.tpl files as follows. Look for a section in each of these template files which looks like this:

 

</table>
<td>Pick List (Click line to add email address to selected field)<br>
<INPUT TYPE=BUTTON NAME="Del" VALUE="Clear" onClick="dele()"><br>
<select name="tolist" size=5 onChange="setto(this)">
%%tolist%%
</select>
</table>

and replace it with a section like this:

</table>
<td>Pick List (Click line to add email address to selected field)<br>
<INPUT TYPE=BUTTON NAME="Del" VALUE="Clear" onClick="dele()"> <INPUT
TYPE=BUTTON NAME="Add" VALUE="Add"
onClick="setto(document.sendform.tolist)"><br>
<select name="tolist" size=5>
%%tolist%%
</select>
</table>

ALSO you can have a simple cut and pasteable list of email addresses . . .

In Version 1.9k and above the template variable %%toedit%% has been changed so that it contains the items of the picklist on all pages not just the pick list page.

So in Versions 1.9k and above you can also have a simple text area, with the pick list entries in it, from which the users can cut and paste the email addresses that they want. Note that any addresses they add to the pick list from pages other than the pick list page will NOT be saved.

If you wish to do this then, you should replace the following,

<td>Pick List (Click line to add email address to selected field)<br>
<INPUT TYPE=BUTTON NAME="Del" VALUE="Clear" onClick="dele()"><br>
<select name="tolist" size=5 onChange="setto(this)">
%%tolist%%
</select>

with this line taken from pick.tpl in any templates where you wish to have a simple cut and paste list of email addresses, (e.g. in the send.tpl template and/or the forward templates)

<td><textarea name="toedit" rows=12 cols=30>%%toedit%%</textarea>


Q9. How can I store an extra user setting like computer type?

A9. There are two general purpose user settings which you can use to store any user specific information you like. These variables are called uvar1 and uvar2. For example, to add a setting for computer type into the config page you might add the following:

Enter computer type:<input type=text name="uvar1" 

value="%%uvar1%%">
You might then display the computer type in a heading with
<h2>Computer type: %%uvar1%%</h2>
or check for a specific type with:
%%ifinstr%%uvar1%%mac%%

 

Q10. What options are there for controlling the default reply address users will see?

A10. Options  for controlling the default reply address users will see.

There are a number of ways of controlling  what users will see as their default reply address in the  options or config.tpl page or when they do a send message. In the simplest situation if CWMail/DMailWeb is running on machine fred.com then user ralph will see ralph@fred.com as his default reply address.

If you add the setting

domain bill.com

then he will see ralph@bill.com as a default reply address. After that it starts to get complicated. The other setting which can affect it is the @pop true/false

If @pop is false then if a user uses a username of the form ralph@abc.def it will just be treated as an unusual username and passed on to the pop server as normal. If @pop is true then abc.def will be used as the pop machine address and ralph as the username. In this case the default reply address will also change to ralph@abc.def. The various combinations and resulting default reply addresses are shown below:

Login username @pop setting domain setting Machine Name Default Reply Address
ralph T my.domain our.mc.com ralph@my.domain
ralph F my.domain our.mc.com ralph@my.domain
ralph T   our.mc.com ralph@our.mc.com
ralph F   our.mc.com ralph@our.mc.com
ralph@abc.def T my.domain our.mc.com ralph@abc.def
ralph@abc.def F my.domain our.mc.com ralph@my.domain
ralph@abc.def T   our.mc.com ralph@abc.def
ralph@abc.def F   our.mc.com ralph@our.mc.com

 


Q11. How can I make the CWMail/DMailWeb login page the default page for my server??

A11. Normally you create a html document called  default.htm  but as CWMail/DMailWeb  is a cgi you have to create a document which calls it. A small sample html document called start.htm is now included with the distribution files. If you use this as default.htm it will automatically call the cgi and load the login page. On a non-JavaScript browser it will ask the user to press a button to load the login page.

The contents of start.htm is shown below, note you will need to edit it to use dmailweb.cgi on Unix and dmailweb.exe on NT. You may also want to expand what non-JavaScript  browsers will display.

<HTML>
<script language="JavaScript">
<!---
function mysubmit(){
document.start_form.submit()
}
// -->
</script>
<HEAD>
<TITLE>Load CWMail</TITLE>
</HEAD>
<BODY onLoad="mysubmit()">
Click the button to enter the CWMail system
<form name="start_form" action="/cgi-bin/cwmail.exe">
<input type="submit" value="Load CWMail">
</form>
</BODY>
</HTML>

 

An alternative approach is to use a meta tag as follows:

<HTML>
<HEAD>
<META HTTP-EQUIV="Refresh" CONTENT="1;URL=http://my.webserver.com/cgi-bin/cwmail.exe">
<TITLE> CWMail </TITLE>
</HEAD>
</HTML>

The 1 following CONTENT=" gives the time (in seconds) before the browser will load the given URL.

On some web servers you can also give the file location of your default page as the location of the cgi itself. For example on Windows NT, Microsoft's INetPub web server (its on the Windows NT CD), under directories you can check a check box to enable a default page, and if you make this the path from the WWWRoot directory to the cgi, e.g. ../scripts/dmailweb.exe, then it will happily run the cgi as the default page (note the ../ in the path is necessary to go up one directory from the wwwroot directory).

 

 


Q12. On login I receive "Error: E5: xcached login page for user@youremail.com (sysadmins: please read faq 12 in faqs.htm)". How do I fix that?

A12.

This message is generated if the Cwmail/Dmailweb login page has already been used. Typically you will receive this error if you are trying to login from a static web page. To allow this you need to set 'no_tcode true' in your ini file. You might also receive this error if you are running a caching proxy server, in which case setting 'no_tcode true' will also resolve this problem.


Q13. How do I stop malicious use of forms, JavaScript etc in messages ?

A13.

To stop people from putting malicious forms, scripts or Java, i.e. Trojan horse HTML, into a mail message we have added the true/false ini settings,
allow_form, allow_java and allow_script.

All three default to being false.

For Example:

When allow_form is set to false then all forms found in the bodies of the messages are disabled. DMailWeb/CWMail de-activates the form and replaces it with an appropriate message.

When it is set to true, i.e.
allow_form true
then when messages open CWMail will leave any forms in the body of the message active.

 

In addition to this the template variable v_exec (Execute HTML) can be used in the item template (item.tpl) to allow the users to decide if they would like to allow forms and scripts to be executed for the particular message that they are viewing. The v_exec setting overrides the administrator settings, allow_form, allow_java and allow_script so that the user can always run the form/script if they want to take the risk or if they know it is safe.

The following lines show the template variables, v_asis and v_exec, which control the two user settings, View as HTML and Execute HTML from within the form in the item.tpl template.

Inline Images,
<input type=checkbox name="v_asis" value="on" >
View as HTML
<input type=checkbox name="v_exec" value="on" >
Execute HTML

Note that the View as HTML user setting (template variable, v_asis) and the Execute HTML user setting (template variable v_exec) mean slightly different things, i.e. one does not make the other obsolete.

An example of a Trojan Horse script is:

A naughty person might send an email message to someone with a malicious script in it. The malicious script could for example pretend to be DMailWeb/CWMail and ask the user to re-enter their password. The script then takes this information and sends it to the naughty person, so that they would then know the user's login details and could get up to even more mischief !

 


Q14. How can I replace the error messages with their translation ?

A14.

We are planning to add a feature where all error and informational messages will be able to be translated in one file and/or a list of all possible error messages.

In the mean time you can edit the messages in the template files where they appear using the %%ifinstr%% variable.

Basically you use ifinstr to determine which English message the message template variable has ( it is an empty string if there is nothing to be displayed). If a match is found then you provide the line to be displayed.

For example, to replace the message
Error: message too large
with
Mensagem grande demais (message too large)
you search the message for a unique piece of text, i.e. "too large". So in the template file you would put.
%%ifinstr%%info_msg%%too large%%
<FONT SIZE=+1>Mensagem grande demais (message too large)</FONT>
%%endif%%

Which looks like:
Mensagem grande demais (message too large)

 

You need to create an alternative message for every one of the English messages.

E.g.

%%ifinstr%%info_msg%%too large%%
<FONT SIZE=+1>Mensagem grande demais (message too large)</FONT>
%%endif%%
%%ifnstr%%info_msg%%too many%%
<FONT SIZE=+1>Mensagens demais ( too many messages )</FONT>
%%endif%%

Which might look like:
Atenção:
Mensagem grande demais (message too large)

or

Atenção: Mensagens demais ( too many messages )

 

So it is advisable to include a line which always prints the English message ( it looks ok in small type),

E.g.

%%ifinstr%%info_msg%%too large%%
<FONT SIZE=+1 COLOR=RED>Aten&ccedil;&atilde;o:</FONT>
<FONT SIZE=+1>Mensagem grande demais </FONT>
%%endif%%
%%ifnstr%%info_msg%%too many%%
<FONT SIZE=+1> COLOR=RED>Aten&ccedil;&atilde;o:</FONT>
<FONT SIZE=+1>Mensagens demais </FONT>
%%endif%%
%%ifdef%%info_msg%%
<br>
<FONT SIZE=-1 COLOR=RED>(Error:%%info_msg%%)</FONT>
%%endif%%

Which might look like:
Atenção:
Mensagem grande demais
(Error: Message was unreadable)

or

Atenção: Mensagens demais
(Error: Message was unreadable)

 

or at least a general error message in the other language,

E.g.

%%ifdef%%info_msg%%
<FONT SIZE=-1 COLOR=RED>Aten&ccedil;&atilde;o:</FONT>
%%endif%%

%%ifinstr%%info_msg%%too large%%
<br>
<FONT SIZE=+1>Mensagem grande demais </FONT>
%%endif%%
%%ifnstr%%info_msg%%too many%%
<br>
<FONT SIZE=+1>Mensagens demais </FONT>
%%endif%%

Which might look like:
Atenção:

Mensagem grande demais

or

Atenção:
Mensagens demais

or just

Atenção:

 

Note: you cannot nest the %%ifinstr%%'s inside one another,
e.g. this is NOT allowed:

%%ifinstr%%info_msg%%too large%%
<FONT SIZE=+1 COLOR=RED>Aten&ccedil;&atilde;o:</FONT>
<FONT SIZE=+1>Mensagem grande demais (message too large)</FONT>
%%else%%ifnstr%%info_msg%%too many%%
<FONT SIZE=+1>COLOR=RED>Aten&ccedil;&atilde;o: %%info_msg%%</FONT>
<FONT SIZE=+1>Mensagens demais ( too many messages )</FONT>
%%else%% <FONT
SIZE=+1COLOR=RED>Aten&ccedil;&atilde;o:%%info_msg%%</FONT> %%endif%%
%%endif%%

Note also: The displayed messages can come to any of the info_msg, msg or error variables. Although the error messages are mostly displayed in the error.tpl template.


Q15. How do I change the grey submit buttons to images ?

A15.

This is easily done by editing the template files.

Our menu bar in CWMail is a bunch of images that we made up to use as buttons, download that and have a look at the template file, menubar.tpl, as an example if you wish. Looking at the "frame source" in your web browser is a good way to see what DMailWeb has done to the templates.

Firstly note that Images can be retrieved by the cgi itself with a URL like,
http://my.web.server/cgi-bin/dmailweb.exe/image.gif
or they can be directly referenced as per normal HTML, e.g.
http://my.web.server/images/image.gif

Note that for the first one the image is stored in the templates directory, which users do not have access to, and retrieved by the DMailWeb/CWMail cgi from there, but for the second the image is stored in an images directory of the web server (if this is directly under the server root directory, e.g. server/wwwroot/, or if it is the default images directory for the web server then it can be referenced as per the example above).

Using a direct link is more efficient and generally quicker, but you do need to place the image files in a directory to which the web server will allow access.

To retrieve through the cgi you enter something like this in the template file,
"%%b_action%%/s_new.gif"
A direct reference would look something like,
"/nwimg/s_new.gif"

Note the direct reference shown will only work if the images directory is set as the default image directory for the web server, or if it is in the web server's root page directory, e.g. if the web server's root directory for a web was, wwwroot, you could create, wwwroot\nwimg and the reference as above would work.

In the menubar.tpl file the create new message button is called by this line within the form,
<input type=image border="0" src="%%b_action%%/s_new.gif" name="new" alt="New Message">

DMailWeb will replace the %%b_action%% with the required URL to give something like,
src="/cgi-bin/dmailweb.exe/s_new.gif"

So to change a grey submit button you might change the line (which is for the 'check' button, in the nfmenu2.tpl template file)
<input type=submit name="list_new" value="Check">
to something like,
<input type=image src="%%b_action%%/check_mail.gif" name="list_new" value="Check">
or
<input type=image src="/nwimg/check_mail.gif" name="list_new" value="Check">

where the check_mail.gif image file resides in wwwroot/nwimg for the direct reference.

 


Q16. How do I host email users from several domains?

A16. Use Version 2.1h or greater. See CWMail.htm or DMailWeb.htm Virtual Host Support section for details.


Q18. What are the issues re: running CWMail/DMailWeb on a virtual web server ?

Many customers have access to just a section of a web server that is run by their ISP or some other group. I will call this a virtual web server. They wish to setup DMailWeb and/or CWMail on their section of the web server, to provide their users with web based email access.

A18: I will write about CWMail but the same applies for DMailWeb.

Parts of this answer:

Definition of terms for this response:

The basics: 

Setup of template directory etc.:

Getting the files to your ISP's machine: 

Note on path names in the ini file, cwmail.ini: 

Definition of terms for this response:

ISP: Whoever manages the web server that you are using a section of.
administrator: You. The person setting up CWMail.
virtual server: Your section of your ISP's web server.
your directory: The directory which your ISP sets aside for you, as space on their machine. There is a full path to this directory, which you should be able to see if you telnet to your directory and type the command pwd. NOTE: You must specify this FULL path on the front of any ini file path setting, e.g. ini setting for templates should be something like, /w0120/pub/yourco/cwmail and not just /cwmail.
your virtual web server's root directory: The directory within "your directory" which is the root of your virtual web site.
your virtual server's cgi or scripts directory: This is the directory which your ISP assigns to you for storing your cgis, e.g. cgibin. It might be just for you or you may share it with other cgi authors.

The basics:

CWMail consists of a cgi with a set of templates, ini files and it also requires a work area. So to run on your virtual web server your ISP needs to provide you with support for cgis.

Your ISP can advise you of a directory, normally within your root directory, in which you should place cgi files, e.g. cgibin. In this directory you need to place both the cgi, i.e. cwmail.cgi (or cwmail.exe if your ISPs machine is running Windows NT), and your ini file, i.e. cwmail.ini.

They will also have presumably told you the URL that you need to get to the root of your virtual web server. The URL that your users will use to access CWMail will normally begin with this URL, then have something like, /cgibin/cwmail.cgi appended to it. For example: if the root of your web server had the URL, http://myco then CWMail running on that system might have the URL, http://myco/cgibin/cwmail.cgi (note that the cgi ends .exe instead of .cgi if your ISP is running Windows NT).

CWMail has a set of web page template files. You should create a directory, probably in your directory but this is discussed in detail next, and copy ALL of the distribution files into it.

 

Setup of template directory etc.:

The CWMail cgi needs read access to the template directory and read-write access to the work directory. Note: the default is for the work directory to be the same as the template directory. The cgi will also need read access to the ini file.

We normally suggest that you put the templates/work directory in a separate part of your machine and set it's ownership to be the same user as the cgi is running under. This is because you don't want the template directory ( and work directory) to be directly accessible by a web client. The cgi will pass the edited templates to the web client. So we suggest not putting either of these two areas (templates and workarea) in the web server's web page tree.

However on a virtual web server you probably don't have the same freedom. Here are three tables showing the different configurations. Note that the cgi creates a user directory for each user and then creates a user.dat file for that user within that.

The first one is the ideal situation. The second is ok, but you have the disadvantage of not being able to manually view/edit your user's user.dat files, you have to use the manager page. The third works but risks security and note that it still has the disadvantage of not being able to see the user.dat files.

 

Given that you, the administrator, Telnet to your space on your ISP's machine with the username, bsmith, and :.

your space on ISP's machine is: /w0120/bobs_space

root of your virtual web is: /w0120/bobs_space/webroot

directory for your cgis is: /w0120/bobs_space/cgibin

the default username that cgis run as is: anybody (note that anybody is a particular user, with the username "anybody")

 

1. Ideal Situation: CGI runs as you, (with your username), templates stored out of virtual web server's tree.

directory cgi virtual web root user directories (example is u_xx)
directory path /w0120/bobs_space/cgibin /w0120/bobs_space/webroot /w0120/bobs_space/cwmail/u_xx
access settings
  • Runs as user bsmith
  • CGI has read + execute
  • web client has read
  • bsmith has read + write + execute

2. CGI runs as user, anybody, templates stored under cgibin: OK, but with limitation of cannot manually view/edit user.dat files. This is because the cgi creates the user directories and user.dat files under its own username and you as user bsmith do not have any access to them.

directory cgi virtual web root user directories (example is u_xx)
directory path /w0120/bobs_space/cgibin /w0120/bobs_space/webroot /w0120/bobs_space/cgibin/cwmail/u_xx
access settings
  • Runs as user anybody
  • CGI has read + execute
  • bsmith has read + write + execute
  • web client has read
  • bsmith has NO access to directories created by cgi, e.g. user directories
  • (users anybody and bsmith have full access to cwmail directory)

3. CGI runs as user, anybody, templates stored out of virtual web server's tree.Works but risks security and still has the disadvantage of not being able to see the user.dat files.

directory cgi virtual web root user directories (example is u_xx)
directory path /w0120/bobs_space/cgibin /w0120/bobs_space/webroot /w0120/bobs_space/cwmail/u_xx
access settings
  • Runs as user anybody
  • CGI has read + execute
  • bsmtih has read + write (+ execute)
  • web client has read
  • bsmith has NO access to directories created by cgi
  • (world has read + write+execute to cwmail directory !!! )

 

Getting the files to your ISP's machine:

If you are going to install CWMail on your virtual web site, then you need to copy the the cgi and the template files etc. (the distribution set) onto that machine. You need to install the version of the program which is for the platform that your ISP is running - you should ask them if you are unsure.

There are a number of ways of doing this; Number 1 is the most direct:

1 Telnet to your section of your ISP's machine and from there ftp the compressed distribution set directly from our ftp site to that machine.

Here are the FTP commands that you will probably need. You should Telnet to your section of your ISP's machine, and then move to the directory where you want the files to end up. Then . . .

ftp ftp.netwinsite.com (login as the user, anonymous, supplying your email address as it requests as a password)

cd pub
cd netwinsite
cd dmailweb 
dir ( to display what is available)
binary (sets transfer type to binary mode)
get cwmailxxx_platform.tar.Z (where xxx is the version number, 

e.g. cwmail18h or cwm18h is cwmail version 1.8h, and platform is 

the platform that the cgi is going to run on, e.g. Linux)
quit

Then uncompress the files with these lines,

uncompress cwmail10.tar		# Uncompress tar file

tar -xvf cwmail10.tar		# Extract distribution to cwmail sub-directory

(Details on the rest of the unpacking process are in the Administrator's guide. and install.txt)

2. You can FTP it from your machine to your ISP's machine, having already downloaded it from our site to your machine (it is probably easiest to let your browser do the FTPing of the distribution set from our site to your machine by simply clicking on the link on the downloads page (https://netwinsite.com/dmailweb/download.htm) on our website.

3. If you are running the same platform as your ISP then you could, download the distribution set from our web site, trial it on your machine, then FTP the individual files from your machine to your ISP's machine.

 

Note on path names in the ini file, cwmail.ini:

When you enter paths in the ini file, they need to be FULL paths from the root of the machine that is running the cgi,

e.g. for the setting templates you might have,
templates /webxxxxx/bobsroot/cwmail
where /webxxxx/bobsroot is the path to your directory starting at the machines root directory.

You should NOT simply use relative paths. e.g.
templates /cwmail


Q19. How can I make the delete message button in item.tpl an href instead?

A19.

Many of the controls in the template pages can appear either as a button in a form or as an href.

As an example, in item.tpl there is a row of controls like Next, Previous, Forward etc. and then at the end of the page there are some buttons for delete, etc. You might want to put the delete function with the others.

As a button it appears as part of a form, thus:

<form method=post action="%%b_action%%">
<input type=hidden name="utoken" value="%%utoken%%">
<input type=hidden name="fld" value="%%fld%%">
<input type=hidden name="item" value="%%item%%"> <input type=submit name="delitemn" value="Delete">

Alternatively it can be used as an href, thus:

<a href="%%b_action%%?cmd=delitemn&item=%%item%%&fld=%%fld%%&utoken=%%utoken%%&" >Delete</a>


Q20. How do I upgrade my current version of DMailWeb? ... is there an additional charge?

We purchased DMailWeb a few months ago and I noticed that there have been a number of upgrades available since our purchase. Are we able to download the newest version for no additional charge? Is it a transparent upgrade? Just overwrite existing files? Do I need to re-enter my license number in the ini file?

A20.

If you are still within the upgrade and support period of the product then you simply download the new version that you require and use the same license key. CWMail and DMailWeb both come with support and updates free for 12 months. If you are unsure whether you still qualify, you should contact sales at netwin@netwinsite.com , preferably with your product license number (supplied in the same email as your license key, e.g. DMWxxxx), and they will be able to verify it for you.

Given that you have downloaded the new version, yes it is a relatively transparent upgrade, but you do need to think carefully, rather than follow the same "first time" install instructions blindly, otherwise you will end up having to re-setup a lot of things.

If you have not modified the templates in any way (or very minimally) then you can install the templates and the cgi straight over the top as per the install instructions, but we do not suggest copying over your ini file, otherwise you will have to re-configure it.

Note: the Unix install instructions copy the templates with the line

cp -i ./tpl/* /var/spool/dmweb # Copy template files over

Note that the -i option will stop the old templates from being overwritten, so you may need to remove it if you do want them to be replaced.

 

Given that you probably have modified the templates, then we suggest only copying the new cgi (it ends with .cgi on Unix'ish platforms and .exe on NT) over the top of the old one (after making a copy of the old one first).

You need to look at the updates page, updates.htm, on our web site (also in the distribution set) to see what changes you want/need to make to the templates,
https://netwinsite.com/dmailweb/updates.htm

Basically you should not have to make any changes, but I do suggest adding the following to your login.tpl template to protect your users from people logging in to their accounts by using a cached login page.

You need to find this line in the template, login.tpl,

<input type="hidden" name="cmd" value="login">

and directly underneath it add this line,

<input type="hidden" name="tcode" value="%%tcode%%">

You will find more information about this in the following FAQ,
https://netwinsite.com/dmailweb/faqs.htm#q12

 

You will only need to re-enter your license key in the ini file if you delete or copy over your old ini file when you upgrade.

 


Q21. Version 1.8t changes the way forwards work - how did they work before and what has changed ?

A21: The following answers apply to both CWMail and DMailWeb (excepting the odd description of a button or href location).

Prior to version 1.8t:
Version 1.8t and above:
Details on the two templates, and how they are called and submitted:
Difference file for forward.tpl and fwdedit.tpl in version 1.9c:

Prior to Version 1.8t:

The distribution set came with two forwarding templates - fwdedit.tpl and forward.tpl (and their frames versions)

Forward.tpl is the template for the page users will see when they are doing a strict forward, i.e. when the message cannot be edited and any attachments with the original message will be forwarded on, to the recipient of the forward.

Fwdedit.tpl is the template for the page users will see when they are doing a forward where they can edit the message. It displays the original message in an editable text area so that the user can add to it before it is sent on to the recipient of the forward. Any attachments with the original message will NOT be forwarded with the message to the recipient.

Forward.tpl is practical for multiple forwards (i.e. forwarding more than one message to the same person), whereas fwdedit.tpl is impractical for multiple forwards.

The forward.tpl template is summoned by the following buttons/hrefs (mostly on the new mail page, list.tpl) . . .

  • selecting a list item and then clicking on the "Fwd Sel Items" button.

The fwdedit.tpl template is summoned by the following buttons/hrefs (mostly on the new mail page, list.tpl) . . .

  • clicking on the "forward" href on the new mail list.
  • clicking on the "forward" href on the read a message page.

 

Version 1.8t and above:

The distribution set still comes with two forwarding templates - fwdedit.tpl and forward.tpl (and their frames versions).

Forward.tpl is the template for the page users will see when they are doing a strict forward, i.e. when the message cannot be edited and any attachments with the original message will be forwarded on, to the recipient of the forward.

The change to forward.tpl is that now the user can add a note which will be attached to the message before it is forwarded.

Fwdedit.tpl is the template for the page users will see when they are doing a forward where they can edit the message. It displays the original message in an editable text area so that the user can add to it before it is sent on to the recipient of the forward. Any attachments with the original message will NOT be forwarded with the message to the recipient.

Fwdedit.tpl is the same in versions before and after 1.8t.

Forward.tpl is still practical for multiple forwards (i.e. forwarding more than one message to the same person), whereas fwdedit.tpl is still impractical for multiple forwards.

So in Versions 1.8t and above the default templates have been changed so that all hrefs and buttons to do with forwarding call only the forward.tpl template.

 

Details on the two templates, and how they are called and submitted:

Forward.tpl:

  • To have the forward.tpl template summoned you need to use the "forward" action name, for example submit a form with a button (/image) with the name property set as "forward" i.e.
    <input type=submit name="forward" value="Fwd Sel Items">
    See list.tpl for an example of this.
  • The page is submitted with the hidden cmd value, cmd="doforward", e.g.
    <input type=hidden name="cmd" value="doforward">
  • There are extra template variables used to handle multiple forwards, i.e. fwd_list, nfwd, e.g.
    <input type=hidden name="fwd_list" value="%%fwd_list%%">

Fwdedit.tpl

  • To have the fwdedit.tpl template summoned you need to use the "forward_edit" action name, for example use an href with the b_forward_edit template variable, i.e.
    <td><a href="%%b_forward_edit%%">Forward</a></td>
    See list.tpl for an example of this.
  • The fwdedit.tpl template is a lot like the send.tpl template, in that it uses the command, cmd="send", i.e.
    <input type=hidden name="cmd" value="send">
    and the submit button with property, name="send"
    <input type=submit name="send" value="Send Now" ><br>

 

Difference file for forward.tpl and fwdedit.tpl in DMailWeb Version 1.9g:

To see the difference between the two templates I suggest running a difference program on the two template files for the version you are using, see FAQ #22 for details on how to do this.

Here is a useful example of a difference output showing the differences between forward.tpl and fwdedit.tpl in DMailWeb Version 1.9g.

Comparing files forward.tpl and FWDEDIT.TPL
***** forward.tpl
1: <html><head>
2: <title>Forward %%nfwd%% mail message(s) </title>
3: </head>
***** FWDEDIT.TPL
1: <html><head>
2: %%include%%nfmenu.tpl%%
3: <title>Forward message </title>
4: </head>
*****

***** forward.tpl
4: <body>
5: <form name="form1" method=post action="%%action%%">
6: <h3>Forward <b>%%nfwd%%</b> mail message(s)</h3>
7: <input type=hidden name="cmd" value="doforward">
8: <input type=hidden name="utoken" value="%%utoken%%">
9: <input type=hidden name="fld" value="%%fld%%">
10: <input type=hidden name="fwd_list" value="%%fwd_list%%">
11: <table>
***** FWDEDIT.TPL
6: <body>
7: <form name="form1" ENCTYPE="multipart/form-data" method=post action="%%action%%">
8: <input type=hidden name="cmd" value="send">
9: <input type=hidden name="fld" value="%%fld%%">
10: <input type=hidden name="utoken" value="%%utoken%%">
11: <h3>Forward mail message</h3>
12: <table>
*****

***** forward.tpl
13: <table>
14: <tr><td align=right>To: <td align=left><input name="to" size=24 value="%%to%%" onFocus="document.form1.oo[0].checked = true"><
15: nput type=radio name="oo" value="t" checked></tr>
17: <tr><td align=right>CC: <td align=left><input name="cc" size=24 onFocus="document.form1.oo[1].checked = true"><input type=radi
18: name="oo" value="c" ></tr>
20: <tr><td align=right>BCC: <td align=left><input name="bcc" size=24 onFocus="document.form1.oo[2].checked = true"><input type=ra
21: io name="oo" value="b"></tr>
23: <tr><td align=right>From: <td align=left><input name="reply" size=24 value="%%reply%%" onFocus="document.form1.oo[3].checked =
24: true"><input type=radio name="oo" value="r"></tr>
25: </table>
26: <td>Pick List (Click line to add email addresss to selected field)<br>
27: <INPUT TYPE=BUTTON NAME="Del" VALUE="Clear" onClick="dele()"><br>
28: <select name="tolist" size=5 onChange="setto(this)" >
29: %%tolist%%
***** FWDEDIT.TPL
15: <table>
16: <tr><td align=right>To: <td align=left><input name="to" size=24 value="%%h_from%%" onFocus="document.form1.oo[0].checked = tru
17: "> <INPUT TYPE=RADIO NAME="oo" VALUE="t" CHECKED></tr>
18: <tr><td align=right>CC: <td align=left><input name="cc" size=24 value="%%h_cc%%" onFocus="document.form1.oo[1].checked = true"
19: <INPUT TYPE=RADIO NAME="oo" VALUE="c"></tr>
20: <tr><td align=right>BCC: <td align=left><input name="bcc" size=24 value="%%h_bcc%%" onFocus="document.form1.oo[2].checked = tr
21: e"> <INPUT TYPE=RADIO NAME="oo" VALUE="b"></tr>
22: <tr><td align=right>Reply-To:
23: %%ifdef%%h_reply%%
24: <td align=left><input name="reply" size=24 value="%%h_reply%%"
25: %%else%%
26: <td align=left><input name="reply" size=24 value="%%h_xfrom%%"
27: %%endif%%
28: onFocus="document.form1.oo[3].checked = true"> <INPUT TYPE=RADIO NAME="oo" VALUE="r"></tr>
29: <tr><td align=right>Attach: <td align=left><input type=file name="attach" value="%%prev_attach%%" size=24">
30: <script language="JavaScript">
31: <!--- hide script from old browsers
32: if (navigator.appVersion.indexOf('MSIE 3.',0) >=0) document.writeln("<br>Unfortunately IE3 does not support attachments");
33: // end hiding from old browsers -->
34: </script>
35: </table>
37: <td>Pick List (Click line to add email address to selected field)<br>
38: <INPUT TYPE=BUTTON NAME="Del" VALUE="Clear" onClick="dele()"><br>
39: <select name="tolist" size=5 onChange="setto(this)">
40: %%tolist%%
*****

***** forward.tpl
31: </table>
32: <table><tr><td align="right">
33: Subject: <td><input name="subject" size=44 value="(From message)">
34: <input type=submit name="action_send" value="Send" >
35: <input type=submit name="action_senddel" value="Send And Delete" >
36: <tr><td align="right" valign=top>Added Note:
37: <td><textarea wrap="physical" name="fwd_note" cols=64 rows=8>
38: </textarea> <br>
39: </tr></table>
40: <hr>
41: <center>
42: <input type=submit name="action_send" value="Send" >
43: <input type=submit name="action_senddel" value="Send And Delete" >
44: <input type=checkbox name="v_myfrom" value="on" %%v_myfrom%%>Use my From Address
45: </center>
46: </form>
***** FWDEDIT.TPL
42: </table>
44: Subject: <input name="subject" size=64 value="Fwd: %%h_subject_raw%%"><br>
45: Please enter your message text here: (press enter at the end of each line)
46: <input type=submit name="dosend" value="Send Now" >
47: <br>
48: <textarea wrap="physical" name="message" cols=64 rows=12>
49: ****** Forwarded Message Follows *******
50: >To: %%h_to%%
51: >From: %%h_xfrom%%
52: >Date: %%h_date%%
53: >
54: %%quote_body%%
55: </textarea> <br>
56: <hr>
57: <input type=submit name="send" value="Send Now" ><br>
58: <input type=checkbox name="addsig" value="on" %%addsig%%>
59: Add Signature
60: <input type=checkbox name="send_autocc" value="on" %%send_autocc%%> Send CC to self for confirmation<br>
61: <input type=checkbox name="copyself" value="on" %%copyself%%> Save a copy in copies to self folder<br>
62: </form>
*****

 


Q22. Can you please provide more details of exactly what you have changed in the templates ?

A22:

Logistically this is an enormous exercise for us to do and there is a simple way for you to do this yourself.

On the updates page,
https://netwinsite.com/dmailweb/updates.htm
we provide a list of the templates that we have changed in moving from the previous version to the next one, e.g. Template files updated: forward.tpl,item.tpl.list.tpl, send.tpl

You can simply run a difference program on the latest templates and the ones that your current set are based on.

To do this, you do need to have saved a copy of the example distribution set of templates that came with the original version that you used.

On Windows NT . . . :

There is a Windows NT command, Fc ( i.e. file compare). You need to run this program from a command line for each of the pairs of templates files, i.e. run it on the old template file and the new one,

Fc /c /l /n /w template1.tpl template2.tpl > changes.txt

where template1.tpl is the name of the original template, template2.tpl is the name of the latest version of the template that you are interested in, and changes.txt is the name of the file that you want the results of the compare piped into.

Note: You may find it easiest to rename one of templates so that you can put them both in the same directory first.

 

On Unix'ish platforms . . . :

Use the diff command. So at the command prompt type,

diff a b > changes

where a and b are the two files to compare and changes is the name of the file that you want the resulting text file written into.


Q23. Having changed the name of the 'Copy to self' folder  list  now displays the 'From' field rather than the 'To' field

A23. This occurs because in the list templates (list.tpl, listf.tpl)  'Copies to self' occurs as a literal string which is used to switch from displaying the From: field to the To: field. In the copies to self folder we want to display the To: field as they are all from the same person (us). So having changed the name of the copies to self folder in the ini file we also need to change it in the templates.

The list templates (list.tpl, listf.tpl) have the following line,

%%ifinstr%%folder%%Copies to self%%

Changing the 'Copy to self' to the new name of the folder will change the folder display to show the 'To' field.

e.g if the new folder name is 'Sent Messages' the line would be,

%%ifinstr%%folder%%Sent Messages%%

 


Q24. Can I setup hotmail like system using DMailWeb or CWMail

A24. Yes, you need:

                CWMail or dmailweb (web to mail interface)
                DMail (dsmtp,dpop servers)
                nwauth (external authentication module for dmail) (Comes with DMail)
                Netauth (web email management) (comes with DMail)

See: Creating a hotmail system

Just follow the links above to download DMail and Netauth. Version 2 of Netauth only works with DMail and nwauth but later versions will work with other mail servers and authentication methods.

Alternatively if you want to create your own web cgi for adding users you can start with wadduser rather than Netauth. Wadduser is an example with source in C  It is an example web cgi and webpage for adding users to the  nwauth database.

The DMAIL distribution set includes source and compiled versions of nwauth and wadduser, you
should examine the source and modify wadduser.htm so that it only allows the users
to automatically create their own accounts (it has extra functions which you would probably only want system administrators to be able to perform - such as changing other users passwords :-)

Technical details:

1) Fetch the source for nwauth/wadduser - this now comes with dmail but if you have
an earlier version you can download it from
ftp://ftp.netwinsite.com/pub/authent/nwauth.zip

2) Building wadduser.cgi and nwauth (only needed on UNIX)

  

               gcc wadduser.c nwauth.c -DNOAUTHMAIN -o wadduser.cgi

                rm nwauth.o (so you can build it without NOAUTHMAIN defined)

                gcc nwauth.c -o nwauth

Note: if you get crypt errors you may need to add, -lc -lcrypt to the end of each gcc line.

3) Install the cgi script and the html form

                cp wadduser.cgi /home/httpd/cgi-bin (or wherever your web server cgi bin directory is)
                cp wadduser.htm /home/httpd/htdocs

4) Test the cgi, use netscape and reference your web site:

                http://your.web.server/wadduser.htm

                Fill out the form and press one of the buttons, if it fails,
                you will probably need to modify the 'action' parameter in wadduser.htm

5) Tell dMail to use nwauth for user authentication, Either use dmadmin for this or on unix add or change in /etc/dmail.conf

                authent_method external
                (unix) authent_process /usr/local/dmail/nwauth
                (NT) authent_process c:/dmail/nwauth.exe
                authent_number 1

6) Modify wadduser.htm so it only allows the actions that you want users to be able
to perform, (e.g. not delete or search)

7) On UNIX you will need to set some file protections:

                touch ..../cgi-bin/adduser.log
                chown nobody .../cgi-bin/adduser.log
                touch /usr/local/dmail/nwauth.txt
                chown nobody /usr/local/dmail/nwauth.txt

 


Q25. What are the advantages of using DMailWeb/CWMail over a normal email client?

I would like to know what are the advantages of using DMailWeb rather than the existing e-mail client that is included with many web browsers.  For example Netscape Communicator and Internet Explorer both include an email client.

A25.
There are many advantages in using Web based EMail clients like DMailWeb/CWMail over normal email clients which just happen to be part of a web-browser package. Normal email clients talk to POP and SMTP servers directly and have to be setup for a particular user. Another user can't use the email client without changing the settings. A web-based email system talks to a webserver and cgi, the cgi handles all communication with the POP and SMTP servers. No installation or user specific setup is required on the client user's machine. The detailed points made below are from YOUR customer's point of view.

1.     Platform independence.

Since DMailWeb/CWMail is a CGI that is run in conjunction with the ISP's web server, the customer can access their mail from any machine that has a web browser, no matter what platform that web browser is running on.

2.    Reduces Setup Time.

In order to check mail all the user requires is a username, password and a working web browser. The customer does not have to setup any pop or smtp mail details on their machine.

DMailWeb/CWMail has been setup and is maintained by their email ISP/supplier.

This reduces the amount of time on support questions with setting up  email clients.

3.    No EMail Settings Changes Required

With normal client email machines, if you wish to read mail from a number of different machines, you have to setup the mail client settings on each one, but in doing so the previous settings for the machine are overwritten.

Whereas the settings in DMailWeb/CWMail are all setup once by the EMail ISP/supplier, so the user does not have to change the settings on the client machine.

4.    Ability to Roam.

Since all mail is either left on the pop server or is stored on the machine running the CGI, this allows the customer to move between machines and still have access to all of their mail and mail folders.

All the computer needs is a web browser and a connection to the www.

So a customer could read their mail from home, go on holiday and still be able to read their mail, using internet cafes, or even a friend's machine, without losing any of their friend's email settings.

Also this makes web based EMail an ideal solution for intranet mail systems. Setup as such, all users are free to move between any machines in the workplace and easily get their mail. All that is required is a web browser on each machine.

NOTE:

DMailWeb and CWMail are very similar in design but are designed as solutions for two different situations.

For more information about the difference between DMailWeb and CWMail see,

Q6. What is the difference between DMailWeb and CWMail?


Q26. What are the issues for using GUI (WYSIWYG) editors to edit the templates (Version 2.xx and above)?

A26.
The changes in Version 2 make it possible to edit the template files using GUI (WYSIWYG) editors like MS FrontPage. With versions prior to 2.0b, changes to HTML in the template files had to be done in a text editor.

Changes that have been implemented to make it possible to use GUI (WYSIWYG) editors:

  • Added an ini file setting to allow the template variable separator to be specified as any two character string. We now use separator ||, previously %% was used.
  • ifdef, ifinstr, etc. do not have to be on separate lines any more - they are treated as if they were.
  • To stop html GUI editors moving things like ||poplist|| to outside <select> tag if an ini setting for separator is used the initial option and final /option tag are placed in template files rather than in the variable
    i.e. all the templates have had the following template variables changed.
        %%fldlist%%    -->         <option>%%fldlist%%</option>
        %%poplist%%    -->         <option value="0" >%%poplist%%</option>
        %%addr_books%%-->         <option>%%addr_books%%</option>
        %%list_alt%%    -->         <option>%%list_alt%%</option>
        %%r_headers%%    -->         <option>%%r_headers%%</option>
        %%r_actions%%    -->         <option>%%r_actions%%</option>
        %%r_folders%%    -->         <option>%%r_folders%%</option>
        %%tolist%%    -->         <option>%%tolist%%</option>
        %% -> ||
    For NT a small utility rsearch.exe and a cmd file to make the above changes is included in the distribution set.

So what do I need to do:

Situation A.       

    If you have made no changes to the templates, or very few that you don't mind re-typing in, you can do a complete installation of the CGI and the templates.

    If you decide to replace your ini file as well you will have to update it with your ini settings.   

    OR:

    If you decide NOT to replace your ini file you will need to add this line to the file,
            separator ||

Situation B.

    If you have heavily modified your templates and you do not want to have to re-type the changes, then

    1.    When installing only update the CGI.

    2.    Edit your ini file and add this line,
                separator ||

    3.    You will need to edit your templates and replace all the '%%' with '||'.

    4.    You will need to change the following template variables where ever they occur so that they have the '<option>' and '</option>' tags around them. This is because if an ini setting for separator is put in the ini file then the CGI automatically adds initial '<option>' and final '</option>' tags around template variables that appear in the select lists, i.e between '<select>' and '</select>'.

                    %%fldlist%%    -->         <option>%%fldlist%%</option>
                    %%poplist%%    -->         <option value="0" >%%poplist%%</option>
                    %%addr_books%%-->         <option>%%addr_books%%</option>
                    %%list_alt%%    -->         <option>%%list_alt%%</option>
                    %%r_headers%%    -->         <option>%%r_headers%%</option>
                    %%r_actions%%    -->         <option>%%r_actions%%</option>
                    %%r_folders%%    -->         <option>%%r_folders%%</option>
                    %%tolist%%    -->         <option>%%tolist%%</option>

    NOTE: part 3 and 4 can be done on Windows NT using the executable program rsearch.exe and v1tov2.cmd these come with the distribution set.

        You will need to to copy the file rsearch.exe and v1tov2.cmd to your template directory. Running the v1tov2.cmd file will perform the required changes to your templates.

        eg.    copy rsearch.exe /cwmail
                copy v1tov2.cmd /cwmail
                cd /cwmail
                v1tov2.cmd


Q27. Why do some users just get back to the login page when they try to send a new message?

A27.

Some browsers allow several options for the caching of web pages. This saves pages being reloaded from the web server. One aspect of caching is when the web browser should verify that it really is the same document that has been requested. A typical browser might allow setting of:

Verify documents? Once per session Always Never

Never is a dangerous setting because it can mean if we have submitted this form before with different values in it, just give me back what ever I got back last time. This naturally causes problems with CWMail and DMailWeb. In the example above pressing send should call the cgi again but instead gives back the login page which was received last time the cgi was called i.e. at login. So just advise users not to use the never setting and their problem will go away:-)

See also

add_header <META HTTP-EQUIV="Pragma" CONTENT="no-cache"><META
HTTP-EQUIV="cache-control" CONTENT="no-cache">

Q28. Why do some users get the error "Already connected from another machine"?

Users inside large networks using multiple proxy servers may receive an error "E45 Already connected from another machine" when using CWMail/DMailWeb.

The following is happening:

When you login to DMailWeb, it grabs and stores your current IP Address. The users that are receiving the error are inside large networks where multiple proxy servers exist. If they login through one proxy, and their network switches them to another proxy server, their IP Address changes.

When the IP address changes, DMailWeb sees this difference, doesn't expect it and reports back Error "E45 Already connected from another machine", with their old and new IP address.

Users that are also using WebTV will also have this error occur, since while using WebTV their IP address can change during the same session.

A28.

IP checking is an additional security feature that was added to CWMail/DMailWeb. If you have users who access webmail from proxy servers which change their allocated IP address within a session, you will need to turn this feature off. This feature can be turned off by adding the following setting in your ini file:

    no_ipcheck true

If you do this you may also like to add the following lines to login.tpl to stop the login page from being cached by the browser: The lines should be added directly after the <head> tag

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="cache-control" CONTENT="no-cache">


30. How can I have some users who can connect direct to DPOP but others who can only connect with DMailWeb/CWMail?

Q:I want to have two different types of users. I want one group to have both pop and web access to their mail, and I want the other group to have web access only. How would I set this up? Would I need to run two separate servers? I plan to authenticate using an external authentication module (talking to a MS SQL 6.5 database).

A:Yes, you can run two separate servers or you can make an external authentication module flag some users as being only allowed web access.

The trick is that DPOP only has the ip_address that the user connected from to know if the user has connected from CWMail or with another email client direct to the POP server. DPOP passes this ip address to the external authentication module.

So,
1. If you run two separate servers then you can use the user_ip_address setting on one of the servers to only allow connections to that server from the ip address of the cwmail machine. Each server then either needs its own authentication database or you need an external authentication routine for each server which cannot 'see' the other server's group of users in the database.

2. The nicer way is to make your user database have a flag for each user to say whether they are allowed to connect directly to the POP server or not, and then make your external authentication routine check this flag, and reject the connection if they have not connected from the appropriate IP address. The IP address that the user connects from is given in the authentication request by DPOP, e.g.
check username password ipaddress

So your authentication routine needs to check the "direct dpop connection allowed" flag and if it is false, it should check the ipaddress passed against your CWMail server(s)'s ip address and only allow the connection if it does not match. This is an example - you do not necessarily have to do it this way. The fact that the connection from IP address is passed to the external authentication module is the important point.

If I have not pointed it out before we also have the source code to another customer's SQL authentication module which I can give to you if it would help.

For more information contact

support-dmail@netwinsite.com

 


Q31. I upgraded the cgi and now for an address "Fred Smith"fred@abc.com it just shows Fred Smith in pick list which fails when you try to send it

This is because the javascripts at the end of the send and send.tpl pages need changing to use

sel.options[i].value instead of sel.options[i].text   this occurs in several places in both send.tpl and sendf.tpl

The new templates have this change but if you customized the templates then you have to make the change by hand.


Q32. How can I protect CWMail directories from other CGI's?

CWMail stores user information in its workarea. As CWMail/DMailWeb are running as a cgi it normally has the same rights as other cgi's. On unix it usually runs as nobody and creates/uses files owned by nobody. This can be a security risk if other untrusted cgi's are being used. The solution is to give CWMail its own uid. It can then run as this user and use files/directories which are owned by this user and not accessable to other cgi's

Step 1: Create a new user, For example on linux you might do the following
    su - root
    adduser cwmail
    passwd cwmail
It will then prompt you for a password for your new user, choose one but be careful not to make it obvious.

Step 2: Change the ownership of the cwmail.cgi and cwmail.ini file, type these commands while in your cgi-bin directory.
    chown cwmail:nobody cwmail.*

Step 3: Change the execution mode of the cwmail.cgi file, type these commands while in your cgi-bin directory.
    chmod +sx cwmail.cgi

Step 4: Change the ownership of the cwmail workarea directory and all files contained within this directory including all the files below in any subdirectories.
        chown -R cwmail:cwmail {workarea_directory}

And that's it, now when someone executes cwmail.cgi with a web browser it runs with the same privilege as if the user cwmail has executed it so it can only access files in directories that the user cwmail can access.


Q33. Does CWMail support IMAP servers?

No, CWMail/DMailWeb currently only works with POP and SMTP servers. However Netwin now has a similar product which works with IMAP servers. It is called WebIMAP and provides similar web-based email but using an IMAP database.


Q34 I can't view attachments on my raq2 server.

This is often due to an incorect setting in the web server config file:

/etc/httpd/conf/httpd.conf

Change the line

AddHandler cgi-wrapper .cgi

to

AddHandler cgi-script .cgi


Q35. Can I use an href to change to another folder?

This can be done for any folder provided you know the folder number rather than just the folder name. For example to change to the family folder which has been setup as folder 4 you can use the following href.:

<a href="||b_action||?cmd=list&utoken=||utoken||&fld=4"> Copies</a>

For the three main folders; inbox, copies to self and trashcan you can also use specific commands:

cmd = list
cmd = list_copy
cmd = list_waste

 


Q 36. Problems with WebTV users and checking of users IP address

 

    Clip from href="http://www.developer.webtv.com"www.developer.webtv.com;

"To speed surfing, a WebTV terminal may issue requests through a number of proxies; anywhere from two to a a dozen. This results in a correspondingly large number of  IP addresses for a single WebTV user during a single session for non-secure connections. If a connection is made through SSL, the WebTV user will bypass the proxy and have a static   IP until an HTTP connection is resumed. Since the Web is primarily stateless, multiple  IP numbers are rarely a problem. However, if your site requires users to maintain a static  IP address during their non-secure sessions, please send an email to staticIP@webtv.net .This  address is only valid for Webmasters who need this service."

Alernatively the ini setting ipcheck can be used to control the number of parts of the ip address which will be checked for CWMail / DMailWeb as the set of ip addresses used will normally all have the same first few sections.

eg ipcheck 3   would only require the first three parts to match as in 161.33.4.21 and 161.33.4.22


Q 37 I want to use cmd=show page=xxx but some item variables are missing.

A lot of the template (||) variables in CWMail are only served for particular commands. This speeds up CWMail a lot as it does not have to calculate a lot of values that it does not need to use. If you want to use one of these values in a template you have written yourself, you have to tell CWMail to initialise the correct variables. You can do this using the cmd and show variables. For example: If you want to show the ||show_item|| variable in a template called item_body.tpl (rather than item.tpl), you would use query string like:

domain/cgi-bin/cwmail.cgi?cmd=item&page=item_body&fld=||fld||&item=||item||

Note this will have different results from just cmd=show&page=item_body as it would only have the very general || ariables initialised.

It is important to include in this query string any variables usually needed when calling the item.tpl  so you may need &fld=||fld|| etc :-)


Q 38 Can I login to CWMAIL straight from my home page?

Yes you certainly can. Firstly you should add this line to your ini file

no_tcode true

This lets CWMail accept login pages that it did not generate itself. Then you just have to submit a form like this

<form method="post" action="http//your.domain/cgi-bin/cwmail.cgi">
<input type="hidden" name="user" value="USERNAME">
<input type="hidden" name="pass" value="PASSWORD">
<input type="hidden" name="cmd" value="loginframe">
<input type="hidden" name="loginframe" value="true">
<input type="hidden" name="checknew" value="true">
</form>