Installation and Setup

Thank you for choosing WebNews as your Web Based News Client. WebNews requires you to have News Server and a Web Server. For any support questions or issues please EMail:

support-webnews@netwinsite.com

Contents

Note: The Installation instructions are intended to help create an absolute basic install of WebMail. For a more standard installation use the WMSetup program included in the distribution


Templates

The distrubution set contains one template set. These are all in the directory 'tpl'

ie.    webmail/tpl/


NT Installation

Either:

Run the program Install.exe

Or:

To install WebNews you must copy the webnews.exe and webnews.ini files to your CGI directory on your WEB server.

On your WEB server you should have already setup on your server as containing CGI programs, you should read your server documentation if you don't currently know how to setup a cgi program, typically you would copy the files to a directory like:

"\FrontPage Webs\Content\cgi-bin"
or c:\inetpub\scripts
or \SERVER_ROOT\cgi-bin

Note: The CGI directory should only have execute rights only. The CGI directory should not have read rights.

The next step is to setup a templates directory anywhere on your system.

eg.    c:\webnews

Into this directory copy all the files from the 'tpl\' directory from the distribution set. These files have the Extension '.tpl'. There are also some other data files that have the extension '.dat'.

Next are the images to be copied. Currently the default templates presume that the images are in a relative directory '/nwimg/news' on the web server.

ie. Physical directory:            
    c:\inetpub\wwwroot\nwimg\news
     \SERVER_ROOT\html\nwimg\news

Example:

download the self extracting archive from netwinsite
webmail11h.exe # Unzip the self extracting archive to wntemp
cd \wntemp # Change to temporary unpack directory
mkdir \webnews # Create a directory for templates
mkdir \inetpub\wwwroot\nwimg # Create a directory for image files
mkdir \inetpub\wwwroot\nwimg\news # Create a directory for image files
copy webnews.exe "\inetpub\scripts" # Copy CGI
copy webnews.ini "\inetpub\scripts" # Copy ini
copy tpl\* \webnews # Copy docs templates etc to destination
copy img\* \inetpub\wwwroot\nwimg\news # Copy image files
del \wntemp # Clean out temporary directory

Note: webnews.ini file must be in the cgi-bin directory with webnews.exe

Click here more details about the Basic Setup


Unix Installation

Once you have downloaded the distribution set you have to uncompress and untar it.

uncompress webmail11h.tar.Z # Uncompress tar file
tar -xvf webmail11h.tar # Extract distribution files to WebNews
# sub-directory
cd WebNews # Change to temporary WebNews sub-directory

Either:

run the Install program:
./install

Or:

To install WebNews you must copy the webnews.cgi and webnews.ini files to your CGI directory on your WEB server.

On your WEB server you should have already setup a directory to contain CGI programs, you should read your server documentation if you don't know how to setup a cgi-bin directory, typically you would copy the files to a directory like:

        /home/httpd/cgi-bin
    or /usr/www/cgi-bin
        etc.

Note: The CGI directory should only have execute rights only. The CGI directory should not have read rights.

The next step is to setup a templates directory anywhere on your system.

eg.    /var/spool/webnews

Into this directory you should copy all the files from the directory 'tpl/' from the distribution. These files have the Extension '.tpl'. There are also some other data files that have the extension '.dat'.

Next are the images to be copied. Currently the default templates presume that the images are in a relative directory '/nwimg/news' on the web server.

ie. Physical directory:            
     /home/httpd/html/nwimg/news
     /usr/www/public_html/nwimg/news

The next step is to ensure that WebNews will run with the correct ownership. When you setup the CGI directory on your system you should have setup a ownership setting that web browser will run CGI's under.

eg.    nobody

The CGI, ini and the template directory (and template files) that you created MUST all be the same ownership, and set to something like 'nobody'

Note: On Apache, the correct owner to use the specifyed as the anynymous login user in your httpd.conf file

Example:

