Whenever a new user is detected, the CGI will attempt to create a set of default user values. The CGI will pick up the 'default.dat' file from the cgi's workarea and use these variables for the default values. In this default.dat file only one variable is allowed to have '||user||' as part of the value, which will be replaced by the users name. This variable is called 'dflt_reply'.
ie. dflt_reply ||email@example.com
If this file or this setting is not inside the default.dat file then the cgi will default to
There are two other methods for setting up the default reply address for new users. The different methods are explained below.
You can setup WebNews to use the host which the user is connecting to, instead of the domain setting:
to enable this to work you need to add the following setting to the ini file :
(This means that users will have different reply addresses for different pophosts without having to make the change themselves)
The last method uses a host file, which is called 'dftreply.dat' which will need to be created in the templates directory. The layout of this file is similar to that of the NT host file, matching the mail host to the default domain reply to be used.
ie If the 'dftreply.dat' file is:
So if the mail host is 18.104.22.168 or mail.netwinsite.com then the default replay address will be:
If a host is being used which does not match one in the host file, then it will default back to method 1, 2 or 3 depending on the ini settings ('stated_host' and 'domain') and the default.dat file.
NOTE: The last method is only available in version 2.0e or higher.
You can place any value you wish in the default.dat file including your own defined values (ie _xxx). Below is an example of a default.dat file
dflt_reply ||firstname.lastname@example.org v_raw off v_headers off v_font off v_inline on autoadd on _user_setting_variable welcome to Web Based Email
All user files are stored off the workarea. The cgi creates a directory for each user depending on which 'hash_method' the user is using.
For most systems the simple approach of using directories in the form
is best. This provides a spread of user directories and an easy way to find the user.dat for any given user. On some very large unix systems the directory lookups can be slow if there are more than about 800 entries in a directory. For these systems a second more complex hashing method is provided. It is set by putting the following setting in your ini file:
This new method allows any characters in usernames and uses a two level directory structure
rather than just workarea/u_xx/user@domain_name. This provides a very flat distribution and will produce less than 800 directories per directory even on systems with many millions of user accounts.
Note1: Most large systems, even on unix, do not see a problem with the existing hash method which is more transparent.
Note2: You will need to use the managers page to change between the different hashing methods on an existing system.
WebNews version 1.1i and higher now supports the capability to limit selective users to specific news groups. By default WebNews will allow access to every news group that the new server allows. V1.1i of WebNewsnow has a file called 'user.access' that is in your WebNews template directory. You might have to create this file.
For this function to work you need to setup the news server to provide WebNews access to all the groups that you want your users to use. Most news server support IP restrictions, so all you need to do is, allow your news server to allow access from the machine that WebNews is running on.
The next step is determining how to authent users who login. I suggest that you point WebNews to a mail server that your users also use. So that WebNews authenates via this for login's instead of the news server.
ie. force_login true
(optional force login, if you wish to allow temp accounts as well.)
Once the news server has been setup then you should delete WebNews cache directory files so that it refreshes the group correctly.
ie. rm -rf /var/spool/webnews/cache/*
Once the cache is clear then you should login to WebNews so that it refreshes the news groups.
Then you need to setup the 'user.access' file to restrict the access as you wish. Below is an example of the layout and available settings in this file.
# File layout
# Defaults to
# allowed *
# allowed_post *
# user wild_user
# allowed rec.humor*,sci.*
# disallowed rec.humor.d*
# always_allowed rec.humor*,sci.*
# allowed_post *
# disallowed_post *binaries*
# always_disallowed_post *binaries*
# Stated wild groups can not start with *.
# ie. alt.* (valid)
# rec.* (valid)
# rec.*humor* (valid)
# *humor* (invalid)
# default settings
# Any user which uses the username of 'lynden' will be allowed access to all files.
# All temp accounts are only allow to access rec.humor.
# 'John' is allows to see all of 'rec.' and 'sci.' but only allowed to post to 'rec.humor'
The two settings 'always_allowed' and 'always_disallowed_post' are only available in version 1.1r (build 8) and higher.
The settings for each user are stored in user.dat files, one for each user. Each user has a directory which is a subdirectory of the template or work directory. See User Directories for direcotry layout.
This user.dat is a text file which can be edited by the system administrator. The default settings come either from global ini file settings or from the default user.dat file which is called default.dat, see Default User Settings for more details about the default.dat file.
You can also create batch scripts, or programs to modify the contents of the user.dat files, to do things like updating users disk quotas or changing their "Real name" based on the contents of some central user database. Most changes to user.dat files should be done via the Managers Page.
dflt_reply email@example.com This is the replay address which is used when any messages are sent. The default setting for this is firstname.lastname@example.org (or email@example.com if a pop server)
If the mail or pop host is not what you wish to display, then you will need to use the default.dat file to setup this value.
display_groups rec.humor 0 These are the news groups that the user commonly use and has selected to be subscribed to. The number when set to '1' is used to display this group on the group list page at the bottom. connection_type NEWS This is the type of connection type the user used to login. (NEWS, POP, IMAP) v_raw 0 A setting used to determine how to display EMail. This will display the physical information as received by the SMTP server. v_headers 0 A setting used to determine how to display EMail. This will display the header fields of the EMail. v_font 0 This setting, when set, will use variable width font when displaying messages. v_inline 1 This will display attachments within the EMail display itself. v_show_alt off This decides wheither or not the alternative part of an Email address is displayed. _return cmd=item-id,group=rec.humor This variable is used to store the return button. timezone gmt This is the selected timezone that use has selected all articles to display as. sig Regards,\nLynden. This is the signature of the user. _real_name Lynden Sherriff This is the real name of the user. last_login 976519640 This is the time they last logged in allow_cookie true When set to true their is a valid cookie for this user. last_cookie 41217A990750335 This is a random number that is used for the cookie. frames 1 When set to '1' the user is using frames. group#... 384 384 This information is used to determine what articles the user has seen before. email_sent 4 This is the number of Emails the customer has sent. agent Mozilla/4.7 [en] (WinNT; I) This is the last agent to have been used by the user. fetch_last 976519640 This is the time the user last fetched their EMails. last_login 976519640 This is the time they last logged in sort_on Subject: This is what the user is currently sorting on. sort_reverse true When set, the order of the sort is in reverse. sort_method text This shows the kind of sorting that should be done.
(text, date, number, read_unread, draft, new)