$Id: INSTALL,v 1.10 1997/12/31 05:18:32 nemesis Exp nemesis $

-Information----------------------------------------------------------------
Current working (or at one time working) platforms:

    Linux   - should always work - run it for production services
    SunOS   - should always work - run it for production services
    AIX     - should always work - run it for production services
    HP/UX   - contributed patches
    IRIX    - it compiles, serial device io untested though.
    NetBSD  - contributed patches
    BSDI    - contributed patches
    OSF/1   - contributed patches

There's now a sendpage mailing list:
    echo 'subscribe sendpage' | mail majordomo@cpoint.net
or the old sendpage-hackers list at:
    echo 'subscribe' | mail sendpage-hackers-request@lists.net.ohio-state.edu

Questions, patches, bug reports, etc should go to the mailing list.

Please remember sendpage is still in its alpha testing stage.

The ixo list (ixo@plts.org subscribe at majordomo@plts.org) is a good
place to find out about pagers, other pager software, and changes to
sendpage.  Also the pager FAQ @ ftp://ftp.airnote.net:/pub/paging-info or
http://www.airnote.net/ww/paging.html

TODO is my list of things to add/fix/finish.

-Prequisites---------------------------------------------------------------
Before anything else, if you don't have the Berkeley DB library, go ahead and
follow these instructions.  The "configure" script will die if it can't find
a compatible DB package.

    Download a copy of the latest DB (I put 2.3.14 up on the web
    page, so try http://www.cpoint.net/projects/sendpage/ and also
    http://www.sleepycat.com/db/ )

    Untar/gz inside the sendpage directory.

    Easy to install:
        cd db-2.3.14/build.unix
	../dist/configure --enable-compat185
        make libdb.a
        cp libdb.a db_185.h ../..

    When you run "configure" in the next section, it will try and find
    the library and the header file.

-Information---------------------------------------------------------------
Paging central is the box at the paging company that answers with a modem
and sends out the ID= string.  To use this software, your paging central
needs to speak the PET protocol as defined in "Programmers Guide to Paging
Data Interface Modules" Motorola, 12/88.  You'll need the phone number, the
rate it answers at, and you might need the password.  Normally it will
accept anything for a password.  1200bps seems to be standard.  First
try connecting through your modem to paging central.  It should answer
with an ID= prompt (press CR to activate it).  If you don't get the
ID= prompt, it may be using a different protocol, and sendpage currently
only speaks PET.  Ask your page vendor for details.

-Configuration-------------------------------------------------------------

o
    run "./configure --help" to see various options that can be set
    run "./configure" with any options you want to override

    make sure the queue directory is created and writeable by the uid
    your testing this under (/tmp/pqueue works well)  The default is
    /var/spool/pqueue.

    By default, sendpage expects a "sendpage" user for the queue, and
    to be a member of the "uucp" group for tty locking, with the lock
    directory group-writable by "uucp".

o
    run "make"

    if everything is working correctly, now

    run "make install"
   

o
    You'll need to customize the installed sendpage.cf to your local
    paging central numbers and users.  The sample config file is well
    documented.

o
    start the daemon in debug mode in one window:
        % ./sendpage -d99 -bd

    you should see:
        sendpage: info(6):   daemon started
        sendpage: info(6):   /tmp/sendpage.cf: read 1 aliases, 1 pet
        sendpage: info(6):   begin QueueRun
        sendpage: info(6):   sleeping for 10

    send it a HUP signal, it should reread the config file

        % kill -HUP `cat /tmp/sendpage.pid`

    you should see:
        sendpage: info(6):   /tmp/sendpage.cf: read 1 aliases, 1 pet
        sendpage: info(6):   pause()ing

    HUP     rereads the config file
    USR1    forces a delivery run
    QUIT    graceful exit
    TERM    graceful exit

o
    try sending a page that will fail - you should get an e-mail response,
    and see the daemon window send the mail.

        % echo 'hey' | ./sendpage unknown-user
        Entry queued for delivery

    you should see:

        sendpage: info(6):   begin QueueRun
        sendpage: info(6):   Run: sendpageQ824273128003831: from=maf, size=4, to=unknown-user, status=2, msg=hey 
        sendpage: info(6):   Adding "sendpageQ824273128003831" to error list (unknown-user)
        sendpage: info(6):   i=0, p=sendpageQ824273128003831
        sendpage: info(6):   Mail sent to maf for sendpageQ824273128003831
        sendpage: info(6):   sleeping for 30

o
    try sending a page to the null device.  This should just result
    in an e-mail reply.

    sendpage.cf should have:
        pc      name=test protocol=null maxmsgsize=5

    % echo 'hey' | ./sendpage test
    Entry queued for delivery

    you should see:

        sendpage: info(6):   Run: sendpageQ824273184003831: from=maf, size=19, to=foobar, status=2, msg=maf 2/13 23:46>hey 
        sendpage: info(6):   Adding "sendpageQ824273184003831" to delivery list (12345.test 3)
        sendpage: info(6):   i=3, p=sendpageQ824273184003831
        sendpage: info(6):   defer: q=sendpageQ824273184003831
        sendpage: info(6):   Mail sent to maf for sendpageQ824273184003831
        sendpage: info(6):   sleeping for 30

o
    try sending a page that should not fail.  /etc/sendpage.cf will
    minimally need to have a paging central definition.

    % ./sendpage yourpin.yourcentral
        or if you have an alias
    % ./sendpage youralias

    If this doesn't work, you'll need to look at the debugging output
    of the daemon.  There's also a smaller 'testpet' program that doesn't
    do anything but dial and try to send a message.

o
    Configuring sendmail:

    examples/sendmail/mailer/sendpage.m4 is a sendmail v8 mailer template
    for the sendpage mailer

    examples/sendmail/cf/test.mc is a sample config (pre m4)

    examples/sendmail/cf/obj/test.cf is a sample config file.

    examples/sendmail/sendmail.config.example is a longer explaination of
    what to do for sendmail to work correctly.  This is the one I based my
    sendmail setup after.

    start sendmail in address test mode.  user@page.net.ohio-state.edu
    should resolv to the sendpage mailer.

    % sendmail -bv

    ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
    Enter <ruleset> <address>
    > 3,0 test@page.net.ohio-state.edu
    rewrite: ruleset  3   input: maf @ page . net . ohio-state . edu
    rewrite: ruleset 96   input: maf < @ page . net . ohio-state . edu >
    rewrite: ruleset 96 returns: maf < @ page . net . ohio-state . edu . >
    rewrite: ruleset  3 returns: maf < @ page . net . ohio-state . edu . >
    rewrite: ruleset  0   input: maf < @ page . net . ohio-state . edu . >
    rewrite: ruleset 98   input: maf < @ page . net . ohio-state . edu . >
    rewrite: ruleset 98 returns: maf < @ page . net . ohio-state . edu . >
    rewrite: ruleset  0 returns: $# sendpage $@ : prog $: maf
    >


    add a MX or A record for whatever you called your page gateway.

o

    Please note:

    sendpage needs to run setuid something, NOT setuid root!
    ie. create a dummy user sendpage and have /usr/local/bin/sendpage
    owned by that user, and setuid (chmod 4755) to that user.  The queue
    directory will need to be read/write for user sendpage, and your modem
    device (/dev/ttyb?) will need to be read/write for user sendpage.  Also
    make sure that the sendpage program will have the needed permissions
    to read/write to the lock directory.

    Please do not run sendpage setuid root.  It's not designed, and has
    no need to be run as a "the" priviliged user.


---
