head	1.4;
access;
symbols;
locks; strict;
comment	@# @;


1.4
date	2001.07.04.06.17.04;	author dan;	state Exp;
branches;
next	1.3;

1.3
date	2001.07.02.07.39.17;	author dan;	state Exp;
branches;
next	1.2;

1.2
date	2001.06.28.04.25.51;	author dan;	state Exp;
branches;
next	1.1;

1.1
date	2001.06.24.22.05.51;	author dan;	state Exp;
branches;
next	;


desc
@README
@


1.4
log
@*** empty log message ***
@
text
@README for swhoisd
==================
$Id: README,v 1.3 2001/07/02 07:39:17 dan Exp dan $

See file INSTALL for install instruction.
See file COPYING for license.
See file INTERNATIONALIZATION for message file usage for other languages.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

INTRODUCTION

swhoisd is a daemon that performs a simple query to a text
file with a given pre-defined format and replies to 
whois TCP queries on port 43. 

The current version supports three types of record:
Host, Domain and Person.

The configuration file /etc/swhoisd.conf should be a text
document with the information that is to be provided.

For each host, domain or person, an appropriate record
should be set in swhoisd.conf.

The swhoisd.conf format is as follows:

	# Host Record
	<handle> hr {
		name	<name>
		fqdn	<fqdn>
		os	<os>
		ip	<ip>
		arch	<arch>
		cname	<cname>
		mx	<mx>
		country	<country>
		admin	<handle>
		tech	<handle>
		created	<date>
		updated	<date>
	}

	# Domain Record
	<handle> dr {
		name	<name>
		domain	<domain>
		ns1	<ns1>
		ns1ip	<ns1ip>
		ns2	<ns2>
		ns2ip	<ns2ip>
		ns3	<ns2>
		ns3ip	<ns2ip>
		ns4	<ns2>
		ns4ip	<ns2ip>
		ns5	<ns2>
		ns5ip	<ns2ip>
		ns6	<ns2>
		ns6ip	<ns2ip>
		ns7	<ns2>
		ns7ip	<ns2ip>
		ns8	<ns2>
		ns8ip	<ns2ip>
		ns9	<ns2>
		ns9ip	<ns2ip>
		country	<country>
		contact	<handle>
		admin	<handle>
		tech	<handle>
		created	<date>
		updated	<date>
	}

	# Person Record
	<handle> pr {
		name	<name>
		org	<organization>
		email	<email>
		address	<address>
		country	<country>
		phone	<phone>
		fax	<fax>
		created	<date>
		updated	<date>
	}

	
<handle> is a unique string that identifies the record. 
The second keywork at the start of each record may be
hr, dr or pr, meaning host record, domain record or 
person record.

Each record may have one, few or all of the available 
fields.

The exclamation sign ! before each keyword indicates that
searches are to be done by that field.

	# Example of an host record:

	HOST1 hr {
		!fqdn	host.somewhere.com
		!cname	www.somewhere.com
		mx	10 mail.somehwere.com
		os	SunOS
		arch	sparc
		ip	10.0.0.1
		country	United Kingdom
		tech	PERSON1
	}

	# Example of a domain record:

	DOMAIN1 dr {
		!domain	somewhere.com
		ns1	ns1.somewhere.com
		ns1ip	10.0.0.11
		ns2	ns2.somewhere.com
		ns2ip	10.0.0.12	
		country	United Kingdom
		tech	PERSON1
	}

	# Example of a person record:

	PERSON1 pr {
		!name	My Full Name
		!email		me@@somewhere.com
		address		5, Whois Street,
		address		London, X10 Y20
		country		United Kingdom
		phone		+44-111111111
		fax		+44-222222222
	}

In the above examples, host searches are to be done by
fqdn and cname, domain searches by domain and person
searches by name and email fields.

Thus:

	whois host.somewhere.com

will return the appropriate HOST1 record.

	whois somewhere.com 

will return all three records since
it matches the hostname of HOST1, the domain name of DOMAIN1
and the email address of PERSON1.

	whois Full 

will return the PERSON1 record since it matches its contact
name.

If file /etc/swhoisd.header is present, it is printed at the beginning
of the message.  If file /etc/swhoisd.footer is present, it is printed
at the end of the message.


STARTING SWHOISD

Add a line similar to one of the lines below to /etc/inetd.conf,
depending on where the file is installed:

        whois   stream  tcp nowait root /usr/sbin/in.swhoisd       in.swhoisd
        whois   stream  tcp nowait root /usr/local/sbin/in.swhoisd in.swhoisd

Or, for xinetd.conf:

	service whois
	{
		socket_type	= stream
		wait		= no
		user		= nobody
		server		= /usr/sbin/in.swhoisd
		disable		= no
	#	log_type	= FILE /var/log/swhoisd.log
	}
	
