mj@dfv.rwth-aachen.de (Martin Junius) (05/24/91)
Some time ago, I posted version 2.1 of FIDOGATE to alt.sources. This is a new realease, many things have been improved, a lot of code has been rewritten. Because some people asked for it and diffs would be of the same size, I'm posting the whole thing again. F I D O G A T E ---- Gateway Software UNIX <-> FIDO General Information 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. FIDOGATE assumes that you have both an installed news system and something that gets you access to FIDONET. There is no FIDONET mailer included in this package, it is only a converter between the two mail/news standards. There are some rumors, that there will be a UNIX version of the BinkleyTerm and/or Frontdoor FIDO mailers, but I hadn't come across one yet. 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 05/23/1991 08:05 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 # ------ ---------- ------------------------------------------ # 1346 -rw-r--r-- Version # 49 -rw-r--r-- Version.id # 3549 -rw-r--r-- README # 2727 -rw-r--r-- HISTORY # 7676 -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 # 9690 -rw-r--r-- Areas # 5597 -rw-r--r-- Makefile # 13426 -rw-r--r-- getdate.y # 1722 -rwxr-xr-x frecv.sh # 7440 -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 # 4512 -rw-r--r-- fidogate.h # 36748 -rw-r--r-- rfmail.c # 15896 -rw-r--r-- funcs.c # 14095 -rw-r--r-- rmail.c # 10575 -rw-r--r-- fpack.c # 33958 -rw-r--r-- funpack.c # 17722 -rw-r--r-- nodelist.c # 1592 -rw-r--r-- gethost.c # 9687 -rw-r--r-- address.c # 1670 -rw-r--r-- sprintfs.c # 1919 -rw-r--r-- strempty.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.2 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.7 91/05/19 17:20:37 mj Exp Locker: mj X Id: INSTALL,v 1.2 91/05/22 22:13:21 mj Exp X Id: Makefile,v 1.14 91/05/22 22:13:34 mj Exp X Id: README,v 1.1 91/01/26 15:37:14 mj Exp X Id: Version.id,v 2.2 91/05/22 22:13:56 mj Exp X Id: address.c,v 1.14 91/05/19 17:21:17 mj Exp Locker: mj X Id: config.h,v 1.17 91/05/22 22:14:08 mj Exp X Id: fidogate.h,v 1.10 91/05/07 23:58:10 mj Exp X Id: fpack.c,v 2.4 91/05/21 08:47:41 mj Exp X Id: frecv.sh,v 1.5 91/03/29 18:10:43 mj Exp X Id: funcs.c,v 1.8 91/05/21 08:48:10 mj Exp X Id: funpack.c,v 2.18 91/05/21 09:40:54 mj Exp X Id: gethost.c,v 1.2 90/12/02 21:22:08 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.24 91/05/22 20:13:26 mj Exp X Id: rmail.c,v 1.12 91/05/07 23:59:33 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 1346 -eq "$Wc_c" || echo 'Version: original size 1346, 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.2 91/05/22 22:13:56 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.2 91/05/22 22:13:21 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 REAL_ZONE, REAL_REGION, REAL_NET, REAL_NODE, REAL_POINT X Your _real_ FIDO address X MY_ZONE, MY_REGION, MY_NET, MY_NODE, MY_POINT X Your fakenet FIDO address, if any. This is used for point X systems, e.g. 2:242/6.1's fakenet address is 2:6000/1. X Same as REAL_* for FIDO nodes. X MY_NAME X FIDO system name. (max 19 chars) X o Other systems: X REM_ZONE, REM_REGION, REM_NET, REM_NODE, REM_POINT X FIDO address of your uplink (node system) or boss node X (point system). X ECHOFEED_NET, ECHOFEED_NODE X FIDO address of feed for EchoMail, e.g. uplink or boss node. X X UNIX addresses X o Your system: X MY_HOSTNAME X Internet address, hostname part. X MY_DOMAIN X Internet address, domain part. Use ".uucp" if you don't have X a domain address. X o Other systems: X UUCPFEED X Hostname of system to send mail to. X UUCPFEED_DOMAIN X Domain Adress of UUCPFEED. (Both definitions are used by the X rmail replacement) X o FIDO domain: X FIDODOMAIN X Standard domain for FIDONET addresses. ".fidonet.org" is X the standard, so better leave this alone. X X Configuration: X LOCAL_REPLY_TO X Uncomment this define if you want additional Reply-To headers X in your messages. This enables direct reply to someone on X FIDONET via your gateway. Sample header: X Reply-To: martin_junius%f6.n242.z2@hippo.dfv.rwth-aachen.de X The addressing via `%' makes it easy to route mail via UUCP X realted programs. X ERRORS_TO X Uncomment this define if you want bounced mail send to X root or postmaster or someone else. 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 All spool and lib directories must be located under the X corresponding top-level directory (e.g. /u/spool/fidonet X and /u/lib/fidonet). X X Mail/News programs: X RFMAIL X Full path name of FIDOGATE's rfmail program, normally X "LIBDIR/rfmail". X RNEWS X Full path name of your news receiver, e.g. "/bin/rnews" X RMAIL X Full path name of your mail receiver, e.g. "/bin/rmail". X This may be the installed replacement. X RECVMAIL X Real unix mail receiver, if you've installed the rmail X replacement, e.g. "/bin/ormail". XENIX uses X "/usr/lib/mail/execmail", this is also automatically X recognized in rmail.c X RETURN_FAILED_MAIL X Define this if you want rfmail to return undeliverable X 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, they aren't used X at all, so leave them alone! X X X 2. Edit `Makefile' X X Directories: X NEWSBINDIR X Directory of inews related programs (Cnews' anne.jones etc.). X Used for installation of msgidseq. X LIBDIR X Lib directory for FIDOGATE software, same as define in X config.h. X SPOOLDIR X Spool directory for FIDOGATE software, same as define in X config.h. X RMAILDIR X Directory where rmail is located. (/bin or /usr/bin) X X Owner/Group: X OWNER X GROUP X Owner and group name for user/group id of the installed X FIDOGATE software. rfmail is installed setuid OWNER. X X Compiler: X CC X CFLAGS X LDFLAGS X LIBS X As usual, your C compiler (e.g. cc or gcc), C compile X options, link option and additional libraries (XENIX needs X -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\>`" - 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 via a MSDOS implementation X of UUCP. X X X $Date: 91/05/22 22:13:21 $, 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 7676 -eq "$Wc_c" || echo 'INSTALL: original size 7676, 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.7 91/05/19 17:20:37 mj Exp Locker: mj $ # # Echomail <-> newsgroup conversions. # # area newsgroup distribution # ------------ ---------------------- ------------ 24000.GER fidonet.net24000.ger fidonet 386.GER fidonet.i386.ger fidonet 4DOS fidonet.p4dos fidonet ACAD.CH fidonet.acad.ch fidonet AIDS/ARC fidonet.aids_arc fidonet AMIGA fidonet.amiga fidonet AMIGA.GER fidonet.amiga.ger fidonet AMY_POINT fidonet.amy_point fidonet ANNOUNCE.024 fidonet.announce.r24 fidonet ANTIFA.GER fidonet.antifa.ger fidonet ASIAN_LINK fidonet.asian_link fidonet ASTRONOMIE.GER fidonet.astronomie.ger fidonet ATARI.GER fidonet.atari.ger fidonet ATARIST fidonet.atarist fidonet AUTOCAD fidonet.autocad fidonet AVIATION.GER fidonet.aviation.ger fidonet BASAR fidonet.basar.ger fidonet BASTELECKE_IBM fidonet.bastelecke_ibm fidonet BATPOWER fidonet.batpower fidonet BERLIN fidonet.berlin fidonet BINKLEY fidonet.binkley fidonet BINKLEY.GER fidonet.binkley.ger fidonet BITRIS.GER fidonet.bitris.ger fidonet BNU fidonet.bnu fidonet BOERSE.GER fidonet.boerse.ger fidonet BOOK.GER fidonet.book.ger fidonet BTX.GER fidonet.btx.ger fidonet CCC.GER fidonet.ccc.ger fidonet CDROM fidonet.cdrom fidonet CHAMELEON fidonet.chameleon fidonet CHAUVI.GER fidonet.chauvi.ger fidonet CLIPPER fidonet.clipper fidonet CLIPPER.GER fidonet.clipper.ger fidonet CLONE fidonet.clone fidonet COMMS fidonet.comms fidonet COMMS.GER fidonet.comms.ger fidonet COOKING fidonet.cooking fidonet CPM.GER fidonet.cpm.ger fidonet CXL fidonet.cxl fidonet CYBERSPACE.GER fidonet.cyberspace.ger fidonet C_ECHO fidonet.c_echo fidonet C_ECHO.GER fidonet.c_echo.ger fidonet C_PLUSPLUS fidonet.c_plusplus fidonet C_PLUSPLUS.GER fidonet.c_plusplus.ger fidonet DARC.GER fidonet.darc.ger fidonet DBASE fidonet.dbase fidonet DBASE.GER fidonet.dbase.ger fidonet DBRIDGE fidonet.dbridge fidonet DBRIDGE.GER fidonet.dbridge.ger fidonet DECONONET fidonet.decononet fidonet DEMOCRACY fidonet.democracy fidonet DESQVIEW fidonet.desqview fidonet DEUTSCH fidonet.deutsch fidonet DIRTY_DOZEN fidonet.dirty_dozen fidonet DR_DEBUG fidonet.dr_debug fidonet EBBAUSER.GER fidonet.ebbauser.ger fidonet ECHOPOL fidonet.echopol fidonet EECH fidonet.eech fidonet EMBBS fidonet.embbs fidonet ENET.SOFT fidonet.enet.soft fidonet ENET.SYSOP fidonet.enet.sysop fidonet EURO4 fidonet.euro4 fidonet EUROPUS fidonet.europus fidonet FDECHO fidonet.fdecho fidonet FDECHO.GER fidonet.fdecho.ger fidonet FIDOGUIDE fidonet.fidoguide fidonet FIDOGUIDE.GER fidonet.fidoguide.ger fidonet FLEA.GER fidonet.flea.ger fidonet FN_SYSOP fidonet.fn_sysop fidonet FRANCENET fidonet.francenet fidonet FRAUEN.GER fidonet.frauen.ger fidonet FTSC fidonet.ftsc fidonet GAMING fidonet.gaming fidonet GATE-BAU.GER fidonet.gate-bau.ger fidonet GATEWAYS.GER fidonet.gateways.ger fidonet GAY.GER fidonet.gay.ger fidonet GENEALOGY.EUR fidonet.genealogy.eur fidonet GREEN.029 fidonet.green.n029 fidonet GREENP.GER fidonet.greenp.ger fidonet HARDWARE.GER fidonet.hardware.ger fidonet HDCONF fidonet.hdconf fidonet HST fidonet.hst fidonet HST.GER fidonet.hst.ger fidonet HS_MODEMS fidonet.hs_modems fidonet IBM fidonet.ibm fidonet IBM.GER fidonet.ibm.ger fidonet INTERCOOK fidonet.intercook fidonet INTERNAT.EUR fidonet.internat.eur fidonet INTERUSER fidonet.interuser fidonet INTL.QL fidonet.intl.ql fidonet JOKES.GER fidonet.jokes.ger fidonet KIRCHE.GER fidonet.kirche.ger fidonet KOMMERZ.GER fidonet.kommerz.ger fidonet LADIES.GER fidonet.ladies.ger fidonet LAN fidonet.lan fidonet LAN.GER fidonet.lan.ger fidonet M2AMIGA.AUS fidonet.m2amiga.aus fidonet MACDEV fidonet.macdev fidonet MAGIE.GER fidonet.magie.ger fidonet MAINFRAME fidonet.mainframe fidonet MAUSGAMES fidonet.mausgames fidonet MAUSMATHE fidonet.mausmathe fidonet MEADOW fidonet.meadow fidonet MIDI.GER fidonet.midi.ger fidonet MINIX.GER fidonet.minix.ger fidonet MITFAHR.GER fidonet.mitfahr.ger fidonet MODERATOR.GER fidonet.moderator.ger fidonet MODULA-2.GER fidonet.modula-2.ger fidonet MOVIE.GER fidonet.movie.ger fidonet MSGED_ECHO fidonet.msged_echo fidonet MTASK fidonet.mtask fidonet MUSIC fidonet.music fidonet MUSIK.GER fidonet.musik.ger fidonet NET_DEV fidonet.net_dev fidonet NET_DEV.GER fidonet.net_dev.ger fidonet OECHER fidonet.oecher fidonet OECHER.PRIV fidonet.oecher.priv fidonet OS2.GER fidonet.os2.ger fidonet OSTWEST fidonet.ostwest fidonet PASCAL fidonet.pascal fidonet PASCAL.GER fidonet.pascal.ger fidonet PENPAL fidonet.penpal fidonet PERSYS2 fidonet.persys2 fidonet PGMRS fidonet.pgrms fidonet PGMRS.GER fidonet.pgmrs.ger fidonet PHILO.GER fidonet.philo.ger fidonet PHOTO.GER fidonet.photo.ger fidonet PINBALL.GER fidonet.pinball.ger fidonet POINTS.242 fidonet.points.net242 fidonet POINTS.AC fidonet.points.ac fidonet POLITIK.GER fidonet.politik.ger fidonet QUICKBBS fidonet.quickbbs fidonet QUICKBBS.GER fidonet.quickbbs.ger fidonet QUICKPRO fidonet.quickpro fidonet RA.GER fidonet.ra.ger fidonet RA_HELP.GER fidonet.ra_help.ger fidonet RA_SUPPORT fidonet.ra_support fidonet RA_UTIL fidonet.ra_util fidonet RECHT.GER fidonet.recht.ger fidonet REGCON.EUR fidonet.regcon.eur fidonet REQUEST.GER fidonet.request.ger fidonet RPG.GER fidonet.rpg.ger fidonet SCHROTT fidonet.schrott fidonet SOUNDKARTEN.GER fidonet.soundkarten.ger fidonet SPIELE.GER fidonet.spiele.ger fidonet ST_EMUL.GER fidonet.st_emul.ger fidonet ST_FIDO.GER fidonet.st_fido.ger fidonet SYSOP.242 fidonet.sysop.net242 fidonet SYSOPS.GER fidonet.sysops.ger fidonet TELIX fidonet.telix fidonet TEST fidonet.test fidonet TEX.GER fidonet.tex.ger fidonet TPBOARD fidonet.tpboard fidonet TRAPDOOR fidonet.trapdoor fidonet UMWELT.GER fidonet.umwelt.ger fidonet UNIX fidonet.unix fidonet UNIX.GER fidonet.unix.ger fidonet URTEILE.GER fidonet.urteile.ger fidonet USA_EURLINK fidonet.usa_eurlink fidonet VAX fidonet.vax fidonet VIRUS fidonet.virus fidonet WINDOWS fidonet.windows fidonet WISSEN.GER fidonet.wissen.ger fidonet YUPPIE.GER fidonet.yuppie.ger fidonet # # Subnet # SUB.GENERAL sub.general local SUB.GNU sub.gnu local # # Usenet # ALT.CULTMOVIES alt.cult-movies world ALT.FAN.MONTYPYTHON alt.fan.monty-python world ALT.TV.SIMPSONS alt.tv.simpsons world COMP.LANG.C comp.lang.c world COMP.STD.C comp.std.c world #WINDOWS.MS comp.windows.ms.programmer world REC.ARTS.MOVIES rec.arts.movies world REC.ARTS.MOVIES.REVIEWS rec.arts.movies.reviews world REC.GAMES.HACK rec.games.hack world REC.HUMOR.FUNNY rec.humor.funny world REC.MUSIC.GDEAD rec.music.gdead world # # Usenet linked with FIDONET # WINDOWS.PROG comp.windows.ms.programmer world SHAR_EOF chmod 0644 Areas || echo 'restore of Areas failed' Wc_c="`wc -c < 'Areas'`" test 9690 -eq "$Wc_c" || echo 'Areas: original size 9690, 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.14 91/05/22 22:13:34 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 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 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 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.sh X X ALL = funpack fpack rfmail rmail msgidseq frecv 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 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 X frecv: frecv.sh X sed -e 's+??SPOOL??+$(SPOOLDIR)+g' -e 's+??LIB??+$(LIBDIR)+g' frecv.sh >frecv X chmod +x frecv 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 $(LIBDIR) ]; then\ X echo "Creating $(LIBDIR)";\ X mkdir $(LIBDIR);\ X chown $(OWNER) $(LIBDIR);\ X chgrp $(GROUP) $(LIBDIR);\ X chmod 775 $(SPOOLDIR);\ X fi X @if [ ! -d $(SPOOLDIR) ]; then\ X echo "Creating $(SPOOLDIR)";\ X mkdir $(SPOOLDIR);\ X chown $(OWNER) $(SPOOLDIR);\ X chgrp $(GROUP) $(SPOOLDIR);\ X chmod 775 $(SPOOLDIR);\ X echo "Creating sub dirs $(SPOOLDIRS)";\ X cd $(SPOOLDIR);\ X mkdir $(SPOOLDIRS);\ X chown $(OWNER) $(SPOOLDIRS);\ X chgrp $(GROUP) $(SPOOLDIRS);\ X chmod 775 $(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 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 5597 -eq "$Wc_c" || echo 'Makefile: original size 5597, 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: mj@dfv.rwth-aachen.de |_|_|_|_____| D-5100 Aachen Tel. (Voice) 0241-86931