[alt.sources] FIDOGATE Part 1/6

mj@dfv.rwth-aachen.de (Martin Junius) (01/28/91)

This is FIDOGATE, a Gateway between the worlds of FIDO NetMail/EchoMail
and UNIX mail/news. It is capable of converting FIDO mail packets to
RFC822 messages and vice versa. It does _not_ include a FIDO mailer.

The software is based on rfmail 0.3.3, which came over the net one or
two years ago. Since about one year by now I've been working on it and
using it as a gateway between my FIDO node 2:242/6 and my XENIX machine,
which is connected via UUCP to mail/news.

It is still in a very experimental state and may need some modifications
when porting to a system other then XENIX (especially BSD-UNIX). But
because some people have asked for it, I'm posting it to alt.sources to
share it with you.

As mentioned above, the FIDO mailer fcall, as included in the original
version, is not supported. fcall only supported Diet-IFNA (no WaZOO),
so IMO it isn't usable at all. Christian Seyb (root@gold.doit.sub.org)
has worked on an improved version of fcall, which is WaZOO capable.
Contact him for further information.

Flames >/dev/null
Improvements, suggestions etc. >mail mj@dfv.rwth-aachen.de

Martin

---- Cut Here and feed the following to sh ----
#!/bin/sh
# This is a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 01/28/1991 08:06 UTC by mj@hippo
# Source directory /u/mj/mail+news/fidogate
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#   1370 -rw-r--r-- Version
#     49 -rw-r--r-- Version.id
#   3549 -rw-r--r-- README
#   2727 -rw-r--r-- HISTORY
#   7439 -rw-r--r-- INSTALL
#    874 -rw-r--r-- LICENCE
#   1716 -rw-r--r-- DOCU
#    333 -rw-r--r-- PROBLEMS
#   2482 -rw-r--r-- XENIX.mail
#   1409 -rw-r--r-- Alias
#  12545 -rw-r--r-- Areas
#   5739 -rw-r--r-- Makefile
#  13426 -rw-r--r-- getdate.y
#   1655 -rwxr-xr-x frecv
#   7068 -rw-r--r-- config.h
#   2561 -rw-r--r-- packet.h
#   1637 -rw-r--r-- shuffle.h
#   1760 -rw-r--r-- sysexits.h
#   3209 -rw-r--r-- nodelist.h
#   4281 -rw-r--r-- fidogate.h
#  34750 -rw-r--r-- rfmail.c
#  15826 -rw-r--r-- funcs.c
#  13476 -rw-r--r-- rmail.c
#  10480 -rw-r--r-- fpack.c
#  32138 -rw-r--r-- funpack.c
#  17722 -rw-r--r-- nodelist.c
#   1592 -rw-r--r-- gethost.c
#   9474 -rw-r--r-- address.c
#   1670 -rw-r--r-- sprintfs.c
#   1919 -rw-r--r-- strempty.c
#   1474 -rw-r--r-- listscan.c
#   2067 -rw-r--r-- xalloc.c
#   1206 -rw-r--r-- msgidseq.c
#
# ============= Version ==============
if test -f 'Version' -a X"$1" != X"-c"; then
	echo 'x - skipping Version (File already exists)'
else
echo 'x - extracting Version (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'Version' &&
This is FIDOGATE version 2.1
X
Versions of FIDOGATE files:
X
X     Id: Alias,v 1.3 91/01/26 13:27:04 mj Exp 
X     Id: Areas,v 1.4 90/11/23 21:51:07 mj Exp 
X     Id: INSTALL,v 1.1 91/01/26 15:36:52 mj Exp 
X     Id: Makefile,v 1.9 91/01/26 15:36:59 mj Exp 
X     Id: README,v 1.1 91/01/26 15:37:14 mj Exp 
X     Id: Version.id,v 2.1 91/01/26 15:37:26 mj Exp 
X     Id: address.c,v 1.11 90/12/13 20:04:41 mj Exp 
X     Id: config.h,v 1.14 91/01/05 13:05:29 mj Exp 
X     Id: fidogate.h,v 1.8 90/12/02 21:21:47 mj Exp 
X     Id: fpack.c,v 2.2 90/12/09 18:35:27 mj Exp 
X     Id: frecv,v 1.3 90/12/09 17:33:17 mj Exp 
X     Id: funcs.c,v 1.7 90/12/02 21:21:57 mj Exp 
X     Id: funpack.c,v 2.12 91/01/26 13:27:37 mj Exp 
X     Id: gethost.c,v 1.2 90/12/02 21:22:08 mj Exp 
X     Id: listscan.c,v 1.2 90/12/02 21:22:09 mj Exp 
X     Id: msgidseq.c,v 1.1 90/11/05 20:50:47 mj Exp 
X     Id: nodelist.c,v 1.8 90/12/13 20:05:57 mj Exp 
X     Id: nodelist.h,v 1.2 90/12/02 21:22:18 mj Exp 
X     Id: packet.h,v 1.3 90/12/09 18:36:16 mj Exp 
X     Id: rfmail.c,v 2.18 91/01/05 13:07:34 mj Exp 
X     Id: rmail.c,v 1.9 91/01/05 13:08:58 mj Exp 
X     Id: shuffle.h,v 1.3 90/12/02 21:22:39 mj Exp 
X     Id: sprintfs.c,v 1.2 90/12/02 21:22:41 mj Exp 
X     Id: strempty.c,v 1.2 90/12/02 21:22:42 mj Exp 
X     Id: sysexits.h,v 1.2 90/12/02 21:22:44 mj Exp 
X     Id: xalloc.c,v 1.4 90/11/05 20:51:14 mj Exp 
SHAR_EOF
chmod 0644 Version ||
echo 'restore of Version failed'
Wc_c="`wc -c < 'Version'`"
test 1370 -eq "$Wc_c" ||
	echo 'Version: original size 1370, current size' "$Wc_c"
fi
# ============= Version.id ==============
if test -f 'Version.id' -a X"$1" != X"-c"; then
	echo 'x - skipping Version.id (File already exists)'
else
echo 'x - extracting Version.id (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'Version.id' &&
$Id: Version.id,v 2.1 91/01/26 15:37:26 mj Exp $
SHAR_EOF
chmod 0644 Version.id ||
echo 'restore of Version.id failed'
Wc_c="`wc -c < 'Version.id'`"
test 49 -eq "$Wc_c" ||
	echo 'Version.id: original size 49, current size' "$Wc_c"
fi
# ============= README ==============
if test -f 'README' -a X"$1" != X"-c"; then
	echo 'x - skipping README (File already exists)'
