Most of the WP code (including all of the database portion) comes from the TNOS 2.30 software by Brian Lantz. I think it's worth trying it out, saves me from having to reinvent the wheel. My contribution is when using the 'SP' command and you are given options to incorporate WP information. As well, each user can set their own preference as to how they want WP information to show up when using the 'SP' command.
Important : You MUST use JNOS 2.0j.1 - a serious bug exists in the original 2.0j release !
JNOS will *harvest* WP information as bulletins and messages pass through the system (smtp), checking mail headers for R: lines and so on. JNOS can also be configured to process incoming 'WP@WW' messages and add their contents to the WP database.
This document reflects what is available in the latest JNOS 2.0j.1 release.
There are several sections to this document :
The database resides under the '/jnos/spool/wp' directory, and consists of the following files :
wpages
links a user call to a bbs call.
wpagebbs
contains the full hierarchical address of a bbs call.
wpages.new, wpagebbs.new, wpages.tmp
new entries waiting to be merged into the above (MAIN) files during processing.
update.wp
tracks updates to our database - used for sending white page updates to other systems.
Every so often it is necessary to process the white page database. Whenever information comes in, it is not immediately transferred into the main files, it should be allowed to sit in a holding area if you want to call it that. The purpose of doing it this way is to minimize the chance of corrupting the main files, and possibly weeding out improper or transient white page data.
Processing is initiated through the wp kick and/or wp timer console commands.
The *.new and *.tmp files disappear after processing is done, but reappear as new data comes in.
Processing also includes deleting expired entries and sorting the main database files.
Refer to the wp age and wp temporaryage console commands to set expiry times.
possible gotcha : The TNOS code actually shutdown existing forwarding sessions and mailboxes before processing was started. I don't do this in JNOS (yet) since it's not really necessary to go to those extremes. Just be warned it may not be a great idea to do processing while WP updates are coming in or if smtp is in the middle of parsing out WP data during a delivery. It has not been a very big concern for me so far, because I know when my forwarding partners schedule their runs. This will be dealt with in a subsequent version. I just want everyone to know about it, that's all.
JNOS can be configured to send white page updates to other systems.
disclaimer : I have not tested this feature 'yet' !
Use the wp destinations console command to specify the systems you want updates sent to.
Then initiate updates using the wp update console command.
The update.wp file disappears after an update run, but will reappear as new data comes in.
Anything in square brackets (ie, [ number of days ]) is optional. If you run any of these commands without the optional argument(s), you will see a current value or some other pertinent piece of information displayed for that command.
For a basic system, all you need to do is add wp client on to your 'autoexec.nos' file. Also add in wp server on if you want JNOS to add incoming wp@ww bulletins to your white page database (in which case make sure you have a rewrite file rule that rewrites 'wp' to 'wp@ww' - probably you already do).
wp age [ number of days ]
number of days after which white page entries expire - default 30 days.
If you do not want your white pages to expire at all, then use the value 0.
wp client [ on | off ]
turn this on to allow WP lookup at the bbs prompt and/or need an active update.wp file.
wp clientcall [ call ]
disclaimer : I have not tested this feature 'yet' !
wp destinations [ call1 call2 ... callN ]
disclaimer : I have not tested this feature 'yet' !
wp kick
force JNOS to immediately process the white page database.
Refer to the section entitled Database Processing for details.
wp timer [ number of minutes ]
interval at which JNOS processes the white page database - default is 0 (never).
Refer to the section entitled Database Processing for details.
wp server [ on | off ]
treat incoming WP bulletins (wp@ww) as updates to the white page database - default is off.
note : wp@ww bulletins are not placed into the 'ww' area if this feature is turned on.
wp support [ on | off ]
turn on or off (completely) the use the white page database - default is on.
wp temporaryage [ number of days ]
number of days an entry has to wait in the wpages.tmp file before
it can be merged into the main files - default 30 days.
disclaimer : I have not tested this feature 'yet' !
wp update [ now | number of minutes ]
interval at which JNOS should do the update runs - default is 0 (never).
or use now to force JNOS to immediately do an update run.
Refer to the section entitled Sending Updates to Other Systems for details.
Looking up a callsign
If you enter the command 'wp aa6hf' and you might get this below :
wp routing 'AA6HF@AA6HF.#SCA.CA.USA.NOAM'
Adding a callsign
disclaimer : this is not working properly 'yet' !
In other words, do NOT use 'wp callsign @bbs' to add a call to the database.
Sending a message
If I enter 'sp kq6up' on my system, I might be prompted like below :
wp routing 'KQ6UP@KQ6UP.#SCA.CA.USA.NOAM' - use ? (Y/n)
Hitting the Enter key (or 'capital Y followed by the Enter key) will set the recipient to the white page address displayed. If you choose instead to hit the letter 'n' followed by the Enter key, then 'kq6up' becomes the recipient (the usual expected behavior). In either case, you are next prompted for 'Subject'.
Set Preference on how SP command interacts with WP database
By default, there is no WP prompt. You have to create a preference before any WP interaction occurs when using the 'SP' command to send a message. I have created a new XW command, so each user can set their own preference.
Use 'XW' (without arguments) to display current setting, for example :
WP options for 'SP' - 1=disable, 2=show/prompt, 3=show/noprompt, 4=force it
option 2 is currently set
To set your option, simply do something like 'xw 2', that's all there is to it
In my case I configured SP to display the WP routing, then prompt whether I want it or not. How you do it yourself is entirely up to you. If you do not even want to use the WP database with the 'SP' command, then just forget about the 'XW' command altogether.
The WP interaction preference for a particular user is stored as a *.wpp file (ie, ve4klm.wpp).
These files are currently located under the '/jnos/spool/mail' directory (to be changed later).
The original TNOS code still has a serious bug.
If you want me to fix it for you, send me an email, and I'll patch your code.
* April 25, 2012 by Maiko Langelaar / VE4KLM