Force inetd (or xinetd) to re-read it's configuration files with
kill -HUP or restart [x]inetd.

Make sure you edited file /etc/swhoisd.conf (see above for instructions)

And it's done.

The best way to figure it out is to give it a try.

See rfc1834.txt for information on whois servers.

swhoisd is based on source originally developed by
Joao Cabral <jcnc@@dhis.org> and modified by Dan Anderson <dan@@drydog.com>.
@


1.3
log
@readme
@
text
@d1 3
a3 3
README for swhoisd 2.0
======================
$Id: README,v 1.2 2001/06/28 04:25:51 dan Exp dan $
d8 6
@


1.2
log
@misc.
@
text
@d3 1
a3 1
$Id$
d6 2
a7 1
See file COPYRIGHT for license.
d153 3
a155 1
The best way to figure is to give it a try.
a156 1
See rfc1834.txt for information on whois servers.
d158 1
a158 3
swhoisd is based on source originally developed by
	Joao Cabral <jcnc@@dhis.org> and modified by
	Dan Anderson <dan@@drydog.com>.
d160 2
d163 2
a164 1
Swhoisd Internationalization and Localization
d166 1
a166 6
Swhoisd  has  been  internationalized.  That  means,  with  the proper
localized  message  text  file,  swhoisd  can display messages in your
local  language  ("localized").  To  localize, copy and translate text
file  swhoisd.po  with  your favorite editor (save file swhoisd.po
without   the  .txt  extension).  Here's  one  possible example for a
German swhoisd.po file:
d168 12
a179 2
msgid "Email address:         "
msgstr "E-Mail Adresse:        "
d181 1
a181 4
Copy the translated swhoisd.po file to your locale directory,
depending on the value of your $LANG environment variable:
	* Directory /usr/share/locale/LC_MESSAGES/$LANG/ for RedHat Linux
	* Directory /usr/lib/locale/LC_MESSAGES/$LANG/ for Solaris
d183 1
a183 2
(For example, for German, LANG=de, copy swhoisd.po  to
/usr/share/locale/LC_MESSAGES/de/swhoisd.po
d185 1
a185 1
File swhoisd.po is provided with the binary swhoisd package.
d187 1
a187 3
If you do translate swhoisd.po to another language, please
email  a  copy to me at dan@@drydog.com (or use my comment form
at https://dan.drydog.com/comment.html)
d189 2
a190 3
Feel free to email me at <dan@@drydog.com> with any questions
or suggestions (or use my comment form at
	https://dan.drydog.com/comment.html)
@


1.1
log
@Initial revision
@
text
@d3 1
a3 1
	$Header$
d5 2
a6 2
	See file INSTALL for install instruction.
	See file COPYRIGHT for license.
d8 3
a10 3
	swhoisd is a daemon that performs a simple query to a text
	file with a given pre-defined format and replies to 
	whois TCP queries on port 43. 
d12 2
a13 2
	The current version supports three types of record:
	Host, Domain and Person.
d15 2
a16 2
	The configuration file /etc/swhoisd.conf should be a text
	document with the information that is to be provided.
d18 2
a19 2
	For each host, domain or person, an appropriate record
	should be set in swhoisd.conf.
d21 1
a21 1
	The swhoisd.conf format is as follows:
d83 4
a86 4
	<handle> is a unique string that identifies the record. 
	The second keywork at the start of each record may be
	hr, dr or pr, meaning host record, domain record or 
	person record.
d88 2
a89 2
	Each record may have one, few or all of the available 
	fields.
d91 2
a92 2
	The exclamation sign ! before each keyword indicates that
	searches are to be done by that field.
d94 1
a94 1
	Example of an host record:
d107 1
a107 1
	Example of a domain record:
d119 1
a119 1
	Example of a person record:
d131 3
a133 3
	In the above examples, host searches are to be done by
	fqdn and cname, domain searches by domain and person
	searches by name and email fields.
d135 1
a135 1
	Thus:
d139 1
a139 1
	will return the appropriate HOST1 record.
d143 3
a145 3
	will return all three records since
	it matches the hostname of HOST1, the domain name of DOMAIN1
	and the email address of PERSON1.
d149 2
a150 2
	will return the PERSON1 record since it matches its contact
	name.
d152 1
a152 1
	The best way to figure is to give it a try.
d154 1
a154 1
	See rfc1834.txt for information on whois servers.
d156 3
a158 3
	swhoisd is based on source originally developed by
		Joao Cabral <jcnc@@dhis.org> and modified by
		Dan Anderson <dan@@drydog.com>.
d160 30
a189 2
	Feel free to email me at <dan@@drydog.com> with any questions
	or suggestions.
@
