Kind of an installation manual...

copy/untar/unshar all the stuff in /usr/lib/fnet or any directory
you would like to use as lib dir.

If you haven't got any publicdomain dial package, I would recommend
getting one, I have never seen working version of SVR* dial package.
I tried using HDB, but its configuration happens same way the
login handshake in Systems (expect-send-expect), which doesn't give
much chance for regognizing different kind of responses etc, I would
like to continue redialing continuously if system is busy and so on.
I have been using dial package from Gene H. Olson, ihnp4!quest!gene,
thanks for his nice work! I picked it up from local pay-unix-bbs
(City Lines Oy/mcvax!clinet, Teemu works there), so it may be
a bit old version.


config.h
--------

Edit config.h. It should (but maybe not) include all necessary
information.

Note: Use full pathnames, with no trailing slash!

#define USG
leave it there, unless you are on BSD, in which case you have
lots of work to do, as both Teemu and me have to work on SYSV.* (which
I don't like at all, an operating system which cannot change file size
to nothing else than 0? and more...:-).

#define MY_ZONE 2
#define MY_REGION 22
#define MY_NET 504
#define MY_NODE 7
#define MY_POINT 0
This specifies your fidonet address.

If you don't know what should be here, you should contact with nearest
Fidonet system and try to find out from sysop (fidonet)address of
nearest fidonet network/region coordinator, who will assing you a node
number, and ask him about how to arrange routing. He probably gives
you list of sysops to whom you should contact and ask if you can
poll echomails from, or tells you who to poll. It might be good
idea if you get FSC*.TXT documents and bunch of fidonews which would
give you better idea what fidonet is. (Ok, I guess you know it already
if you have come this far :-).

And, the most important, you can contact IFNA, International FidoNet
Association, if you need more info. I recommend you to become a member
if you have interest in this hobby.

#define PREWAIT 2
This is time to be waited between connect and sending TSYNCH, ie start
of fidonet handshake. Originally it was 5 but some binkleyterm users
squeeze time too short and this causes problems, so I have it as 2.

#define WAITCLEAR 4
After sending cr+sps to line, protocol waits for line to be cleared. This
time often depends on the modems, as some modems wait for error correction
timeout for long time.

#define MAXBAUD 1200
This is used in creating packets and in dial, where dial baud/speed is
set to either it or to speed of the system we are dialing at.

#define MINBAUD 300
If speed of systems to be called is less than this, this will be
used instead. I haven't used this, It's for people with constant-speed
modems.

#define MAX_LINELEN 72
This tells the program how wide it should format the messages. Fidonet
has hairy message format, which varies a lot, as people use lots of
different 'soft' carriage returns for message formatting. Its nice for
some environments (like commode-64 :-), though.

#define RECEIVE_PATH "emma"
This will be added in the beginning of news messages, to make news
not to echo it back. This is same system name you must add to
NEWSLIB/sys file, I have the following in /usr/lib/news/sys
emma:fidonet,to.emma::/usr/lib/fnet/rfnews

#define DOMAIN ".UUCP"
.UUCP if not there. I haven't checked this out, but I guess its ok.

#define SPOOL "/usr/spool/fnet"
Prepacked messages, send- and receive-bundles go here.

#define LIBDIR "/usr/lib/fnet"
This is where you have all the source and binaries. This should be
changed so that sources would be somewhere else.

#define RNEWS "/usr/bin/rnews"
This is rnews from news package. If you can't find it, you either
aren't running news, or you are running some other news-handling
program.  This program should be capable of getting a message in
normal mail format, there is Newsgroups: line and so on, which would
tell it to which newsgroup it belongs, and then put the message where
it should be put.  It also forwards the message to other systems if
they are redistributed, in which case it should check out the path so
it won't send it back to fidonet, as that would produce a loop, which
wouln't be funny for the sysop running the fido system :-) Remeber
that messages sent back to fidonet aren't probably any more so much
like originals that confmail etc would regognize them as duplicates!

#define LOGFILE "/usr/lib/fnet/log"
Log file in which all kinds of messages are appended. You should check
it out sometimes and clean it up, it grows for ever.

#define IDSEQUENCE "/usr/lib/fnet/idseq"
This is a file which includes seqence number for creating unique message
id.

#define USERUID 50
I haven't checked out what this does?

#define ALIAS "/usr/lib/fnet/Alias
See comments in the file itself (should be in the distribution).

#define RMAIL "/bin/rmail"
This is probably ok for you system, it should be mail sender, just don't
set it to mailer which can loop back to rfmail :-)
If you dont want to be a gateway, just make it local-mailer.