After uncompressing and un-tarring the archive.
cd \webnews # Change to temporary unpack directory
mkdir /var/spool/webnews # Create a directory for templates
mkdir /home/httpd/html/nwimg # Create a directory for image files
mkdir /home/httpd/html/nwimg/news # Create a directory for image files
copy webnews.cgi /home/httpd/cgi-bin/ # Copy CGI
copy webnews.ini /home/httpd/cgi-bin/ # Copy ini
copy tpl\* /var/spool/webnews # Copy docs templates etc to destination
copy img\* /home/httpd/html/nwimg/news # Copy image files
chown nobody /home/httpd/cgi-bin/webmail* # Change Ownership of
chown nobody /var/spool/webnews # WebNews and template
chown nobody /var/spool/webmail/* # files.

Note: the webnews.ini file must be in the CGI directory with the webnews.exe file

Click here for more details about the Basic Setup


Basic Setup

The webnews.ini file is used to inform the CGI of how it should work. This file needs to be updated with your system details. Any standard text editor can be used.

eg.    notepad "\inetpub\scripts\webnews.ini"

There are 5 main ini settings that need to be defined in your ini file, these are shown below:

Symbol Example Explanation
newshost news.your.domain The name or IP number of your NEWS server.
     
templates \var\spool\webnews The directory where you have copied the *.tpl files.
cache_dir \var\spool\webnews\cache The directory where WebNews will place all the cache groups and new articles.
     
domain acme.com Your domain, this will be used to construct addresses with.
nwimg /nwimg/news The web server relative address of the images.

Now try referencing WebNews from any web browser using a URL similar to:

http://your.web.server/scripts/webnews.exe

You should also try the following URL test page to assist in locating any problems:

http://your.web.server/scripts/webnews.exe?cmd=test


Authentication Methods

There are many ways in which WebNews can be setup to allow user's access. The current options in version 1.0a are:

User provided POP and/or IMAP server.
This allows the users to provide the address of an IMAP or POP server which the username and password will be  validated against. Setting authent_pop to true enables this form of authentication to work for POP servers. Setting authent_imap to true similarly allows authentication against an imap server.

Administration selected POP/IMAP server.
This is where the administration selects a POP or IMAP server which the username and password will be validated  against. Both the address and port can be specified using the authent_host and authent_port settings. To enable this you also have to setup host_authent to 'true'.

News server login.
This is where the administration selects a NEWS server which the username and password will be validated against. Setting authent_news to true enables this form of authentication. The address and port to use for this form of authentication are provided by the settings 'newshost' and 'port'.

Local WebNews accounts.
There are three ways in which local accounts may be setup:

  1. WebNews automatically creates a temporary account for each user when they login. Since the usernames for WebNews temporary accounts are randomly created by the cgi, this must be used with cookie login. (ie force_login false, authent_cookie true)
  2. WebNews automatically creates local accounts with the provided username and password from the login page. (authent_local_create true)
  3. WebNews accounts are created by the administration for the users, and so they have to be setup before use. The administation uses the manager's page to create these local accounts. (authent_local_create false)

Method 1 can be used in conjunction with 2 and 3 using the settings 'authent_local', 'authent_local_create', 'authent_cookie' and 'force_login'. See the table of ini file settings for a description of each of these.

It is possible to select any, some or all of the above for one site. There is also an ini setting that is concerned with how you can login. This is as follows:

force_login true/false
When set to true this forces the login screen to be displayed, and the users must login before they are allowed the use WebNews.
If set to false, the user does not need to login at all and a temporary account is created for them until they login. (authent_cookie and authent_local must be also switched on).
The exception to the above is if cookies are allowed and are setup for that user. If that is the case, WebNews will try to log you in via the cookie, otherwise it will default to the above.

Example:

Site A - Wishes to allow user provided POP server authentication with Local WebNews accounts, also allowing cookies.
Site B - Wishes to allow Local WebNews accounts, with cookies enabled, where anyone can use WebNews.  .i.e,  a random account is created for a temporary login.
Site C - Wishes to force login via their POP server only.
Site D - Wishes to allow all of the above methods.

Site A ini file:
force_login true
authent_pop true
authent_local true
cookie_valid_days 31
Site B ini file:
authent_local true
authent_cookie true
cookie_valid_days 31
Site C ini file:
force_login true
host_authent true
authent_host 1.2.3.4
authent_port 110
Site D ini file:
host_authent true
authent_host 1.2.3.4
authent_port 110
authent_pop true
authent_imap true
authent_news true
authent_local true
authent_local_create true
authent_cookie true
cookie_valid_days 31

Advanced Authentication Methods

With the version 1.1i and later WebNews now supports extended authenation. Their are now 3 extensions available on the standard authetication methods. These are:

Multiple News Server Login.
This allows a 'news server login' account to have 1 or more sessions open at the same time. Allowing a group of users to login under the same username/password but on seperate machines, or over serveral terminals. To enable this all you need to add is the following to your ini file:

                allow_multiple_news_login true

Note: When using this ini setting the user settings will not be saved between sessions.

Seperate News Server Group Caches.
This allows each 'news server login' account to have their own seperate groups cache allowing each to have their own individual groups. This does increase the amount of disk space needed. As each news server account will have it's own group cache. To enable this all you need to add is the following to your ini file:

                user_group_cache true

When using this setting you cannot use the ini settings:

               admin_news_user user
               admin_news_pass pass

So you should remove or commit the above ini settings from your ini file.

Non-News Server Accounts Login via stated News Server Account.
This allows each account type to be authenticated via the news server using a specific news server account. Currently in WebNews their are 6 different accounts types they are:

temp - This is a temp cookie account
pop - The user has logged in via their own pop server
imap - The user has logged in via their own imap server
local - The user has logged in via a Local WebNews account
host - The user has logged in via their admin mail server.
         (ie the 'authent_host' ini setting)
news - The user has logged in via the news server.

This setting sets up the first 5 accounts to autologin via a selected news server account, and uses that account group restrictions and the like. To enable this all you need to add is the following to your ini file:

                news_server_login type username password

Where 'type' is one of the first 5 account types in the table above.

WebNews User Access
Version 1.1h now supports the capability to restrict available news groups depending on the user. All the user access limits are setup in the file called:

user.access

This is expected to be in the workarea of WebNews. An below example file should help in creating the access restrictions you might want.

# File layout
# Lines starting with '#' are comments
# Defaults to
#    allowed *
#    allowed_post *
#
# user wild_user
#    allowed rec.humor*,sci.*
#    disallowed rec.humor.d*
#    allowed_post *
#    disallow_post
#
# NOTE:
# Stated wild groups can not start with *.
#    ie.    alt.*         (valid)
#        rec.*         (valid)
#        rec.*humor*    (valid)
#        *humor*         (invalid)
#

# Default settings
allowed rec.*
disallowed_post rec.*

# Setup admin to have access to every available group.
user lynden@1.2.3.4
    allowed *
    allowed_post *

# Setup all news server accouts access
user *@1.2.3.4
    allowed rec.*,sci.*
    allowed_post *

# Setup all temp cookie accouts
user *@temp
    allowed rec.humor
    allowed_post

Default Settings

The ini file that is also provided as part of the distribution of 1.1i+ has the following settings setup:

Symbol Example Explanation
body_sig_spaces 1 This will insert 1 space between the body of the message and the users signature.
href_target target="_blank" This will make all href's inside an EMail open new browser windows.
always_attach true When viewing an EMail, this setting forces the attachments to remain on display, whether inline images is running or not.
re_fwd_ignore true This will makes sure that when doing sorting of subject that the 're:' and 'fwd:' are ignored.
limit_reference 1000 This will limit the size of the reference field of news articles. Most news servers to this internally, but not all news server do.

INI Settings

The following is the list of available ini settings that may be setup in your ini file. This ini file should be located in the same directory as the cgi.

ie.    /home/httpd/cgi-bin

General configuration settings are stored in webnews.ini which must be in the same directory and have the same root name as the executable. So if the cgi is renamed xnews.cgi then the configuration file will be xnews.ini

Label

Example

Default

Explanation

admin_news_pass
admin_news_user
password
username
none
none
These two settings are use to generate the list of valid groups that the users can see and are restricted by the 'user.access' file.
NOTE: Not to be used with 'user_group_cache true'
admin_user lynden@1.2.3.4,ralph@* none Which is a comma seperated wild card user list that if the user matches are allow to delete any news article.
allow_$ var1,var2 none A comma seperated variable that allows other ini settings to allow $(...) variable replacement.
allow_form true false This will allow Forms to be ignored when viewing an HTML attachment.
allow_java true false This will allow Javaapplets to be ignored when viewing an HTML attachment.
allow_multiple_news_login true false This ini setting allows more than 1 user to login via one news server account at the same time. They have will be setup with seperate cookie account, so that they can change settings but will not change the orginal account.
allow_read true false When set to true this will store which aticles have been read by the user.
SUGGESTED NOT to use on large system. generates a file called: read.dat
in each users directory.
layout: group.name start_article end_article
allow_script true false This will allow Scripts to be ignored when viewing an HTML attachment.
allow_style true false This will allow <style> tags to be ignored when viewing an HTML attachment.
always_attach true false This will force WebNews to always display the 'attachment' list in the item.tpl. Otherwise the list will only apear when inline images are turned off.
attach_target target="_blank" none Which allows you to set up a target for all attachments.
authent_cookie true false This will allow autologin via cookies.
auto_delete lynden* 0
*@temp 1
* 30
none This setting is used to determine when accounts will be automatically used if not logged in for x number of days. You are allowed multiple settings. When set to 0 days then this account will never be removed.
auto_subscribe_display true false When set to true this will default any subscribed groups to be displayed on the group list page.
authent_host your.server none This is the name or number of the host to be authenticated with. It can be an IMAP or a POP server.
authent_imap true false This allows users to state the IMAP server that they wish to authenticate with.
authent_local true false This allows local users to be created.
authent_local_create false true This decides whether accounts will be automatically created as the CGI requires, or if the administration have to create the account before it may be used.
authent_news true false This allows authentication with the particular news server.
authent_pop true false This allows users to state the POP server to be authenticated with.
authent_port 143 110 The port that the authent_host is connected to.
auto_article_reload 30 10 The number of minutes which are required to pass before the article list will be automatically reloaded.
auto_group_reload 300 180 The number of minutes which are required to pass before the group list will be automatically reloaded.
auto_logout_mins 200 60 Time since last activity for logged in user before cache of new mail messages is purged
bind_sockets 1.2.3.4 none This will force all outgoing sockets to bind to a selected IP number. Only used if the machine has mutiple IP's and you want to make sure that the CGI when talking to the Mail server, talks on a specific IP address.
body_add http://xxx.yyy.zzz blank Adds the line given to the body of all outgoing EMail messages. You can have multiple body_add lines to produce a multi-line addition. To add blank lines use a body_add line with trailing spaces.
body_sig_spaces 1 0 This setting is for the number of lines  between the body of the EMail and the users signature.
bypass_email_decode true false This will stop EMail address being converted that are located inside an EMail message when set to true.
cache_dir d:\dnewsweb\cache templates This is where the news groups and articles are cached to.
cache_group_min_size 5000 2000 This is the lower boundary where the cached groups will be forced to when a cache check is performed.
cache_group_size 100000 10000 This is the upper boundary of where the cached groups are allowed to be. Once this level is reached, a cache clearing will be performed in order to force the cache to the lower limit.
cache_msg_check 360 180 This is the amount of time which will pass before WebNews automatically reloads articles, in seconds.
cache_msg_min_size 3000 1000 This is the lower boundary where the cached articles will be forced to when a cache check is performed.
cache_msg_size 10000 3000 This is the upper boundary of where the cached articles are allowed to be. Once this level is reached, a cache clearing will be performed in order to force the cache to the lower limit.
cgi_path /home/httpd/cgi-bin env var Sets the cgi_path. This is only needed if the Web Server does not set the appropriate environment variable for cgi's
cookie_valid_days 2 31 This is how long the cookies are valid for.
copy_name Copies_to_Self Sent This is the name of the folder to store copies to self items in
date_format dmy mdy Sets the date format to month first or day first
date_layout mm-dd mm/dd/y This will change the layout of the date displayed in the list of EMails.
days_before_old -5 -12 This is used to change the color of old articles so that newer articles stand out more.
debug true false Enables verbose debug output.
debug_socket socket.log none This logs the data that is being sent and received via IMAP/POP/SMTP/POPPASSD servers.
default_frames false true This setting determines whether frames should be used when a cookie login is done.
dflt_xover_download 2000 1000 This is the maximum number of xovers that will be downloaded at any one time. The rest of the xovers will be download seperately.
dictionary spanish.dat words.dat This is used to default what words.dat file to use for the spell checker.
domain acme.com this host Used to create the EMail 'from address' for each user.
enable_user_encode true false When set to true it user profile directories that have '/\:*?"<>|!' will be encoded.
enable_wml true false This enables wml features for WebMail. The changes that occur are:
Content-Type for pages sent back to the web server is:
          text/vnd.wap.wml
(Other features with WML will appear in later versions.)
environ_pass AUTH_PASSWORD or HTTP_AUTHORIZATION none This setting and 'environ_user' are used to autologin users using username and password that is supplied in the environment variables setup by the webserver.
environ_user REMOTE_USER none This setting and 'environ_pass' are used to autologin users using username and password that is supplied in the environment variables setup by the webserver.
force_login true false This determines whether the user MUST first login in order to use WebNews.
groups_allowed *humor*,rec* * This determines which news groups are allowed to be accessed.
groups_notallowed alt*,*binaries* none This determines which news groups are not allowed to be accessed.
hash_method 2 1 This determines which user profile hashing method is used, 1 or 2. Note! Do not change this on existing systems as user files will not be found after change. You will need to use the manager page to change this.
host_authent true false This allows authentication via a fixed POP or IMAP server.
href_target target="_blank" none Any <a href="...."> inside of an Email will have this also added as part of the link.
ie.  <a target="_blank" href=".....">
html_limit 2000 none This is used to limit the number of characters that may be displayed in an EMail message.
imapport 1143 143 IMAP port to connect on.
imaphost pop.your.domain this host The name or number of your IMAP mail server.
key 2222-333-44-222 1 month key Used to enter Registration key.
lang_file lang.dat none This is used to translate the error messages into different languages.
limit_reference 1000 none Which is used to limit the size of the reference field of new articles when sending a new message. Most news server do this internally but some don't.
log_path /logs/webnews ini dir Directory to store the log file in.
log_size 1000000 100000 This is the size of the logfile before it is rotated.
lowercase_password true false Password is always lowercase, so secret is the same as Secret and SECRET.
lowercase_username true false Username is always lowercase, so user ralph is the same as Ralph and RALPH.
managers_ip 1.2.*,2.3.4.5 none This restrict access to the managers page to valid IP addresses.
managers_password mysecretpassword or |filename none Password for access to manager.tpl manager page. You can state a file where the managers password is stored.
max_email_rcpt 10 30 The maximum number of people that a message can be sent to in one go.
max_email_sends 10 20 The maximum number of messages that can be sent in one day.
min_article_reload 300 60 The  minimum number of seconds allowed between article reloads.
min_group_reload 3000 600 The minimum number of seconds allowed between group reloads.
netwin_autologin <url> <product directory> <extra> none Used to setup netwin's products so that they automatically login.
newgroups_yyyymmdd true false When set to true will force the news server to change the date layout to yyyymmdd instead of yymmdd when asking for newgroups.
news_server_login local foo bar none This will setup the news account that the user will be talking to the news server on depending on the type of account.
layout:    news_server_login type username password
Types
temp
: This is a temp cookie account
pop: The user has logged in via their own pop server.
imap: The user has logged in via their own imap server.
local: The user has logged in via a Local WebNews account.
host: The user has logged in via their admin mail server.
   (ie the 'authent_host' ini setting)
newshost your.news.server this host The name or number of your NEWS server
no_cookies true false When set to true this will disable ALL cookies.
no_email_hr true false When set to true the '<hr>' are not display when viewing Emails.
no_log true false Disable file logging.
no_login true false When set, it is not necessary to login in order to get access to WebNews.
no_newgroups true false When set to true the nntp command 'NEWGROUPS' is not used at all. Some new servers do not have this command setup for Y2K compliance.
no_tcode true false Disable tcode checking.
port 1119 119 POP port to connect on
pophost pop.your.domain this host The name or number of your POP mail server
re_fwd_ignore true false Which will make the new sort routines to ignore any 're:' and 'fwd:' at the beginning of the subject.
read_wrap 64 85 Automatically wraps displayed email message's lines to X characters wide.
reply_prefix # > This is the character(s) that is attached to the body of any reply to a message.
send_wrap 85 60 Automatically wraps email message's lines to X characters wide, before sending them.
smtpport 1025 25 The SMTP port to connect on
smtphost mail.your.domain this host The name or IP number of your SMTP mail gateway
sort_by_page true false When set to true when it does a thread sort by the page and not the entire list of threads.
spell_seperators -[]() (none) This is just a list of characters the spell check will not use as part of a word.
templates /var/spool/webnews NONE The directory where you have copied the *.tpl files
time_24hr_format true false Determines whether or not to display time using a 24hr clock.
time_layout Hr:MM pm HH:MM:SS This will change the layout of the time displayed in the list of EMails.
time_offset nzst (none) This is used when the CGI does not correctly determines the CGI's GMT. Set this to the timezone that the computer is on. This also shows up on the 'cmd=test' page.
timezone nzst GST offset This ini setting is used to default new users to a timezone. The users timezone setting is used to display times in the selected time zone no matter where the Email message was sent. All displayed times are converted to the user timezone setting. (Normally setup on the user options page to change).
user_group_cache true false When set to true the groups list is dupulcated for login users in their user profile directory. This is also refreshed every login and cleared on logout.
NOTE: Can not be used with: 'admin_news_pass user'
'admin_news_user pass'
user_parameter _usr_* _* This determines the prefix to be used on all user settings. These are passed to every template.
valid_host my.pop.host none limits the number of IMAP/POP hosts that users can connect to
valid_to lynden*,*.nz none limits the number of email addresses that users can send email to
valid_user lynden,*ralph none limits the usernames which may be used to a wildcard list
vagent Nokia none Starts a section of ini settings which apply to a specific user agent. This is normally used for setting up WML settings depending on the phone, but can also be used for netscape and ie settings.
Note: vagent sections must follow any general settings.
vagent_match HTTP_HOST USR_AGENT The environment variable which is matched against vagent lines.
vend     Ends a section of ini setting which applies to a particular virtual host
vhost my.domain.two none Starts a section of ini settings which applies to a virtual host my.domain.two
Note: vhost sections must follow any general settings.
vhost_match HTTP_HOST SERVER_NAME The environment variable which is matched against vhost lines.
webserver_out web_sent.log none This logs the data that is being sent back to the webserver.
workarea /var/spool/webnews templates The directory which  WebNews work files and user subdirectories are created in.
x_mailer   WebMail.... Used to build the X-Mailer: header that is attached to all outgoing EMails from WebMail. To remove the X-Mailer header just leave the setting blank. This will only work on the full version of WebMail.

Date/Time Layouts

The date and time fields in the list.tpl and item.tpl can be changed by setting up two ini settings:

       date_layout
and  time_layout

These ini settings are string decoded. The parameters listed below for each ini setting are replaced with the information shown.

Time Layout parameters:

H = hour (1,2,3,...23, 24) [24 hours]
HH = hour (01,02,03...23, 24) [24 hours]

hr = hour (1,2,3...12, 1, 02)
HR = hour (01,02,03...12, 01)

M = Minutes (1,2,3...)
MM = Minutes (01,02,03...)
                           
S = seconds (1,2,3...)
SS = seconds (01,02,03...)

pm = am/pm (am or pm)

Date Layout parameters:

d = day (1,2,3,4..)
dd = day (01,02,03,04...)

m = month (1,2,3...)
mm = month (01,02,03...)
mon = Jan, Feb
month = January, February

y = year (99,2000,2001)
yy = year (99,00,01)
yyyy = year (1999,2000,2001)

wkd = Mon, Tue....
weekday = Monday, Tuesday...

TIMEZONE = time zone string, ie nzst, +1200....

Examples:

If an EMail message date - time was 01:04:2001 - 14:20:23 and the settings were:

time_layout Hr:MM pm
date_layout m month, yyyy

or   

time_layout HH:MM
date_layout m/d/yy

Then the values will be:

Time = 2:20 pm,    Date = 1 April, 2001

or

Time = 14:20,    Date = 4/1/01