else
echo 'x - extracting README (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'README' &&
-:ts=8------------------------------------------------------------------------
$Id: README,v 1.1 91/01/26 15:37:14 mj Exp $
------------------------------------------------------------------------------
X
X                            F  I  D  O  G  A  T  E
X                                     ----
X                        Gateway Software UNIX <-> FIDO
X
X
X                             General Information
X
------------------------------------------------------------------------------
X
This is FIDOGATE, a gateway software between the worlds of FIDONET and the
UNIX mail/news system. FIDOGATE will convert FIDO mail packets to RFC822-style
messages and vice versa.
X
Requirements for FIDOGATE:
X
X  o Something that gets you FIDONET mail.
X    The original version of this software included fcall, a very base
X    FIDONET mailer. Because fcall was only capable of FTS-0001 handshake
X    (doesn't support YooHoo / WaZOO) and I'm not using a FIDO mailer on
X    the UNIX system at all, the sources for fcall have been deleted from
X    this distribution. Lately I got a modified version of rfmail 0.3.6
X    from Christian Seyb (root@gold.doit.sub.org), which includes also a
X    WaZOO capable fcall. So if you desperately want a FIDO mailer try this
X    one, it's available for FRequest at 2:242/6 (RFMAILCS.TAZ, 180K, HST/V.32).
X    Otherwise I recommend using a UNIX version BinkleyTerm, which should
X    be there (at least corresponding to `Latest Version' in FIDO News).
X
X  o Installed news system. (BNews or CNews, I recommend the later one)
X
X  o A mail user agent. (I use elm, but you can use mail, if it calls
X    rmail to deliver mail)
X
Optional:
X
X  o A domain based mail transport agent. (e.g. smail 3.1)
X
X
X
FIDOGATE basically consists of three programs:
X
X  funpack  unpacks FIDO mail packets in single RFC messages.
X  
X  frecv    feeds output of funpack to rnews or rmail, also
X           does some domain checking for the mail gateway.
X
X  rfmail   reads RFC messages and converts them into an intermediate
X           formats suitable for FIDO.
X
X  fpack    packs these intermediate messages to a FIDO mail packet.
X
Further included is
X
X  rmail    a replacement for rmail. This one looks out for mail addressed
X           to the FIDO domain and passes them to rfmail, other mail is
X           handed over to the original version of rmail. It also does some
X           rudimentary UUCP rerouting of domain addresses.
X           (This program is for those people who don't have sendmail
X           or smail.)
X
X  msgidseq a message id number generator for the news system.
X
X
X
See file INSTALL for information about installing the software.
X
X
X
------------------------------------------------------------------------------
X
This stuff is a derived version of a posting to Usenet's alt.sources
some time ago. I rewrote much of the code and enhanced it in several
places, so it had changed a lot.
X
The original authors are:
X    Teemu Torma     wrote the first version.
X    Heikki Suonsivu did some changes and improvements and posted version
X                    0.3.3 to the net.
X                    EMail: FIDO 2:504/1
X                           ...!mcsun!santra!hsu
X                           HSU@FINGATE.BITNET
Also used is the getdate.y date/time parser written by
X    Steven M. Bellovin     (unc!smb).
X
X
$Date: 91/01/26 15:37:14 $, Martin Junius
--
X _____ _____
|     |___  |   Martin Junius     FIDO:    2:242/6.1   2:242/6.0
| | | |   | |   Republikplatz 3   DOMAIN:  mju@dfv.rwth-aachen.de
|_|_|_|_____|   D-5100 Aachen     Tel. (Voice) 0241-86931
SHAR_EOF
chmod 0644 README ||
echo 'restore of README failed'
Wc_c="`wc -c < 'README'`"
test 3549 -eq "$Wc_c" ||
	echo 'README: original size 3549, current size' "$Wc_c"
fi
# ============= HISTORY ==============
if test -f 'HISTORY' -a X"$1" != X"-c"; then
	echo 'x - skipping HISTORY (File already exists)'
else
echo 'x - extracting HISTORY (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'HISTORY' &&
0.3.3
X
- WAITCLEAR.
- PREWAIT, WAITCLEAR, MAX_SEND_RETRIES. Makes it more configureable, though
configuration file would be far better for this kind of purpose.
X
- Fixed bugs in sealink, which caused transfers on bad lines
to stop with too many retries message.
X
- Fixed bug in funpack which could cause terminating too early. It was
a bug in get_string, which didn't read the terminating null char if
string was too long just equal to maximum length (someone had 35 char
name :-), and it read one null more, thought it had no subject, sent
subject as message body to mail and got something else than message magic (2),
and thought here is the end. Also now reports if it got something else
than 2, and stops then.
X
0.3.2
X
- Receiver is now Sealink capable (if that means just adding blocknum
and its complement after naks and acks?). It seems to work?  I did it
because I had problems when communicating with Binkley, which says
'timeout' in long transfers, with no apparent reason, message appears
without any delay which could be the reason for such message?  Maybe
this works better?  Sender is not capable of Sealink, though it
wouldn't be difficult?
X
- Some minor changes.
X
0.3.1
X
- Line wrap now according to FSC-0001.TXT.
X
- rnews can be replaced by command in fnews.cf. This makes possible
forwarding sysop-echos and such restricted echos to selected users or
converting echos to mailing lists.
X
- 'of (node-specification)' will be now removed from name if it is
there and node-specification specified an existing node. This node-spec
will be saved and used if originator cannot be found for some reason
for reply-to path. Order to use is nodelist, orig in name, origin line
in message, echo feed.
X
- Zone support has gone giant step forward. For points I need more info,
ie where they are located in fidonet structures. There shouldn't be
net-node combinations anywhere, its all Node structures.
X
- Packet names have been changed to a very strange format, and files
are stored in in and out directories. Specially the name format may change
in future again, now its really strange.
X
- Special characters will be removed user names and scandinavian chars will
be converted to a and o. Neither conversion happens in usenet format
messages, but I'll work on it (news software may take care if it itself?).
X
- REMOVE_ID_IN_PARENTHESIS and SEARCH_NAME_IN_NODELIST are no more
options, they will be forced in this version.
X
- Some bug fixes.
X
- Maybe something else too but I dont remember what.
X
0.2.3
X
- Echomail origin, seenby and so on will be partially printed by
program, makes maintaining easier as admin doesn't need to change
node numbers in many places, and version number will be up to date.
X
- Some bugs fixed.
SHAR_EOF
chmod 0644 HISTORY ||
echo 'restore of HISTORY failed'
Wc_c="`wc -c < 'HISTORY'`"
test 2727 -eq "$Wc_c" ||
	echo 'HISTORY: original size 2727, current size' "$Wc_c"
fi
# ============= INSTALL ==============
if test -f 'INSTALL' -a X"$1" != X"-c"; then
	echo 'x - skipping INSTALL (File already exists)'
else
echo 'x - extracting INSTALL (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'INSTALL' &&
-:ts=8------------------------------------------------------------------------
$Id: INSTALL,v 1.1 91/01/26 15:36:52 mj Exp $
------------------------------------------------------------------------------
X
X                            F  I  D  O  G  A  T  E
X                                     ----
X                        Gateway Software UNIX <-> FIDO
X
X
X                          Installation Instructions
X
------------------------------------------------------------------------------
X
1. Edit `config.h'
X
X	FIDONET addresses
X	 o Your system:
X		Change the REAL_{ZONE,REGION,NET,NODE,POINT} defines to your
X		real FIDONET address, e.g. 2:242/6.1.
X		Chnage the MY_{ZONE,REGION,NET,NODE,POINT} defines to your
X		fake address, if you're a point system, e.g. 2:6000/1. Must
X		be the same as REAL_* for a FIDO node.
X		Define MY_NAME as the name of your FIDO system (max. 19 chars).
X	 o Other systems:
X	        Change the REM_{ZONE,REGION,NET,NODE,POINT} defines to the
X	        FIDONET address, where mail packets are send to (Default for
X	        fpack). Put bossnode here for point systems.
X	        Define ECHOFEED_{NET,NODE} as the address of your FIDO
X	        EchoMail feed, i.e. bossnode for point systems.
X
X	UNIX addresses
X	 o Your system:
X		Define MY_HOSTNAME as the UNIX hostname of your system.
X		(Same as UUCP hostname)
X		Define MY_DOMAIN as the address domain of your system, e.g.
X		".uucp".
X	 o Other systems:
X		Change UUCPFEED to the name of the UUCP system you want mail
X		to be routed to. Change UUCPFEED_DOMAIN to the domain of this
X		system. (Both definitions are used by the rmail replacement.)
X	 o FIDO domain:
X		Change FIDODOMAIN to the domain you want to use for FIDO
X		domain addresses. (".fidonet.org" is the standard)
X
X	Directories:
X		Edit the defines of spool and lib directories to meet your
X		taste, e.g. replace "/u/spool/fidonet" with "/usr/spool/fido"
X		or whatever you want. (SPOOL ... AREAS)
X
X	Mail/News programs:
X		Change RFMAIL to the full path of the FIDOGATE rfmail program,
X		normally "LIBDIR/rfmail".
X		Change RNEWS to the full path of the news receiver, normally
X		"/usr/bin/rnews".
X		Change RMAIL to the full path of the mail receiver, normally
X		"/usr/bin/rmail" or "/bin/rmail". (This may be the installed
X		replacement)
X		If you want to install the rmail replacement, change RECVMAIL
X		to the full path of the real mail receiver, normally
X		"/usr/bin/ormail" (the renamed original rmail) or
X		"/usr/lib/mail/execmail" for XENIX (done automatically in
X		rmail.c).
X		Define RETURN_FAILED_MAIL if you want rfmail to return
X		undeliverable FIDO mail.
X
X	System dependencies:
X		Define USG if you're running a System V UNIX, or BSD if you're
X		UNIX is more BSDish. (BSD not tested yet.)
X		Define LOCK_LOCKF if file locking is done via the lockf() call,
X		else locking() will be used.	
X
X	The following defines are parameters for fcall, leave them alone!
X
X
X
2. Edit `Makefile'
X
X	Directories:
X		Change NEWSBINDIR to the directory, where the inews related
X		programs are found (CNews' anne.jones etc.). Used for the
X		installation of msgidseq.
X		Change LIBDIR to the directory, where you want to put the
X		FIDOGATE executables.
X		Change SPOOLDIR to the top level spool directory. (Must be
X		the same as in config.h!)
X		Change RMAILDIR to the directory, where rmail is to be found
X		(normally "/usr/bin").
X
X	Owner/Group:
X		Change OWNER/GROUP to the user/group id for the FIDOGATE
X		directories and files. (Normally `news')
X
X	Compiler:
X		Change CC to your C compiler (or comment it out).
X		Change CFLAGS and LDFLAGS to the compilation/linking
X		flags (e.g. `-g' for debug information).
X		Change LIBS to the libraries to link with. (e.g. XENIX
X		needs -lx)
X
X
X
3. Edit `frecv'
X
X	Change the define of SPOOL and the address matching patterns to
X	be sufficient for your system. SPOOL must be the same as in
X	config.h and Makefile.
X
X
X
4. Here we go ...
X
X	Main installation:
X		Compile the beast by entering
X			make
X		If everything works, you can continue the installation. Log in
X		as super user and enter
X			make install.dirs
X		This will create the necessary working directories for the
X		FIDOGATE software. Now type
X			make install
X		to copy the programs to the appropiate directories.
X
X	rmail installation:
X		Type
X			make install.rmail
X		to install the replacement for rmail. This will move the
X		original version of rmail to `ormail' and install the
X		replacement as the systems rmail command.
X
X	msgidseq installation:
X		Type
X			make install.msgidseq
X		to install the message id number sequencer in the news
X		inject directory. This program will enable the FIDOGATE
X		software to use the RFC `Message-Id:' in FIDO `^AMSGID'
X		kludges. You also must edit `anne.jones' (CNews) or
X		similar to use msgidseq for id generation:
X
*** /u/lib/newsbin/inject/anne.jones.ori	Sat Aug 18 15:51:02 1990
--- /u/lib/newsbin/inject/anne.jones	Sat Aug 18 16:06:44 1990
***************
*** 117,120 ****
X  defpath="$badsites$USER" \
X  deffrom="$FROM" deforg="$deforg" \
X  defdate="` set $date; echo $1, $3 $2 \` echo $6 | sed 's/^..//' \` $4 $5`" \
! defmsgid="`set $date; echo \<$6$2$3.\`  echo $4 | tr -d : \`.$$@$host\>`" -
--- 117,124 ----
X  defpath="$badsites$USER" \
X  deffrom="$FROM" deforg="$deforg" \
X  defdate="` set $date; echo $1, $3 $2 \` echo $6 | sed 's/^..//' \` $4 $5`" \
! defmsgid="`echo \<\`msgidseq\`@$host\>`" -
! #
! # defmsgid changed for FIDO gateway software
! # Original version:
! # defmsgid="`set $date; echo \<$6$2$3.\`  echo $4 | tr -d : \`.$$@$host\>`" -
X
X
X
5. News forwarding
X
X	Put something similar to
X
# export to fidonet
f1.n6000.z2.fidonet.org:all/fidonet::/u/lib/fidonet/rfmail -n
X
X	in your news `sys' file (CNews) to forward locally created postings
X	to the FIDONET receiver rfmail. The FIDONET address must be identical
X	to the one generated by funpack in the `Path' header.
X
X
X
6. Areas/Alias
X
X	Edit the file Areas for the newsgroup <-> EchoMail area conversion,
X	change the entries for your favorite newsgroups/areas and distribution.
X	Also edit the file Alias, which is used for conversion between
X	UNIX user names and FIDO real names.
X	If done, copy these files to the FIDOGATE lib directory (e.g.
X	"/u/lib/fidonet".
X
X
X
7. Testing
X
X	Copy a FIDO mail packet addressed to your system into the directory
X	SPOOL/in, then execute LIBDIR/funpack as user news. You should get
X	the unpacked messages in SPOOL/unpacked: M.* for mail and N.* for
X	news. Execute LIBDIR/frecv to feed them to rmail or rnews.
X	
X	Post a message to a FIDO linked newsgroup. You should find the
X	FIDO message in directory SPOOL as M.*. Execute fpack as user news
X	to create a FIDO mail packet in SPOOL/out.
X
X
X
8. Connecting with FIDO
X
X	At the current state, FIDOGATE isn't able to act as a mailer, so
X	you have to transfer FIDO mail to and from the UNIX system by some
X	other means.
X	
X	The solution I'm using is a seperate PC running DOS and BinkleyTerm
X	as a mailer. Currently the PC is a real FIDO node, online 24 hours
X	a day, but in former times I've used it in a dual point setup. FIDO
X	mail packets for the UNIX system are packed at the PC and transferred
X	via a direct serial line to and from the UNIX machine. This is done
X	on a time schedule driven by BinkleyTerm.
X
X
X
$Date: 91/01/26 15:36:52 $, Martin Junius
--
X _____ _____
|     |___  |   Martin Junius     FIDO:    2:242/6.1   2:242/6.0
| | | |   | |   Republikplatz 3   DOMAIN:  mju@dfv.rwth-aachen.de
|_|_|_|_____|   D-5100 Aachen     Tel. (Voice) 0241-86931
SHAR_EOF
chmod 0644 INSTALL ||
echo 'restore of INSTALL failed'
Wc_c="`wc -c < 'INSTALL'`"
test 7439 -eq "$Wc_c" ||
	echo 'INSTALL: original size 7439, current size' "$Wc_c"
fi
# ============= LICENCE ==============
if test -f 'LICENCE' -a X"$1" != X"-c"; then
	echo 'x - skipping LICENCE (File already exists)'
else
echo 'x - extracting LICENCE (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'LICENCE' &&
If there is a COPYRIGHT file also, check it out.
X
I have used getdate.y and ftime.c from news package, thanks for Steven
M. Bellovin (unc!smb) and Chapel Hill. I hope they don't mind even
though I didn't ask for it!
X
-------------------------------------------------------------------------
This software should be used in friendly and lawful manner!
X
If using this in Finland, I personally recommend joining network 504.
X
You may not sell this software, you must give it free! Idea is to keep
this and all derived versions as free and source-distributed.
X
We take absolutely no responsibility on any trouble caused by using this,
so you are on your own risk if you use this.
X
Comments, new features and bug fixes can be sent to hsu@clinet,
hsu@santra, 2:504/1, 2:504/7, ...!mcvax!santra!hsu, HSU@FINGATE.BITNET
Heikki Suonsivu / Kuutamokatu 5 A 7 / 02210 Espoo / FINLAND
X
X
SHAR_EOF
chmod 0644 LICENCE ||
echo 'restore of LICENCE failed'
Wc_c="`wc -c < 'LICENCE'`"
test 874 -eq "$Wc_c" ||
	echo 'LICENCE: original size 874, current size' "$Wc_c"
fi
# ============= DOCU ==============
if test -f 'DOCU' -a X"$1" != X"-c"; then
	echo 'x - skipping DOCU (File already exists)'
else
echo 'x - extracting DOCU (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'DOCU' &&
This file describes briefly, how the fidogate software must be
put to work.
X
Sat Sep 15 19:26:36 MEST 1990 / Martin Junius
X
--------------------------------------------------------------
X
Directories:
X
X    Main spool directory SPOOL (/u/spool/fidonet)
X        ./           M.* packets generated by rfmail
X        in/          incoming mail packets
X        out/         outgoing mail packets
X        unpacked/    unpacked messages
X        bad/         messages rejected by rmail or rnews
X        
X    Lib directory LIBDIR       (/u/lib/fidonet)
X        Alias        aliases fido <-> unix user names
X        Areas        newsgroup <-> echo mail area
X        fnews.cf     echo mail config file
X        idseq        message-id sequence file
X        seq          mail message-id sequence file
X        msgidseq     news message id sequence file
X        log          error messages
X
X
--------------------------------------------------------------
X
FIDO mail --> news | mail
X
X    - fido mail packet must be in SPOOL/in (any name)
X    - program FUNPACK splits this packet into single
X      messages (either mail or news) in SPOOL/unpacked
X    - program FRECV feeds these messages to either
X      rmail or rnews
X
X
news ---> FIDO echo mail
X
X    - relaynews (CNews) calls rfmail -n with the article
X      as standard input. Put a line similar to the
X      following in news sys file:
X
X          fidonet:all/all:L:/u/lib/fidonet/rfmail -n
X      
X      rfmail creates a spool file in SPOOL.
X
X    - fpack creates a outbound packet in SPOOL/out
X
X
mail --> FIDO mail
X
X    - mail or similar program calls rmail, which 
X      passes the message to the real rmail (mail
X      for unix) or to rfmail (mail for FIDO).
X    - same as above
SHAR_EOF
chmod 0644 DOCU ||
echo 'restore of DOCU failed'
Wc_c="`wc -c < 'DOCU'`"
test 1716 -eq "$Wc_c" ||
	echo 'DOCU: original size 1716, current size' "$Wc_c"
fi
# ============= PROBLEMS ==============
if test -f 'PROBLEMS' -a X"$1" != X"-c"; then
	echo 'x - skipping PROBLEMS (File already exists)'
else
echo 'x - extracting PROBLEMS (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'PROBLEMS' &&
Users in fidonet are allowed to enter private messages in echos,
which causes trouble, how to handle those messages?
X
Packet name can be longer than maximum filename length in system V,
could there be some really fancy idea of creating names or just make
them fido compatible, though that doesn't show zone and point in
packet name?
SHAR_EOF
chmod 0644 PROBLEMS ||
echo 'restore of PROBLEMS failed'
Wc_c="`wc -c < 'PROBLEMS'`"
test 333 -eq "$Wc_c" ||
	echo 'PROBLEMS: original size 333, current size' "$Wc_c"
fi
# ============= XENIX.mail ==============
if test -f 'XENIX.mail' -a X"$1" != X"-c"; then
	echo 'x - skipping XENIX.mail (File already exists)'
else
echo 'x - extracting XENIX.mail (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'XENIX.mail' &&
XFrom: chip@tct.uucp (Chip Salzenberg)
Newsgroups: comp.mail.uucp,comp.unix.xenix
Subject: Re: Xenix Mail
Keywords: Xenix, Mail, Tandy
Date: 26 Jun 90 17:35:18 GMT
Organization: ComDev/TCT, Sarasota, FL
X
According to nanook@rwing.UUCP (Robert Dinse):
>I have a Tandy 6000 running Tandy's bizzare version of Xenix 3.02.00.
>I would appreciate any help in understanding how mail works on this system,
>specifically, how the various componenets, mail.local, execmail, main.mn,
>daemon.mn, and /bin/mail itself all devide the labor of delivering mail.
X
Okay, here's the rundown.  Note that this description is based on SCO
XXenix 2.2 and 2.3; your milage may vary.
X
/usr/bin/mail: A user agent, aka user interface, with delusions of
X	being a transfer agent.  It should just show you mail and let
X	execmail handle delivery.  However, unless you say "set
X	execmail" in the file "/usr/lib/mail/mailrc", it likes to
X	deliver local mail on its own.  Unfortunately, it thinks that
X	everything without a bang or a colon is local.
X
/usr/bin/rmail: Itty bitty program that runs execmail.  Invoked only
X	for incoming mail from your UUCP neighbors; not something
X	you'd run yourself.  It may be smart enough to run uux
X	directly; I don't know.  Smail 2.5 and 3.1 replace rmail with
X	a link to smail.
X
/usr/lib/mail/execmail: The brains [sic] of the outfit.  The central
X	part of the Xenix mail transport system.  Execmail does
X	aliasing, and then runs one of mail.local, mail.cln or uux to
X	do the dirty work.  Parameters include -m (me too on aliases),
X	-n (no aliasing), -r (remote?), -h # (max UUCP hop count) and
X	-f user (who the message is supposed to be from).
X
/usr/lib/mail/mail.local: Delivery of local mail.  I *think* it also
X	understands UUCP addresses, but don't quote me on that.  My
X	Deliver program is a plug-in replacement for mail.local.
X	(I suppose that this rates as a plug-in plug.  :-))
X	Parameters include -r user (who the message is supposed to be
X	from -- yes, that's "-r").
X 
/usr/lib/mail/mail.cln: Deliver of Micnet or other network mail, i.e.
X	mail with a CoLoN in the address.  No details here, except
X	that the parameters "-h 0 'targethost' 'sender' 'recipient'"
X	seem to work for me on Micnet.  (Gads, I hate Micnet.)
X
>     I have smail and am trying to figure out how to interface it properly
>with this version of Xenix.
X
I'll E-Mail my Xenix patches; that should fix you right up.
X
-- 
Chip, the new t.b answer man      <chip@tct.uucp>, <uunet!ateng!tct!chip>
X
X
SHAR_EOF
chmod 0644 XENIX.mail ||
echo 'restore of XENIX.mail failed'
Wc_c="`wc -c < 'XENIX.mail'`"
test 2482 -eq "$Wc_c" ||
	echo 'XENIX.mail: original size 2482, current size' "$Wc_c"
fi
# ============= Alias ==============
if test -f 'Alias' -a X"$1" != X"-c"; then
	echo 'x - skipping Alias (File already exists)'
else
echo 'x - extracting Alias (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'Alias' &&
#
#   $Id: Alias,v 1.3 91/01/26 13:27:04 mj Exp $
#
#   File for aliases.
#
#   Each line contains alias-name, followed by optional net/node information.
#   If alias is followed by net/node information, alias is used only if
#   mail is going to that net/node. There may be more than one net/node
#   specification for one alias, in that case they are separated by commas.
#
#   If net is missing from net/node specification, e.g. net/node is only
#   single number, node is to be considered on our net. If node is missing,
#   e.g. it is empty string, all nodes in that net are valid.
#
#   First alias found will be used, so if there are aliases with same name,
#   that alias that doesn't have net/node limits or has wider limits that
#   some other alias, should ba after later alias.
#
#
# username,net/node                         real name
# -----------------                         ---------
mj,6000/                                    Martin Junius
mj,242/                                     Martin Junius
sub,6000/                                   Susanne Bueter
sub,242/                                    Susanne Bueter
mj,6000/1                                   Sysop
leo,242/2                                   Leo Moll
jan,242/2                                   Jan Egner
X
dec@dfv.rwth-aachen.de,6000/1               Peter Decker
stefanb@informatik.rwth-aachen.de,6000/1    Stefan Becker
SHAR_EOF
chmod 0644 Alias ||
echo 'restore of Alias failed'
Wc_c="`wc -c < 'Alias'`"
test 1409 -eq "$Wc_c" ||
	echo 'Alias: original size 1409, current size' "$Wc_c"
fi
# ============= Areas ==============
if test -f 'Areas' -a X"$1" != X"-c"; then
	echo 'x - skipping Areas (File already exists)'
else
echo 'x - extracting Areas (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'Areas' &&
#
# $Id: Areas,v 1.4 90/11/23 21:51:07 mj Exp $
#
# Echomail <-> newsgroup conversions.
#
# area              newsgroup                distribution    flags
# ------------      ----------------------   ------------    --------------
24000.GER           fidonet.net24000.ger     fidonet         accept-private
386.GER             fidonet.i386.ger         fidonet         accept-private
4DOS                fidonet.p4dos            fidonet         accept-private
ACAD.CH             fidonet.acad.ch          fidonet         accept-private
AIDS/ARC            fidonet.aids_arc         fidonet         accept-private
AMIGA               fidonet.amiga            fidonet         accept-private
AMIGA.GER           fidonet.amiga.ger        fidonet         accept-private
AMY_POINT           fidonet.amy_point        fidonet         accept-private
ANTIFA.GER          fidonet.antifa.ger       fidonet         accept-private
ASIAN_LINK          fidonet.asian_link       fidonet         accept-private
ASTRONOMIE.GER      fidonet.astronomie.ger   fidonet         accept-private
ATARI.GER           fidonet.atari.ger        fidonet         accept-private
ATARIST             fidonet.atarist          fidonet         accept-private
AUTOCAD             fidonet.autocad          fidonet         accept-private
AVIATION.GER        fidonet.aviation.ger     fidonet         accept-private
BASAR               fidonet.basar.ger        fidonet         accept-private
BASTELECKE_IBM      fidonet.bastelecke_ibm   fidonet         accept-private
BATPOWER            fidonet.batpower         fidonet         accept-private
BERLIN              fidonet.berlin           fidonet         accept-private
BINKLEY             fidonet.binkley          fidonet         accept-private
BINKLEY.GER         fidonet.binkley.ger      fidonet         accept-private
BITRIS.GER          fidonet.bitris.ger       fidonet         accept-private
BNU                 fidonet.bnu              fidonet         accept-private
BOERSE.GER          fidonet.boerse.ger       fidonet         accept-private
BOOK.GER            fidonet.book.ger         fidonet         accept-private
BTX.GER             fidonet.btx.ger          fidonet         accept-private
CCC.GER             fidonet.ccc.ger          fidonet         accept-private
CDROM               fidonet.cdrom            fidonet         accept-private
CHAMELEON           fidonet.chameleon        fidonet         accept-private
CHAUVI.GER          fidonet.chauvi.ger       fidonet         accept-private
CLIPPER             fidonet.clipper          fidonet         accept-private
CLIPPER.GER         fidonet.clipper.ger      fidonet         accept-private
CLONE               fidonet.clone            fidonet         accept-private
COMMS               fidonet.comms            fidonet         accept-private
COMMS.GER           fidonet.comms.ger        fidonet         accept-private
COOKING             fidonet.cooking          fidonet         accept-private
CPM.GER             fidonet.cpm.ger          fidonet         accept-private
CXL                 fidonet.cxl              fidonet         accept-private
CYBERSPACE.GER      fidonet.cyberspace.ger   fidonet         accept-private
C_ECHO              fidonet.c_echo           fidonet         accept-private
C_ECHO.GER          fidonet.c_echo.ger       fidonet         accept-private
C_PLUSPLUS          fidonet.c_plusplus       fidonet         accept-private
C_PLUSPLUS.GER      fidonet.c_plusplus.ger   fidonet         accept-private
DARC.GER            fidonet.darc.ger         fidonet         accept-private
DBASE               fidonet.dbase            fidonet         accept-private
DBASE.GER           fidonet.dbase.ger        fidonet         accept-private
DBRIDGE             fidonet.dbridge          fidonet         accept-private
DBRIDGE.GER         fidonet.dbridge.ger      fidonet         accept-private
DECONONET           fidonet.decononet        fidonet         accept-private
DEMOCRACY           fidonet.democracy        fidonet         accept-private
DESQVIEW            fidonet.desqview         fidonet         accept-private
DEUTSCH             fidonet.deutsch          fidonet         accept-private
DIRTY_DOZEN         fidonet.dirty_dozen      fidonet         accept-private
DR_DEBUG            fidonet.dr_debug         fidonet         accept-private
EBBAUSER.GER        fidonet.ebbauser.ger     fidonet         accept-private
ECHOPOL             fidonet.echopol          fidonet         accept-private
EECH                fidonet.eech             fidonet         accept-private
EMBBS               fidonet.embbs            fidonet         accept-private
ENET.SOFT           fidonet.enet.soft        fidonet         accept-private
ENET.SYSOP          fidonet.enet.sysop       fidonet         accept-private
EURO4               fidonet.euro4            fidonet         accept-private
EUROPUS             fidonet.europus          fidonet         accept-private
FDECHO              fidonet.fdecho           fidonet         accept-private
FDECHO.GER          fidonet.fdecho.ger       fidonet         accept-private
FIDOGUIDE           fidonet.fidoguide        fidonet         accept-private
FIDOGUIDE.GER       fidonet.fidoguide.ger    fidonet         accept-private
FLEA.GER            fidonet.flea.ger         fidonet         accept-private
FN_SYSOP            fidonet.fn_sysop         fidonet         accept-private
FRANCENET           fidonet.francenet        fidonet         accept-private
FRAUEN.GER          fidonet.frauen.ger       fidonet         accept-private
FTSC                fidonet.ftsc             fidonet         accept-private
GAMING              fidonet.gaming           fidonet         accept-private
GATEWAYS.GER        fidonet.gateways.ger     fidonet         accept-private
GAY.GER             fidonet.gay.ger          fidonet         accept-private
GENEALOGY.EUR       fidonet.genealogy.eur    fidonet         accept-private
GREEN.029           fidonet.green.n029       fidonet         accept-private
GREENP.GER          fidonet.greenp.ger       fidonet         accept-private
HARDWARE.GER        fidonet.hardware.ger     fidonet         accept-private
HDCONF              fidonet.hdconf           fidonet         accept-private
HST                 fidonet.hst              fidonet         accept-private
HST.GER             fidonet.hst.ger          fidonet         accept-private
HS_MODEMS           fidonet.hs_modems        fidonet         accept-private
IBM                 fidonet.ibm              fidonet         accept-private
IBM.GER             fidonet.ibm.ger          fidonet         accept-private
INTERCOOK           fidonet.intercook        fidonet         accept-private
INTERNAT.EUR        fidonet.internat.eur     fidonet         accept-private
INTERUSER           fidonet.interuser        fidonet         accept-private
INTL.QL             fidonet.intl.ql          fidonet         accept-private
JOKES.GER           fidonet.jokes.ger        fidonet         accept-private
KIRCHE.GER          fidonet.kirche.ger       fidonet         accept-private
KOMMERZ.GER         fidonet.kommerz.ger      fidonet         accept-private
LADIES.GER          fidonet.ladies.ger       fidonet         accept-private
LAN                 fidonet.lan              fidonet         accept-private
LAN.GER             fidonet.lan.ger          fidonet         accept-private
M2AMIGA.AUS         fidonet.m2amiga.aus      fidonet         accept-private
MACDEV              fidonet.macdev           fidonet         accept-private
MAGIE.GER           fidonet.magie.ger        fidonet         accept-private
MAINFRAME           fidonet.mainframe        fidonet         accept-private
MAUSGAMES           fidonet.mausgames        fidonet         accept-private
MAUSMATHE           fidonet.mausmathe        fidonet         accept-private
MEADOW              fidonet.meadow           fidonet         accept-private
MIDI.GER            fidonet.midi.ger         fidonet         accept-private
MINIX.GER           fidonet.minix.ger        fidonet         accept-private
MITFAHR.GER         fidonet.mitfahr.ger      fidonet         accept-private
MODERATOR.GER       fidonet.moderator.ger    fidonet         accept-private
MODULA-2.GER        fidonet.modula-2.ger     fidonet         accept-private
MOVIE.GER           fidonet.movie.ger        fidonet         accept-private
MSGED_ECHO          fidonet.msged_echo       fidonet         accept-private
MTASK               fidonet.mtask            fidonet         accept-private
MUSIC               fidonet.music            fidonet         accept-private
MUSIK.GER           fidonet.musik.ger        fidonet         accept-private
NET_DEV             fidonet.net_dev          fidonet         accept-private
NET_DEV.GER         fidonet.net_dev.ger      fidonet         accept-private
OECHER              fidonet.oecher           fidonet         accept-private
OECHER.PRIV         fidonet.oecher.priv      fidonet         accept-private
OS2.GER             fidonet.os2.ger          fidonet         accept-private
OSTWEST             fidonet.ostwest          fidonet         accept-private
PASCAL              fidonet.pascal           fidonet         accept-private
PASCAL.GER          fidonet.pascal.ger       fidonet         accept-private
PENPAL              fidonet.penpal           fidonet         accept-private
PERSYS2             fidonet.persys2          fidonet         accept-private
PGMRS               fidonet.pgrms            fidonet         accept-private
PGMRS.GER           fidonet.pgmrs.ger        fidonet         accept-private
PHILO.GER           fidonet.philo.ger        fidonet         accept-private
PHOTO.GER           fidonet.photo.ger        fidonet         accept-private
PINBALL.GER         fidonet.pinball.ger      fidonet         accept-private
POINTS.242          fidonet.points.net242    fidonet         accept-private
POINTS.AC           fidonet.points.ac        fidonet         accept-private
POLITIK.GER         fidonet.politik.ger      fidonet         accept-private
QUICKBBS            fidonet.quickbbs         fidonet         accept-private
QUICKBBS.GER        fidonet.quickbbs.ger     fidonet         accept-private
QUICKPRO            fidonet.quickpro         fidonet         accept-private
RA.GER              fidonet.ra.ger           fidonet         accept-private
RA_HELP.GER         fidonet.ra_help.ger      fidonet         accept-private
RA_SUPPORT          fidonet.ra_support       fidonet         accept-private
RA_UTIL             fidonet.ra_util          fidonet         accept-private
RECHT.GER           fidonet.recht.ger        fidonet         accept-private
REGCON.EUR          fidonet.regcon.eur       fidonet         accept-private
REQUEST.GER         fidonet.request.ger      fidonet         accept-private
RPG.GER             fidonet.rpg.ger          fidonet         accept-private
SCHROTT             fidonet.schrott          fidonet         accept-private
SOUNDKARTEN.GER     fidonet.soundkarten.ger  fidonet         accept-private
SPIELE.GER          fidonet.spiele.ger       fidonet         accept-private
ST_EMUL.GER         fidonet.st_emul.ger      fidonet         accept-private
ST_FIDO.GER         fidonet.st_fido.ger      fidonet         accept-private
SYSOP.242           fidonet.sysop.net242     fidonet         accept-private
SYSOPS.GER          fidonet.sysops.ger       fidonet         accept-private
TELIX               fidonet.telix            fidonet         accept-private
TEST                fidonet.test             fidonet         accept-private
TEX.GER             fidonet.tex.ger          fidonet         accept-private
TPBOARD             fidonet.tpboard          fidonet         accept-private
TRAPDOOR            fidonet.trapdoor         fidonet         accept-private
UMWELT.GER          fidonet.umwelt.ger       fidonet         accept-private
UNIX                fidonet.unix             fidonet         accept-private
UNIX.GER            fidonet.unix.ger         fidonet         accept-private
URTEILE.GER         fidonet.urteile.ger      fidonet         accept-private
USA_EURLINK         fidonet.usa_eurlink      fidonet         accept-private
VAX                 fidonet.vax              fidonet         accept-private
VIRUS               fidonet.virus            fidonet         accept-private
WINDOWS             fidonet.windows          fidonet         accept-private
WISSEN.GER          fidonet.wissen.ger       fidonet         accept-private
YUPPIE.GER          fidonet.yuppie.ger       fidonet         accept-private
SHAR_EOF
chmod 0644 Areas ||
echo 'restore of Areas failed'
Wc_c="`wc -c < 'Areas'`"
test 12545 -eq "$Wc_c" ||
	echo 'Areas: original size 12545, current size' "$Wc_c"
fi
# ============= Makefile ==============
if test -f 'Makefile' -a X"$1" != X"-c"; then
	echo 'x - skipping Makefile (File already exists)'
else
echo 'x - extracting Makefile (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'Makefile' &&
#:ts=4
#
#    $Id: Makefile,v 1.9 91/01/26 15:36:59 mj Exp $
#
#    Makefile for fidogate software
#
#
SHELL		=	/bin/sh
X
#
# For installation ...
#
NEWSBINDIR	=	/u/lib/newsbin/inject
LIBDIR		=	/u/lib/fidonet
SPOOLDIR	=	/u/spool/fidonet
RMAILDIR	=	/usr/bin
X
SPOOLDIRS	=	bad in out sent unpacked
X
#LIBBINS		=	funpack fpack rfmail rfnews fcall frecv
#LIBBINS		=	funpack fpack rfmail rfnews frecv
LIBBINS		=	funpack fpack rfmail frecv
SETUIDBINS	=	rfmail
RMAILBIN	=	rmail
ORMAILBIN	=	ormail
X
OWNER		=	news
GROUP		=	news
X
CC			=	gcc
#CFLAGS		=	-g -DDEBUG
#LDFLAGS		=	-g
CFLAGS		=	-g
LDFLAGS		=	-g
X
#LIBS		=	-lPW -ldial
LIBS		=	-lx
X
X
FUNPACK		=	funpack.o funcs.o nodelist.o gethost.o address.o \
X				getdate.o sprintfs.o listscan.o strempty.o xalloc.o
X
RMAIL		=	rmail.o address.o funcs.o sprintfs.o gethost.o\
X				xalloc.o
X
RFMAIL		=	rfmail.o funcs.o nodelist.o gethost.o address.o getdate.o\
X				sprintfs.o strempty.o xalloc.o
X
RFNEWS		=	rfnews.o funcs.o nodelist.o address.o sprintfs.o xalloc.o
X
FPACK		=	fpack.o funcs.o nodelist.o address.o sprintfs.o xalloc.o
X
MSGIDSEQ	=	msgidseq.o funcs.o sprintfs.o
X
CFILES		=	rfmail.c funcs.c rmail.c fpack.c funpack.c\
X				nodelist.c gethost.c address.c sprintfs.c strempty.c\
X				listscan.c xalloc.c msgidseq.c
X
HFILES		=	config.h packet.h shuffle.h sysexits.h nodelist.h fidogate.h
X
OTHERFILES	=	Version Version.id README HISTORY INSTALL LICENCE DOCU PROBLEMS XENIX.mail\
X				Alias Areas Makefile getdate.y frecv
X
X
#ALL		=	funpack fcall fpack rfmail rfnews rmail msgidseq
#ALL			=	funpack fpack rfmail rfnews rmail msgidseq
ALL			=	funpack fpack rfmail rmail msgidseq frecv recvfido
X
X
all:		${ALL}
X
X
getdate.c: getdate.y
X	@echo "expect 8 shift/reduce conflicts"
X	yacc getdate.y
X	mv y.tab.c getdate.c
X
getdate.o: getdate.c
X	$(CC) -DUSG -c getdate.c
X
funpack:	${FUNPACK}
X	$(CC) ${LDFLAGS} -o funpack ${FUNPACK} ${LIBS}
X
rfmail:		${RFMAIL}
X	$(CC) ${LDFLAGS} -o rfmail ${RFMAIL} ${LIBS}
X
rfnews:		${RFNEWS}
X	$(CC) ${LDFLAGS} -o rfnews ${RFNEWS} ${LIBS}
X
fpack:		${FPACK}
X	$(CC) ${LDFLAGS} -o fpack ${FPACK} ${LIBS}
X
rmail:		${RMAIL}
X	$(CC) ${LDFLAGS} -o rmail ${RMAIL} ${LIBS}
X
msgidseq:	$(MSGIDSEQ)
X	$(CC) $(LDFLAGS) -o msgidseq $(MSGIDSEQ) $(LIBS)
X
frecv:		frecv.sh
X	sed -e 's+??SPOOL??+$(SPOOLDIR)+' frecv.sh >frecv
X	chmod +x frecv
X
recvfido:	recvfido.sh
X	sed -e 's+??SPOOL??+$(SPOOLDIR)+' recvfido.sh >recvfido
X	chmod +x recvfido
X
X
install:    $(LIBBINS)
X	@for i in $(LIBBINS); do \
X		echo "Installing $$i in $(LIBDIR)"; \
X		cp $$i $(LIBDIR); \
X	done
X	@echo "Setting owner and group"
X	@cd $(LIBDIR); chown $(OWNER) $(LIBBINS); chgrp $(GROUP) $(LIBBINS)
X	@echo "Setting setuid bit for $(SETUIDBINS)"
X	@cd $(LIBDIR); chmod u+s $(SETUIDBINS)
X
install.rmail:	rmail
X	@if [ ! -f $(RMAILDIR)/$(ORMAILBIN) ]; then \
X		echo "Moving $(RMAILDIR)/$(RMAILBIN) to $(RMAILDIR)/$(ORMAILBIN)"; \
X		mv $(RMAILDIR)/$(RMAILBIN) $(RMAILDIR)/$(ORMAILBIN); \
X	fi
X	@echo "Installing $(RMAILBIN) in $(RMAILDIR)"
X	@cp $(RMAILBIN) $(RMAILDIR)
X
install.msgidseq:	msgidseq
X	@echo "Installing msgidseq in $(NEWSBINDIR)"
X	@cp msgidseq $(NEWSBINDIR)
X	@echo "Setting owner, group and setuid bit"
X	@chown $(OWNER) $(NEWSBINDIR)/msgidseq
X	@chgrp $(GROUP) $(NEWSBINDIR)/msgidseq
X	@chmod u+s $(NEWSBINDIR)/msgidseq
X	
install.dirs:
X	@if [ ! -d $(SPOOLDIR) ]; then\
X		echo "Creating $(SPOOLDIR)";\
X		mkdir $(SPOOLDIR);\
X		chown $(OWNER) $(SPOOLDIR);\
X		chgrp $(GROUP) $(SPOOLDIR);\
X		echo "Creating sub dirs $(SPOOLDIRS)";\
X		cd $(SPOOLDIR);\
X		mkdir $(SPOOLDIRS);\
X		chown $(OWNER) $(SPOOLDIRS);\
X		chgrp $(GROUP) $(SPOOLDIRS);\
X	fi
X
tar:
X	ver=`awk '{ print $$3 }' Version.id`;\
X	dosver=`echo $$ver | sed -e 's/\.//'`;\
X	tar cvf - $(OTHERFILES) $(HFILES) $(CFILES) | compress > fgate$${ver}.tar.Z;\
X	ln fgate$${ver}.tar.Z fgate$${dosver}.taz
X
shar:
X	shar -c -o fidogate -l 50 $(OTHERFILES) $(HFILES) $(CFILES)
X
X
Version:
X	rm -f /tmp/Version.*
X	cd RCS;\
X	find . -name '*,v' -print | sed -e 's/,v$$//' >/tmp/Version.files
X	for f in `cat /tmp/Version.files`; do\
X		ident $$f | grep '$$Id:' >>/tmp/Version.ident;\
X	done
X	echo 'This is FIDOGATE version \c' >Version
X	awk '{ print $$3 }' Version.id >>Version
X	echo '\nVersions of FIDOGATE files:\n' >>Version
X	sed -e 's/\$$//g' /tmp/Version.ident | sort >>Version
X	rm -f /tmp/Version.*
X	
X
clean:
X	rm -f funpack rfmail rfnews fpack fcall rmail msgidseq
X	rm -f *.bak *.o tags
X	rm -f fgate*.tar.Z fgate*.taz
X
depend:
X	@echo '/^# DO NOT/+1,$$d\nw\nq' | ed - Makefile; \
X	echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile; \
X	for i in ${CFILES} ; \
X	do \
X		if [ -r $$i ]; \
X		then \
X			echo "Finding dependences for $$i ... \c"; \
X			for j in `grep '^#[ 	]*include[ 	]*"[^"]*"' < $$i | \
X			sed 's/^#[ 	]*include[ 	]*"\([^"]*\)".*/\1/'`; \
X			do \
X				if [ -r $$j ]; \
X				then \
X					echo "`basename $$i .c`.o: $$j" >> Makefile; \
X				else \
X					echo "`basename $$i .c`.o: ${HEADERS}/$$j" \
X					>> Makefile; \
X				fi; \
X			done; \
X			echo "done."; \
X		else \
X			echo "Can't open $$i." 1>&2; \
X		fi; \
X	done; \
X	echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile; \
X	echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile; \
X	echo '# see make depend above' >> Makefile
X
X
fidogate.h:	config.h packet.h nodelist.h sysexits.h
X	touch fidogate.h
X
X
# DO NOT DELETE THIS LINE -- make depend uses it
# DEPENDENCIES MUST END AT END OF FILE
rfmail.o: fidogate.h
funcs.o: fidogate.h
funcs.o: shuffle.h
rmail.o: fidogate.h
fpack.o: fidogate.h
funpack.o: fidogate.h
nodelist.o: fidogate.h
gethost.o: fidogate.h
address.o: fidogate.h
address.o: shuffle.h
sprintfs.o: fidogate.h
sprintfs.o: shuffle.h
strempty.o: fidogate.h
listscan.o: fidogate.h
xalloc.o: fidogate.h
msgidseq.o: fidogate.h
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above
SHAR_EOF
chmod 0644 Makefile ||
echo 'restore of Makefile failed'
Wc_c="`wc -c < 'Makefile'`"
test 5739 -eq "$Wc_c" ||
	echo 'Makefile: original size 5739, current size' "$Wc_c"
fi
true || echo 'restore of getdate.y failed'
echo End of part 1, continue with part 2
exit 0

--
 _____ _____
|     |___  |   Martin Junius     FIDO:    2:242/6.1   2:242/6.0
| | | |   | |   Republikplatz 3   DOMAIN:  mju@dfv.rwth-aachen.de
|_|_|_|_____|   D-5100 Aachen     Tel. (Voice) 0241-86931

hsu@hutcs.hut.fi (Heikki Suonsivu) (02/04/91)

In article <mj.665054152@suntex> mj@dfv.rwth-aachen.de (Martin Junius) writes:
>The software is based on rfmail 0.3.3, which came over the net one or

Please notice this version is not the "official" rfmail version, but yet
another thread (sigh). It would be very nice if all the people doing fixes
and enchancements for rfmail at least would post diffs to the rfmail
mailing list (rfmail@otax.tky.hut.fi). Also asking whether someone already
is doing this work is a good idea.

>when porting to a system other then XENIX (especially BSD-UNIX). But

BSD support is in rfmail 0.3.9. Don't know if anybody has actually used it,
though. 

Partially my fault, as I haven't posted my versions, I guess..

How to get rfmail 0.3.9:
-------
Rfmail is a program to convert Fidonet mail and echomail to rfc822 mail and
newsgroups. It is not perfect but it works. System V.3 and up and BSD 4.3
have been tested, Xenix and older Unix versions may require couple of nights.

By ftp:
in Europe
ftp nic.funet.fi, 128.214.6.100, directory pub/unix/mail/rfmail.
in USA
ftp ccb.ucsf.edu, 128.218.1.13, Pub/rfmail039.tar.Z

By email:
I can mail it to you if you find no way of ftp'ing it. Try other ideas
first. 

By downloading it with modem:
Call +358-0-8031121, login as guest. All times except European Fidonet ZMH
and about an hour around it is reserved, otherwise login is ok.
Modems supported are V32 and V22bis, MNP 5, I have multitech v32.
Protocols supported are those supported by unix zmodem, ie. zmodem
itself, ymodem and xmodem.
Please notice this number is in Finland and it may be costly call.
Also notice that poor phone line quality may make connection impossible.
Modem may be often reserved for long time. If it is busy for couple of
calls it probably will stay busy for several hours. 

By Fidonet file request:
Not from my system, but try mailing to rfmail@otax.tky.hut.fi.

By uucp:
Not from my system, but try mailing to rfmail@otax.tky.hut.fi.

By normal mail, on floppy:
I can copy it for you on floppy, either 1.2M or 360K. Send me a
mailer, ready with addresses and all so I can just stick it in the
mail. To cover mail expenses, please send me couple of extra floppies.
Rfmail distribution needs either one 1.2M floppy or two 360k floppies.
Please specify if you want ms-dos format or straight unix tar format.
Ms-dos format is better for me but I can do both.

My address is:
Heikki Suonsivu
Kuutamokatu 5 A 7
02210 Espoo
FINLAND

Other possibilities:
Mail rfmail@otax.tky.hut.fi and ask, it may be possible that
someone nearer you already has it. This is preferable specially
if you are in west side of the atlantic, Europe is connected to
US with heavily used slow link.

How to join rfmail mailing list:
Mail owner-rfmail@otax.tky.hut.fi

I post diffs to rfmail in rfmail@otax.tky.hut.fi. 

If you arrange rfmail to be available somehow, please notify me so
that I can add it to this list. Fidonet file request and anynoumous uucp
sites are the most interesting.