/* #define HAVE_SYSEXITS
Define this if you have <sysexits.h>

#define INT16 short
This isn't used in all places where 16-bit int is wanted, so be
careful with this! Due to alignment problems I run into, I
removed structure writes and reads.

#define SWAB_BYTES
Define this on MC68* and so on which have most significant byte at
lowest memory address (a mess dos has least significant byte there).
Remeber that if that one filler-long in header structure will be
used some day, there is no swapper for that yet! (I hope I remember
it too).

#define RETURN_FAILED_MAIL
Define this if you want rfmail to return underlivered mail. You do
not need this if you are running sendmail or similiar which returns
undelivered mail.

Shortnames.
This is for those idiot SV machines which don't accept more than 8
chars per name. You also need gnu cpp if your cpp doesn't have more
than 8 chars either. I have got a miniframe, so I need this.  Note,
there might be more of those problem-causers crept in during time I
have been developing this on 386 microport machine now.

#define DIALTABLE "358-0-", "",  "358-", "9",  "", "990"

This is for dialing, I did just a quick hack but it probably
works on most cases, originally it wanted phone number as a parameter,
now it picks up it from nodelist, so I needed some kind of
table here.
Trick is to compare string to the beginning of the phone number,
and if it matches, replace it with string following. Last one,
in which empty string would be checked for, must be there.


Makefile
--------
ENA should be something which allows you to change ownerships to something
else. I found it easier to make this work running under ena shell (I know,
I'm trying to commit a suicide :-),

SHELL should be /bin/sh, ksh might work also if you have it. In fact, in
this Microport version of 386 I have there is a bug in /bin/sh which
causes problems when using it.

CFLAGS
------
-DLOCK_LOCKF means that this machine has lock function called lockf,
otherwise it calls it locking (like in miniframe CTIX). If you don't
have either, you are in trouble.

OWNER
GROUP
Uucp and daemon or uucp and mail are good candidates?

Check out chmod's in Makefile, I have been probably too open with them.
(Single user 386 with no external logins :-)

I don't use SCCS either, but maybe I start using it, I just have had
so many things to think about so reading the manual is still waiting.


Files and rest of work
----------------------

chown all files for same groups you specified in Makefile, make the
spool directory and other directories under it and chown them too.

Edit the Areas, Aliases files following the instructions in them.
You need to generate newsgroups for echomails using inews -C.
I have names groups as fidonet.something.

install it to crontab/etc so that it calls to fidonet host you
should be polling at. It should do

fpack -f your_boss_fidonet_address
fcall -l /dev/ttysomething -m -d -f your_boss_fidonet_address
funpack

and put output to log (note: Log will be enormous if you don't
cut debug values in distributed config.h, this alpha-version
will have debugs on ready for you to debug, as it probably won't
run as is anyway :-).

Get new nodelist. Best place to hunt for it is nearest fidonet system.
Convert it to unix format before using it (just lfs, no cr+lf, no ^Z).

Modifying rn common.h (line 559 in version 4.3 I have) from

#    define NEWSHEADER "Newsgroups: %(%F=^$?%C:%F)\nSubject: %
(%S=^$?%\"\n\nSubject: \":Re: %S)\nSummary: \nExpires: \n%(%R=^$?:References:
 %R\n)Sender: \nReply-To: %L@%H.UUCP (%N)\nFollowup-To: \nDistribution: %
(%i=^$?%\"Distribution: \":%D)\nOrganization: %o\nKeywords: %[keywords]\n\n"

to
#    define NEWSHEADER "Newsgroups: %(%F=^$?%C:%F)\nSubject: %
(%S=^$?%\"\n\nSubject: \":Re: %S)\nSummary: \nExpires: \n%(%R=^$?:References:
 %R\n)Sender: \nReply-To: %L@%H.UUCP (%N)\nFollowup-To: \nDistribution: %
(%i=^$?%\"Distribution: \":%D)\nOrganization: %o\nKeywords:
 %[keywords]\nComment-To: %t\n\n"

(Just added Comment-To: %t\n in the end!)
It adds name of recipent to news messsages, so it will be in fidonet
echo replies, otherwise you need to type it hand or leave it out in which
case to-field be set to All.

You should arrange addresses which look like fidonet addresses,
probably everything of format huu@something.fidonet to be passed to
rfmail.  You could try rmail which comes with this software, though I
haven't tried it yet, better choice would be to use sendmail or
anything which can forward certain kind of addresses to other mailer.

