







                        ix/MBox  R E A D M E
              Bulletin Board System for UNIX(-Derivations)

                          Volker Schuermann
                      Wuppertal, FRG, 25.02.1995 










                          TABLE OF CONTENTS

    PREFACE ......................................................  I

    CREDITS ...................................................... II

    1.  INSTALLATION .............................................  1

    2.  SUPPORTING TOOLS

        2.1.  The NEWS SCANNER (MB-DAEMON) .......................  2
        2.2   The MAILING AGENT (XMD) ............................  3

    3.  ACCOUNTING

        3.1.  The Users DATABASE & SETUP .........................  4

    4.  CONFIGUREABLE FILES

        4.1.  Various Lists ......................................  5
        4.2.  The List of PACKERS/ARCHIVERS ......................  6
        4.3.  The Script for outgoing MAIL (RMAIL.SH) ............  7
        4.4.  The Script for posting NEWS (INEWS.SH) .............  8

    5.  UP-/DOWNLOAD PUBLIC DOMAIN STUFF

        5.1.  Offering PD Boards/Groups ..........................  9
        5.2.  Handling incoming PD Stuff (UPLOAD) ................ 10
        5.3.  Handling incoming PD Stuff (NEWS, UUE) ............. 11  

    6.  ANNOUNCEMENT FILES ....................................... 12

    7.  C PROGRAMMER'S GUIDE ..................................... 13


    
                           APPENDIX

    A.  CONTACT (HOTLINE, MAILING LIST) .......................... 14
    B.  DIRECTORIES with Permissions and Owners .................. 15










    February 25, 1995            - I -                        ix/MBox


                                PREFACE

        It took about a year but has finally happend: The new version
    of the ix/MBox BBS passed all tests and is now on duty.

        The ix/MBox BBS is a Bulletin Board System package for  UNIX!
    It makes intensive use of operating  system  commands  to provide 
    UUCP services,  mail contacts,  standard  transfer  protocols and
    terminal support.

        One  of  the most appreciated  features of the BBS though, is
    the fact that it looks and feels like a MSDOS / PCDOS BBS.  Users
    don't need to learn a new  handling, command  set (which is fully
    reconfigurable, anyway) or even a complete shell language.

	
                                 Volker Schuermann, 25. February 1995





    February 25, 1995           - II -                        ix/MBox

                                CREDITS

        Of course, I wrote nearly all of that  C source code and I've
    done lots of the testing,  but this package is not the result  of
    one guys work.  There were numerous folks involved with the test-
    ing, improving and maintaining the programs. I can't mention them
    all and I might forget someone who gave me essential hints, but I
    would like to name a few.


        - The users of the "Underground Network", Germany

          Those  folks were condemned to be enthusiastic about  every
          new, buggy feature I've implemented.

        - Joerg Guettel, Andreas Laumann and other netlanders

          Especially  the first guy kept me doing changes and improv-
          ments  during the last years.  Andreas and other  guys  out 
          there in the world of networks have  contributed the  ports 
          to various operating system and compilers.   

        - Bruce D. Evans, Fred v. Kempen and Will Rose

          They  made Andrew S. Tanenbaums  MINIX  a serious operating
          system.  I am still working with Bruces' 386er version  and 
          have actually developed the ix/MBox on it.

	- Linus B. Torvalds

          His name does  definitly  belong into  this list of helpful 
          figures.  He provided us with an operating system which can
	  stand up against all the professional & expensive real UNIX
          systems.  Since version 2.0 of the ix/MBox the developement
          has been done under LINUX. 
 
        - Iain Lea, Ian Lance Taylor, Richard Tobin

          They  provided other public domain stuff which gave me deep
          insights into certain aspects of the  UNIX world.  In other 
          words, I copied some of their ideas - be gracious!
 
        - The BSkyB NEWS Presenters of "Live at Five"

          You  are astonished, but their outstanding shows are a very
          amusing  way to improve my english.  Once writing  documen-
          tations was sort of a nightmare!  It's more like hell these
          days ;-)   No, that's not true at all, but now you know who
          to blame for the following scribble!


        Enough is enough! Enjoy this package as much as I've hated it
    from time to time. 

          


    December  6, 1993             - 1 -                       ix/MBox
    

    1.  INSTALLATION 

        Since  you read this, I assume you have managed to unpack the   
    whole stuff,  you do have copied it into a directory and you  are
    in that directory (we'll call it MBOXHOME) now.If you look around
    you  should see three subdirectories, called [./contrib], [./etc]
    and [./src].  Try to bear the names and paths in mind, we'll need
    them pretty often.

        By the way, you should/must be root while handling the  whole
    installation business!


        If  this is NOT the first time you install a ix/MBox BBS, you
    should better leave this now to read   VERY.IMPORTANT   first! It
    might save your old (but still intact) data.

        All others,  change the directory to [./src] and get prepared
    to setup the language files. Type [make], to see what choices are
    offered.  Let's make up the english version, for an example.  You
    have to type [make english], for it.  To check whether everything
    went ok, have a look at the following file:

        [mbox.msg]          should include a bunch of defines



        That's the easy part,  now for the harder stuff.  If you need
    a rest, rest.  We real addicts  instead  will now setup the  main
    configuration file. It's called "mbox.h" and  is  placed right in
    [./src] (we should be there).  Take your favorite text editor and
    start to edit the file - preferably on another terminal.

        What  we are looking for first, are the entries  ORGANIZATION 
    and SYSTEM.  They will build the name of your BBS. Simply  delete
    the old texts and type  in  yours ( in inverted commas ). You now 
    have  to  change the whole bundle of UUCP definitions. Follow the
    hints in the file.

        You'll find that some of the entries I describe in here,  are
    no longer there!  For instance ORGANIZATION is now _ORGANIZATION.
    That fact doesn't matter, but it's a hint of a new feature of the
    BBS: The definitions with leading underscore  ("_")  can be rede-
    fined from within the BBS in later times.

        After that, go to the TMP_GLOBAL defintion.  Check whether if
    it is correct. TMP is correct. Trust me, ix/MBox will create that 
    new directory later on.


        So far, so good.  Comming up now, is a couple  of definitions
    concerning the NEWS system. Whatever  NEWS  version you are using
    the three files NEWS,  NEWSGROUPS and NGROUPS (the real names are
    in the defintions) must be there.  Locate them and update the old
    defintions.

        The EXPIRE stuff, that follows the  NEWS  defintions, needs a
    few seconds to be understood. Take your time, read  the  comments
    and then do the right definitions.  If you are not absolutly sure
    about it, set MAX_PER_NG to a value like 32000.  EXPIRE then will
    never be started.


        By the way, if you do not follow this very keen, you'll get a
    hell of a problem afterwards.  The definitions here will rule all
    of  your  BBSs actions and every not fully understood  definition 
    will crash the whole structure down. Keep in mind that the BBS is
    using your MAIL, NEWS and UUCP system. 


        But no worries at all!  Listen to me and everything will  end 
    sunny side up.  I hope that cheered you up a bit, cause we now go
    over to the MAIL related things.

        There are two kinds of mailers on UNIX systems. Firstly, it's
    the dumb sort,  which forwards  all  undeliverable mail to a file
    called ERRMBOX. It's very simple to work with this mailers,  even
    for you, because you needn't do anything but checking where those
    mails are stored and nameing that place in ERRMBOX.

        It's pretty much harder with  SMAIL  and other more versatile
    MTAs. The problem is, that I don't use one of them and I have  to
    share some informations with you, I've been given by beta testers
    of previous releases. Look at  [./etc/rmail.sh] for more detailed
    hints and read the  documentation  about that file later in  this
    issue.


        As you certainly noticed, I skipped and will skip some of the 
    definitions in the [mbox.h] file. You should have a look at these
    points later on. They are well described inside the file.

        Pretty important though, is the  POSTMASTER  line. Enter  the
    name of a shell account there. But please don't use  [root]. That
    account  has sysop rights automatically.  After that, have a very
    close look at the  GUEST_GID  part of the definitions. Study  the 
    comments there once, twice and again, you have to get that right! 


        The vital changes have been done now. But before we leave the
    configuration file, let's check the paths of  UNIX  commands used
    by the BBS.  There are some groups of definitions with [/usr/bin]
    as a path prefix,  as used in [/usr/bin/compress] at the COMPRESS
    defintion. Search (or let your editor do the searching) for those
    those prefixes and check whether the paths are correct or need to
    be changed.


        There  is still a lot to change left in [mbox.h], but for now
    we should leave it there.  Save the file and do whatever you need
    to do to relax. It will take your undivided attention to  keep up 
    with the next job called ''Operation Makefile''.




        Ten seconds later ... Ohhhh what a refreshing break! Since we
    feel pretty much invigorated now, we can go over to have  a  look
    at the [Makefile].  Ignore anything before the MBOXHOME entry and
    think about where your ix/MBox is located now. If you aren't sure
    about that, simply leave [Makefile] and type [pwd]. The resulting
    path has to be stripped of the suffix  [/src]  and than could  be
    used as MBOXHOME definition. 

        The BBS is now able to find all of it's subdirectories.  That
    is a very, very essential fact, cause otherwise it would create a
    hell  of a mess on your disks.  Bear in mind whenever you  change
    the  MBOXHOME  definition you would have to rebuild at least  the 
    ix/MBox binaries MBOX, XMD, MB-DAEMON.
       

        The following  BIN  definition should point to  [/usr/bin] or
    better [/local/bin] or [/usr/local/bin].  But for testing,  we'll
    use the same definition as in MBOXHOME. Please note,  that you'll
    have to change this after the tests have ended successfully!  The
    fast way of a changing:  Just copy  MBOX, XMD, MB-DAEMON and BLED
    to the regular BIN directory (as mentioned above).

        
        All right, let's look now  at  the compiling related stuff of
    the [Makefile]. Assuming you work with LINUX (that'll be the fact
    for nearly 90% of you), you should search a line which looks like
    this: [# LINUX 0.99.13 ...]

        Delete  every [#] character leading the lines from  [# CC] up
    to the [# STRIP] line. You should get something like that:

        #------------------------------------------------------------
        # LINUX 0.99.13 & GCC 2.3.3
        CC= cc
        LN= ln
        CHMEM= :
        CFLAGS= -O -D_MBOX -DHOME="\"$(MBOXHOME)"\" -D_ANSI \
                -D_BAUDRATE -D_MULTIMEDIA -traditional
        LIB= -ltermcap
        CONVERT= mv a.out $@
        CHOWN= chown $(OWNER)
        CHGRP= chgrp $(GROUP)
        STRIP= strip $@
        #------------------------------------------------------------

        Make  sure that all other entries of that sort have got lead-
    ing [#] in place.  If not, add some.  After that,  we will try to
    struggle our way through the definitions.  First of all,  [CC] is
    the  name of the compiler.  If you use  [gcc], just name it.  The
    linker [LN] should be [ln], so leave that entry as is.

        The [CHMEM] line is used by MINIX only,  so you can ignore it
    totally. [LIB] names a list of libraries that have to be included
    during the compiling session. [CONVERT], [CHOWN] and  [CHGRP] are
    defined  correctly by default, but I'm not sure about [STRIP]. If
    the predefintion causes trouble, it doesn't matter! It will do no
    harm at all! 


        To fill [BLPAGER] and [HELPDIR] is totally up to you.  But we   
    have to talk about [OWNER] and [GROUP]. Those definitions are the
    most discussed misfeature of the ix/MBox since I posted the first
    release in 1991.  The ix/MBox only will work properly if owned by
    [root.root] and even SETUID bit set.

        If you use MAIL,  NEWS and  UUCP, you need some privileges to
    gain access on files of those systems. That's why.

        Don't worry, the BBS won't destroy any data of those systems!
    Even a serious security gap concerning editors with  the  ability
    to offer shell access, has been fixed for this new release.



        Now, there's no way to get away of the "CFLAGS" part.  I left
    that out keenly, cause it'll take time to describe all the points
    there. But anyway, we have to do it!


        The  flag [-D_MBOX] is used to tell some tools that they have
    to perform inside a BBS world.  This flag must be given!  Both of
    the [-D_MINIX] and  [-D_SYS7] flags mustn't be used for LINUX  or
    SVR3 and SVR4 UNIX. But the [-D_LINUX] flag is indeed vital!

        LINUX  should be able to handle filenames longer as  14 char-
    acters, so you might or might not use [-D_LONGNAMES]. I've  never
    tested the long names, so you are in completely uncharted  terri-
    tory when you use them.

        The next couple of flags [-D_ESTDIO] and [-D_CORELEFT] may be
    ignored  but you should think a while about using [-D_DATESTAMP].
    The BBS will produce logfiles containing calls and actions.If you
    want to have date and time added to that logfile as well you have
    to use the [-D_DATESTAMP] option.


        The following [-D_NOINDEX] will affect the online performance
    of the BBS drastically! If you DON'T use that flag, the MB-DAEMON
    has to be run daily (after sorting in NEWS by [cron]). That'll do
    an  update of all the index files of your BBS boards. Those files
    are shown to users everytime they type  [DIR], [INHALT]  or good-
    ness knows what (it depends how you call it in your language).


        The problem is, that a complete update by  MB-DAEMON  takes a
    bit time.  For example, if you have got about 50 MB NEWS articles
    MB-DAEMON will run for up to 30 minutes daily.On big systems with
    500 MB of NEWS, that might cause trouble. 

        As a solution, you may use the  [-D_NOINDEX]  switch. The BBS
    than builds up the index files on single newsgroups.  That means,
    if a user enters the newsgroup  [comp.os.linux.help], for example
    the  BBS  will call  MB-DAEMON to update  the index file for that
    single group. The user has to wait until MB-DAEMON finished.


        I highly recomment NOT to use that flag, because the BBS gets
    a far  better  handling  if the index files are already  uptodate
    when a user hops from group to group.


        Now for some lighter ones. [-D_BAUDRATE] has  to be  used  in
    case you have  at least  one modem port with fixed baudrate. This
    will be fact, if you own a HST, ZyXEL etc. modem (and use it ;-)

        The  [-D_MULTIMEDIA]  flag should be given always to keep  up
    with  the current developments in the world of the MIME and other
    extended mailers. Concerning [-D_CNEWS], you should be a bit cau-
    tious. If you run CNEWS, just set the flag, wait and see ...


        Now than,  if you like to read your BBS related mails with an
    external mailer (ELM, METAMAIL etc.),  you simply have to set the
    [-D_PMCOPY] flag. A fully 8 bit transparency of the ix/MBox could
    be requested by using the [-D_UMLAUT] switch. 

        And here is a switch that specifies the usage of any external
    CHAT program. If it is a  Multiuser/Multiport  kind of thing then
    you  have to set the [-D_HAVE_CHAT] flag. If you use  WRITE, TALK
    or something like PHONE,  you mustn't use the flag.  But you than
    have to tell your users -  in the helpfiles  - that they have  to 
    give the "adversaries" name as an option of the CHAT command.
  
        You are still able to follow this?  All right,  there are two       
    flags  left to discuss.  [-D_ALLTIME] will record any logins ever 
    made on your BBS. That'll give quite a huge file!  Be aware, that
    this file receives data only if  CALLS  ([mbox.h], you remember?)
    runs over.  That means,  it's empty until a couple of users  have
    nipped in!


        Last,  we have a flag and a feature,  which is offered to our
    german sysops, only (at least, at this state of the development)!
    If one of them sets the  [-D_SMALLTALK]  flag, a little chat will 
    be started on any empty line or buggy command entered by a user.



        Believe it or not,  but it's done,  we've got everything pre-
    pared! Save the "Makefile" and take a deep, deep breath ...

        Yes, it's time to do it! Type  [make inst]  and be very, very
    patient! If you haven't made any mistakes  at  all,  it will take
    about  15 minutes (on my 20 MHz 386 AT) to build all the binaries
    and to make up all directories. After that, you may switch to the
    BIN directory (you defined it earlier) and start the  ix/MBox BBS
    the first time: [mbox].


         The BBS will tell you, that it has set up a certain database
    for you. If so, type [mbox] again. If you are "root" and you  are
    NOT  on the terminal defined as PMS_TTY (in [mbox.h]), you are in
    and out in a second. Use the defined terminal and type [mbox] the
    second time.  You should be logged in automagically and  will  be
    prompted for any  BBS command. Type [?] to get a list of commands
    If you get that list, the ix/MBox BBS is now  properly installed!

	 I recommend to have a look a the FAQ file now  -  of  course 
    the rest of this README is indeed very important, but I guess you
    want to see a bit of your new BBS instead of reading more of that
    boring stuff. FAQ will help you getting started pretty quick. 



         In case problems have occured during the compilation session
    you should first have a look at [mbox.h] again. If you there have
    forgotten a single quotation mark, you'll get a whole screen full
    of  complaints  from the compiler. If that's not the problem, you
    would better send a dump of the compiler session to me. Create it
    this way:

        [make inst > c.err 2>&1]

        The file [c.err] is what I need for fixing your problem. Send
    it to one of the addresses named in CONTACT (see below).

        To check you installation you should make use of the  undocu-
    mented ix/MBox command "CHECKIT".  It will check your definitions
    in  the files [defs.h] and [mbox.h]. Also it will have a look  at 
    some of the files in [./etc/list*]. Everytime it tells you that a
    file  is missed,  you should verify the definition or create  the
    lacking file.
         

        So much for the installation. The following chapters will in- 
    form you how to maintain the BBS, how to offer freeware and other
    things of that sort ...





    May,  1, 1994                - 2 -                        ix/MBox

    
    2.  SUPPORTING TOOLS

    2.1.  The NEWS SCANNER (MB-DAEMON)

        On  the one side,  you have a BBS that needs content lists of
    articles collected in boards (i.e. newsgroups). On the other side
    it's a NEWS system,  which records articles  without building any
    index files at all. To create those index files,  MB-DAEMON   was
    made for.

        Type [mb-daemon all -x] to see how MB-DAEMON works.  Normally
    that should give  a list of newsgroups, numbers and subjects. The
    length  of  that lists depends on the number of  articles in your
    NEWS system and on your patience.

        In case you don't see that list,  but a "Can't open ..."  in- 
    stead,  you have to think about your entries in  [mbox.h]  again.
    It's nearly sure, that the   NGROUPS   definition doesn't reflect
    your current  NEWS  installation.  Have a look at the  definition
    NEWS in   [mbox.h],  too.  Don't forget to rebuild  at least  the
    MB-DAEMON binary after changing something.


        Assuming everything works fine you now may add a line to your
    [crontab] (a file, which is regularly checked by [cron]). Tell it
    to start  [mb-daemon all -x]  daily after sorting in new NEWS ar-
    ticles. If your  NEWS  system contains a huge amount of  articles
    this action may take hours. To decrease the execution time, start
    MB-DAEMON without the [-x] flag - since version  2.1 PL10r6  this
    mode will work fine and produce proper index files as well! 

	But keep in mind that you have to run MB-DAEMON at least once
    with [-x]  flag set to install the various index files basically.
    If  new newsgroups are installed,  you have to use the  MB-DAEMON 
    with flag set, too. See the examples in a few lines.

	If you use the  MB-DAEMON  without the "-x" flag you must  be
    aware that the command "THREAD" will not work and for that reason
    must not be offered to the users  -  simply delete the lines  for
    command #490 in [./src/languages/*.cmd]. 


        Of course,  you may run  MB-DAEMON  interactivly from time to
    time. See the following to learn how it works.


        SYNOPSIS:

        mb-daemon                "fast" rebuilding all index files
        mb-daemon all -x         rebuilding all index files
        mb-daemon newsgrp        "fast" rebuilding index of newsgrp
        mb-daemon newsgrp -x     rebuilding index of newsgrp

        NOTE that in this case "fast" means not actually rebuilding
        index files, but only adding new lines for new articles!       
 
        EXAMPLES:

        mb-daemon comp.os        "fast" index building "comp.os.all"
        mb-daemon comp -x        complete index of "comp.all"
        mb-daemon alt.test       "fast" index building of "alt.test"

        Just to remind you: The index files are collected in the sub-
    directory [./lib], of course.




    December  6, 1993            - 3 -                        ix/MBox

    
    2.1.  The MAILING AGENT (XMD)

        The names of ix/MBox BBS users are realnames. If your name is
    Jack Daniels,  you are called  "Jack.Daniels@host.domain"  inside
    the Internet world. Since normal mailing agents can't handle such
    addresses, the BBS needs it's very own agent.

        It's called XMD and works in two different ways. If your reg-
    ular mailer sends all undeliverable mails to  a  certain maildrop
    ERRMBOX, you only have to start  XMD  hourly by [cron].  XMD will
    redirect all mails for BBS users to their BBS maildrops.

        If your mailer is  SMAIL  and you are using the aliases data- 
    base, you have to use XMD different.  Together with other stuff a
    shell script is contributed, that will enter a line for every new
    user of the BBS to the SMAIL aliases database. You will find this
    script in [./etc/alias.sh].

        SYNOPSIS:

        xmd                        scan ERRBOX and mail to BBS users
        xmd User.Name - < txt      send a letter to a BBS user

        EXAMPLES:

        xmd John.Doe - < file      send "file" to John Doe's BBS PM 

        NOTE that the  "-" flag tells  XMD  to expect some input from
    [stdin]. This input has to include a fairly complete mail header!      
    If your  XMD  doesn't deliver any mails at all, send to me either
    the ERRMBOX contents or some "mail" files.   


        To have the ability of redirecting mails from one BBS account
    to another, XMD  checks the file  [./etc/xmd.alias]. This feature
    has  been implemented  to  handle the addresses  of  Mailing-List
    postings. XMD needs the  "To:"  header line to find the  receiver
    of a mail, but Mailing-Lists very often deliver rubbish there.
   




    December  6, 1993            - 4 -                        ix/MBox


    3.  ACCOUNTING

    3.1.  The users DATABASE 

        First of all,  you are  NOT supposed to do anything with both
    of the database files  [./etc/users.*]  but a backup from time to
    time!  The entire maintaining has to be done from inside the BBS!


        Users gain access to their data by using the BBS command #280
    called "SETUP". All choices are well documented there, so there's
    no need to discuss any of the options now.

        For you as a sysop, it's a completely different story though!
    Your key to the whole thing is the command  #129, named  "ADMIN".
    Type in  [admin] and choose  [4] from the list.  You are prompted
    to enter a "UserID" or a "Username".  Type  [1] and press <ENTER>
    to get a list of your very own data. It should read like this:

                   User-ID: 1
                  Username: Administration
                  Password: *****                          
                SH-Account: volkers
                     Alias: sysop
                  Hometown: ???
                    Street: ???
         Telephone (voice): ???
          Telephone (data): ???
             Date of Birth: ??.??.????
                  Terminal: 1
                    Editor: 2
                     Level: 10
                      More: 3
                      Bell: 0
                    Prompt: 2
                     Lines: 25
                 LastLogin: 06.12.1993
                  LastTime: 15:04 
                   Account: 00.00.0000
                    Boards: all
                       SEQ: 1

        While maintaining your BBS, you'll have to change some of the
    data.  Not your own data of course,  but the data of your  users!
    Here are  some  changes  you will have to make very often in  the
    future.  Users tend to forget passwords.  Simply fetch a new  one
    for the user and enter it at the "Password:" line.

        Also very important is the "Level:" entry. There you give  or
    take access rights to/from users.  A list of user levels is given
    by the BBS command #215, called "LEVEL" - surprise, surprise!

        Another demonstration  of  sysop  power is  hidden behind the
    "Account:" line.  If you enter a date here and the user calls  in
    after that day, his/her user level will be decreased. That's part
    of stricter accounting measures,  which you might use to get your
    users paying fees/charges on time. But if you enter  "00.00.0000" 
    instead, the entry will be ignored.

        The last line to be changed is "Boards:".  It contains a list
    of newsgroups the user is  allowed to read. By default, this line
    is filled with NEWS_MINIMUM ([mbox.h]). If a user has permissions
    to read all groups, enter  "all".  Otherwise,  list the names  of
    available newsgroups.



        So far the regular maintainance. Now for some rescue measures
    which might save your database.  If YOU have forgotten your pass-
    word  and there isn't any way to get into the maintaining program
    there is an easy trick to help you out.  Simply change the  level
    of the #125 command in [./src/languages/*.cmd]. Set it to level 0
    and then restart the BBS.  Everybody (including  yourself) is now
    able to use the "admin" command.  Do so and change your password.
    After that,  you should better reset the level for  #125 immedia-
    tely!


        If the database seems to be destroyed, there is no way to get
    it repaired. The one and only thing you can do, is to delete  the
    database files [./etc/users.*] and restart the BBS. It will build
    up a new database for you ... of course, all data is lost!




      
    December  6, 1993            - 5 -                        ix/MBox


    4.  CONFIGUREABLE FILES

    4.1.  Various Lists

        When I developed this BBS, the very goal was to keep it port-
    able and reconfigurable without changing the source code.  That's
    why  there is a large list of files and scripts, containing shell
    commands, external utilities and interfaces to other services.

        Those files are named [./etc/lists.*] and [ ./etc/*.sh].  The
    first  group is, what we are talking about now! How to handle the
    contents of those files, is described there. But what you need to
    know is, that you  HAVE  to edit every single file before you can
    go online with the BBS!





    December  6, 1993            - 6 -                        ix/MBox
        

    4.2.  The List of PACKERS/ARCHIVERS

        We must take a closer look at this certain list, because it's
    a bit more complex as those above (4.1.). 

        Packer         Path                    Cmd    TAR      Suffix
        =============================================================
        Compress       /usr/bin/compress       -b16    +           .Z
        Lharc          /local/bin/lharc        a       -         .lzh


        Most of the stuff needn't be discussed,  but what about "Cmd"
    and "TAR"?  Well, "Cmd", of course,  describes a flag that has to
    be set when running the  "Packer". The "TAR" entry tells  ix/MBox
    whether it has to use [tar], to bundle a list of files,  or  that
    the  "Packer" is able to bundle the stuff. The  EXAMPLES show how
    the BBS will interpret the two entries above.

        EXAMPLES:

	1. Packer Compress

        tar cf 00-00-00.tar *.*
        /usr/bin/compress -b16 00-00-00.tar    ===>    00-00-00.tar.Z


        2. Packer Lharc

        /local/bin/lharc a 00-00-00.lzh *.*    ===>    00-00-00.lzh


        You'll find examples for nearly every packer and archiver  in
    the file. Don't forget that it doesn't make sense to have a bunch
    of brandnew packers, but no user is able to unpack their output.



    December  6, 1993            - 7 -                        ix/MBox


    4.3.  The Script for outgoing MAIL (RMAIL.SH)

        Yes, I know, I'm abusing [rmail] in a way, but it works great
    on fairly all systems!

        The  thing is, that we have  mail  to be sent to a shell user
    on our site or any other site on the net.  The BBS takes the text
    written  by  the sender,  adds a nearly complete header and  then
    hands it over to the  [rmail.sh]  script. It also submits the ad-
    dress of the receiver to that script.

        The  duty of the script is to forward text and address  to  a
    mailer, that is able to reach local (NOT  BBS) users and external
    users. On UNIX systems,  there's no shortage of such mailers.  No
    matter whether you use any kind of [rmail] or [smail] it's always
    the same story. Have a look at  [rmail.sh] for detailed descript-
    ion.




    December  6, 1993            - 8 -                        ix/MBox


    4.4.  The Script for posting NEWS (INEWS.SH)

        Whatever NEWS system you are using, with this script the  BBS
    is able  to  contribute articles. Inside the BBS,  the article is
    made up like any article received from foreign NEWS systems.

        [inews], called by the "inews.sh" script, will check your new
    article  and find out the newsgroup where to post it. There isn't
    any manipulating of the NEWS system by the BBS!

        The  exact syntax is, as always, described in  the file.  See
    your NEWS man pages for details on [inews].




    December  6, 1993            - 9 -                        ix/MBox


    5.  UP-/DOWNLOAD PUBLIC DOMAIN STUFF

    5.1.  Offering PD groups/boards

        You don't like it, I hate it, but those Telecom providers and
    your users love it: Downloading PD/Share-/Freeware stuff. It is a
    matter of fact, so we have to look at it!

        Offering that stuff inside the BBS is quite simple, you won't
    believe it!  Do the following:  Create a few newsgroups with your
    UNIX NEWS system. I suggest to call them  "local.pd.*", where "*"
    stands for "msdos", "unix", "pictures" and so on.

        Start the BBS,  move to one of the groups and type [write] or
    [schreiben], or whatever the command  to  enter a new article is.
    Let's say we want to offer  "tin.tar.Z" in  "local.pd.unix". Make
    the following input:

        Subject: tin.tar.Z 
        Keywords: A great NewsReader (ix/MBox is better, though! ;-))
        Summary:

        Now an editor will be started, and it's up to you to do a bit
    of magic (I use BLED as an editor, therefore the line numbers):

        A0001 BINFILE
        A0002 /var/pd/unix/tin.tar.Z
        A0003

        The  very first line  of  the text has to contain the BINFILE 
    keyword. That's what the BBS needs to recognize  a file including
    any  kind of binary data.  Actual fact is,  that there isn't  any    
    binary code in the text file.   The binaries stay where they have  
    been until now, only the path to that place is stated in the text
    as second line. All trailing lines are skipped.

        After saving and leaving the editor,  the text becomes a NEWS
    article like many others. But try to [read] it! Are you impressed
    or confused?


        If you would have to enter all your PD stuff that way,  it'll
    take weeks. Fortunately, some smart sysops (including myself ;-))
    thought about that and as a result,  a couple of shell scripts is
    available to support you making up PD groups.Scan the [./contrib]
    directory for all the [instpd] files and READMEs.




    February 25, 1995           - 10 -                        ix/MBox


    5.2.  Handling incoming PD stuff (UPLOAD) 

        Managing incoming binaries isn't that easy. The  BBS  will do
    pretty weird things to get rid of those files and problems. First
    of all,  the BBS will recognize binary files correctly,  but than
    it has to store them somewhere, not exactly knowing where!

        Even  more worse,  the BBS doesn't know which name to use for
    the new file - the name might be irregular as a UNIX file name or
    yet used. As a solution of both problems, it builds up names with
    the  prefix  [PD.]  plus a number and puts the whole thing to the
    directory,  the  UNIX NEWS system uses to store  NEWS article for 
    the current newsgroup.

        Don't panic! You DON'T have to check all the groups frequent-
    ly to cope with the flood of incomming stuff!  The BBS is so kind
    to collect all the new stuff in a file.

        But  it gets even better!  That file may be  used as a  shell
    script, to copy PD stuff to the correct directories,  to maintain
    the  belonging articles and to blame the authors for contributing
    commercial stuff. Let's look:

        mv /usr/spool/news/local/pd/misc/PD.746123 /public/pd/crc.lzh
        vi /usr/spool/news/local/pd/misc/5005
        #local.pd.misc   Stefan Willer

        How to read that?  Well, the user "Stefan Willer" has send an
    article containing binary code to the group "local.pd.misc". That
    was easy, wasn't it?  The BBS stored that code in [PD.746123], in
    the directory [/usr/spool/news/local/pd/misc]. 

        You  are supposed to edit the [/public/pd/crc.lzh] entry,  to
    have a regular name and place for future storage. After that, let
    the shell do its work: [sh < pd.script].

        Once more, it's up to you to reedit the path. The script will
    start  an  editor session to get you doing that.  Finish that job 
    and save the file. That's it. Do it weekly and everything will be
    fine.


	If you don't like this version of handling that stuff, have a
   look  at  the file [./etc/list.destinations].  If you HAVEN'T used 
   the compiling flag  -D_CHECK_PD_1ST  the incoming  files  will  be
   sorted in accordingly to the list in the destinations file.



    December  6, 1993            - 11 -                       ix/MBox    


    5.3.  Handling incoming PD stuff (NEWS, UUE) 

        Obtaining  Public Domain stuff is pretty easy ... if you have
    subscribed to certain newsgroups.  Some of them are stuffed  with
    that material. 

        If you are actually in one of those groups inside the BBS and
    you want to get some of the programs, look if they  were  treated
    with [uuendcode]. If so, living is easy for you!  Use  the  [uud]
    command  of the BBS, name the article numbers of the parts of the
    program (mind the order!) and wait ...

        As a result, you'll find the new program in the directory you
    defined as UUINCOMING in [mbox.h].  By default, it's [/tmp] where
    you have to search for the new stuff.

        And  how to get it into the BBS PD area?  Sorry, but that has
    to be done all by yourself. Copy the program to the regular  heap
    of PD stuff.  Than do as described  in  (5.1.) with  "tin.tar.Z".
    I'm  not sure, whether to apologize for that inconcenience  or to
    blame the (yet mentioned) smart sysops for not having contributed
    a supporting script ... shame on us.





    February 25, 1995           - 12 -                       ix/MBox    


    6.  ANNOUNCEMENT FILES

        Everytime a user calls in, the BBS searches for a file called
    [./etc/logo]. If it exists,  it's displayed to the user. It isn't
    supposed to include announcements, but to present your BBS jingle
    or something of that sort.

        To inform your users about BBS matters,  two  different files
    named [./etc/intro] for users  and  [./etc/guests.intro] for your
    guests are offered.

        And we have a third file of that kind. You can put in a brief
    roundup of your systems data at  [./etc/sysinfo].  If you look at
    that file,  you'll see some RTF commands within it. They were in-
    serted by WENDY,  the RTF editor.  You can use those RTF features
    for all of your announcement files. It looks good!
        
        You'll also have to look at the  [./etc/info.*] files.  Those
    are the basement of our new INFO system especially created to get
    beginners started. The sturcture of such an  INFO  file is pretty
    simple.  It's a text file,  where the  FIRST line is shown in the
    INFO menu.



    December  6, 1993            - 13 -                       ix/MBox    


    7.  C PROGRAMMER'S GUIDE

        If  you suffer from the C virus,  you're quite right in here!
    This program is written in C,  but it looks like a combination of
    BASIC and PASCAL coding, expressed in C syntax. I neither want to
    discuss nor improve my style of writing code here, but I like  to
    guide you thru the whole mess ...

        A file CROSSREF contains a list of functions  and files where
    to look for them. That might be helpful on your way from function
    to function.

        All text outputs are stored in  [mbox.msg]. This file is made
    up by [make english] (or any other language). So if you are using
    the  BBS  outputs to locate functions in the code, you first have
    to find that output in "mbox.msg". Afterwards, you can search for
    the define code (things like ADM03_MSG) in the files.

        Much  more interesting though,  is how to implement new  fea-
    tures.  It's simple!  First of all, check  [loop.c]  to see which
    number the latest commands  has  got. I recomment to use  numbers
    bigger 5000, to avoid conflicts with my updates! 

        Let's  say your new feature is called  "preview"  and  offers
    the ability to preview GIF pictures on ASCII terminals.  There is
    no command #5000 yet, so we will use it. Get your editor and look
    at the lines near the end of [loop.c]:

        #ifdef GERMAN_VERSION
            case 590:          /* STOCK / BOERSE */

                boerse( argument );
                break;
        #endif

        >   case 5000:         /* PREVIEW */
        >
        >       preview( argument );
        >       break;

        case 1000:             /* User Defined Command */


        The function  "preview"  forwards the STRING "argument". That
    may contain the number of an article or the name of a file.  It's
    up to you, to tell your users how to use the "preview" command.


        Next file  to look at is  [./src/languages/*.cmd].  There you
    have to prototype the new function:  

        ID  Intern  Extern  Prototype   Command
        ===============================================
        240     6       6       0       Execute
        270     0       0       1       Portinfo
        130     0       0       1       Protocol
        5000    0       0       1       Preview
        5000    0       0       0       Gifview
        250     0       0       1       PM
        210     0       0       1       Read

        As you see,I'd located the new feature behind the old command
    #130. Type [pr] and [pre] to see why!

        For those users, who aren't able to remember commands, I also
    entered  "Gifview". It's not a prototype, so it will not be shown
    as a regular command.


        Time has come to create the preview function itself.  Bear in
    mind to include [mbox.h] and have a look at [defs.h] to see which
    globals are predefined. 

        After it's done,  we have to update the Makefile.  Search for
    MBOX.OBJ there and add "preview.o" at the tail of the list.  Then
    hop  to the very end of Makefile and append the line for your new
    function there as well: "preview.o:     mbox.h defs.h"

        Compile and enjoy! That easy, I told you! There you go .. and
    if your stuff is also useful for me please let me have a copy!






    December  6, 1993            - 14 -                       ix/MBox    



    A.  CONTACT (HOTLINE, MAILING LIST) 


        Yes indeed, there is a  MAILING-LIST  for the ix/MBox. But in
    actual  fact,  I use this list to contribute news letters.  Other
    sysops prefer to use my mail address  to discuss problems. To hit
    all preferences, here is a list of addresses:

        mboxlist@unnet.wupper.de           ==>  the mailing-list
        mbox-request@unnet.wupper.de	   ==>  any requests 
                           
        volkers@unnet.wupper.de            ==>  it's me, hello!
        Volker.Schuermann@unnet.wupper.de  ==>  my BBS account

        Use the  mailing-list  address to contribute your issues  and
    also for subscribing purpose.  Even if you want to get an  update
    of the ix/MBox BBS, use that account.

        For german readers or rich foreign chaps, here are the  phone
    numbers of my BBS in Germany:  

        +49 202 462114     ZyXEL  19.2 kBPS
        +49 202 4660234    ZyXEL  16.8 kBPS

	You also may try to TELNET unnet.wupper.de (193.100.177.73).

        Feel free to mail  me  your thoughts about this package, it's
    features, misfeatures and all problems you have had during making
    up the BBS or while maintaining it. No punishment, promised!






    December  6, 1993            - 15 -                       ix/MBox    



    B.  DIRECTORIES with Permissions and Owners 


    [/usr/bin]

    -rwsr-sr-x  1 root   root     254000 Dec  6 12:09 mbox
    -rwxr-xr-x  1 root   root      34824 Dec  6 16:40 xmd
    -rwsr-sr-x  1 root   root      42420 Dec  6 16:51 mb-daemon
    -rwxr-xr-x  1 root   root      47136 Dec  6 13:21 bled
    -rwxr-xr-x  1 root   root      71712 Dec  6 18:41 wendy


    [~/mbox]

    drwxrwxr-x 10 root   root       2928 Dec  6 17:24 .
    drwxr-xr-x  8 bin    sys         224 Dec  6 12:18 ..
    -rw-r-----  1 root   root       3614 Dec  6 21:27 FAQ
    -rw-r-----  1 root   root       1439 Dec  6 19:56 INSTALL
    -rw-r-----  1 root   root       6749 Dec  6 12:03 MANIFEST
    -rw-r-----  1 root   root       6068 Dec  6 23:35 Press.Kit
    -rw-r-----  1 root   root      35644 Dec  6 16:37 README
    -rw-r-----  1 root   root       3390 Dec  6 21:22 VERY.IMPORTANT
    drwxr-x---  4 root   root        192 Dec  6 23:10 contrib
    drwxrwx---  2 root   root       1072 Dec  6 16:58 etc
    drwxrwx---  3 root   root       8064 Dec  6 11:26 lib
    drwxrwx---  3 root   root       1808 Dec  6 12:18 src
    drwxrwx---  2 root   root        464 Dec  6 11:33 stock
    drwxrwxrwx  2 root   root       1184 Dec  6 16:58 tmp
    drwxrwx--- 28 root   root        464 Dec  6 13:56 usr


    [~/mbox/etc]

    -rw-rw-rw-  1 root   root       6225 Dec  6 11:26 active
    -rw-r--r--  1 root   root       1361 Dec  6 17:33 alias.sh
    -rw-r-----  1 root   root      21520 Dec  6 07:33 all.time
    -rw-r--r--  1 root   root        292 Dec  6  1992 face.put
    -rw-r--r--  1 root   root        608 Dec  6 21:46 guests.intro
    -rw-r--r--  1 root   root        462 Dec  6 15:57 header
    -rw-r--r--  1 root   root       1021 Dec  6 18:45 inews.sh
    -rw-r--r--  1 root   root        242 Dec  6 21:45 intro
    -rw-r--r--  1 root   root       6737 Dec  6 18:47 know.better
    -rw-r-----  1 root   root        966 Dec  6 11:55 list.editors
    -rw-r--r--  1 root   root        922 Dec  6 11:56 list.games
    -rw-r--r--  1 root   root       1418 Dec  6 13:12 list.packers
    -rw-r--r--  1 root   root       1561 Dec  6 11:56 list.udc
    -rw-rw----  1 root   root         80 Dec  6 16:53 log.alltime
    -rw-r--r--  1 root   root      24080 Dec  6 16:53 log.calls
    -rw-rw-rw-  1 root   root      11325 Dec  6 05:04 log.mbd
    -rw-rw----  1 root   root      23881 Dec  6 16:56 log.pd
    -rw-rw-rw-  1 root   root      10928 Dec  6 13:54 log.reflector
    -rw-r--r--  1 root   root        359 Dec  6 19:01 logo
    -rw-r-----  1 root   root          6 Dec  6 16:53 mbox.seq
    -rwxr-xr-x  1 root   root      22560 Dec  6 13:21 mbrsh
    -rw-r-----  1 root   root       5818 Dec  6 10:31 pd.script
    -rw-r--r--  1 root   root       1409 Dec  6 16:37 rmail.sh
    -rw-r--r--  1 root   root       1225 Dec  6 13:31 sysinfo
    -rw-r--r--  1 root   root       3876 Dec  6 18:50 timezones
    -rwxr-x---  1 root   root         21 Dec  6 18:15 tset
    -rw-r--r--  1 root   root     113988 Dec  6 16:58 users.data
    -rw-r--r--  1 root   root          4 Dec  6 22:06 users.seq
    -rw-r--r--  1 root   root       1618 Dec  6 18:50 xmd.alias


    [~/mbox/lib] & [~/mbox/lib/.thread]

    drwxr-xr-x  2 root   root       3184 Dec  6 04:35 .thread
    -rw-rw-rw-  1 root   root      20960 Dec  6 11:24 al1.supermodel
    -rw-rw-rw-  1 root   root      25440 Dec  6 04:34 co13tcp-ip.ibm
    -rw-rw-rw-  1 root   root       2160 Dec  6 04:31 comp.os.linux
    -rw-rw-rw-  1 root   root       1360 Dec  6 04:35 de.admin.lists
    -rw-rw-rw-  1 root   root      31040 Dec  6 04:59 junk
    -rw-rw-rw-  1 root   root       5120 Dec  6 05:02 local.pd.unix
    -rw-rw-rw-  1 root   root      29360 Dec  6 05:02 local.talk
    -rw-rw-rw-  1 root   root      22880 Dec  6 02:23 re5io.shortwav


    [~/mbox/usr]

    drwxrwxrwx 24 root   root        400 Dec  6 20:25 A
    drwxrwxrwx  7 root   root        112 Dec  6 12:05 B
    drwxrwxrwx 14 root   root        224 Dec  6 00:29 C

 
    [~/mbox/usr/A]

    drwxrwxrwx  2 root   root        256 Dec  6 12:02 2
    drwxrwxrwx  2 root   root        176 Dec  6 12:02 165
    drwxrwxrwx  2 root   root        128 Dec  6 12:02 281


    [~/mbox/usr/A/165]

    -rw-r-----  1 root   root       2541 Dec  6 05:41 .active
    -rw-rw----  1 root   root       6361 Dec  6 05:41 .active.all
    -rw-r-----  1 root   root          0 Dec  6 11:48 .hello
    -rw-r-----  1 root   root        317 Dec  6 11:48 .lastletter
    -rw-r-----  1 root   root          7 Dec  6 11:48 .lastsubject
    -rw-r-----  1 root   root        282 Dec  6 11:48 .makro
    -rw-r-----  1 root   root        266 Dec  6 11:48 .signature
    -rw-r-----  1 root   root         99 Dec  6 11:48 904
    -rw-rw----  1 root   root        691 Dec  6 11:48 940
    -rw-rw----  1 root   root       1263 Dec  6 11:48 941
    -rw-r-----  1 root   root        319 Dec  6 11:48 INDEX
    -rw-r-----  1 root   root          4 Dec  6 11:48 seq


    NOTE: Do also have a look at MANIFEST!
          That file is probably more uptodate!
