"Fossies" - the Fresh Open Source Software Archive

Member "sendpage-1.001001/README" (3 Jan 2008, 14190 Bytes) of package /linux/privat/old/sendpage-1.001001.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 Sendpage
    2 
    3 What this tool does
    4 -------------------
    5 Sendpage is designed to speak SNPP on one end and TAP (or UCP) on the
    6 other.  It gets pages from the network via SNPP, and then uses a modem
    7 or a direct serial connection to deliver the pages to a Paging Central
    8 (or "paging terminal").  Sendpage requires, for modem use, that you know
    9 your PC's access number (which is not usually advertised by your paging
   10 provider), and you need to know the PINs of the pagers you want to deliver
   11 pages to.  All of this information is known by your paging provider.
   12 If you ARE a paging provider, your job is much easier.  ;)
   13 
   14 Quick Start (for RPM-based Linux distro)
   15 ----------------------------------------
   16 Why are you reading this README?  Just run "rpmbuild -ta inkscape-*.tar.gz"
   17 There is a .spec file included for easy building.  :)  I've only tested it
   18 on SuSE 9.2, so please send me patches if you uncover problems with other
   19 distros.
   20 
   21 Quick Start (for non-RPM Linux distro)
   22 --------------------------------------
   23 
   24    Requirements.
   25 
   26 	- Net::SNPP (part of the libnet Perl module bundle)
   27 	- Device::SerialPort version 1.02+  (or Win32::SerialPort, untested)
   28 	- MailTools (provides Mail::Send)
   29 
   30    Installation.
   31 
   32 	- run the following commands:
   33 
   34 		perl Makefile.PL
   35 		make
   36 		make install
   37 
   38 	- copy 'sendpage.cf' into /etc, and edit to your needs
   39 	- copy 'email2page.conf' into /etc, and edit to your needs
   40 	- copy 'snpp.conf' into /etc, and edit to your needs
   41 	- if you use SysV-style init scripts, you can use "sendpage.init"
   42 	  to start and stop sendpage.  Copy it to where you keep your rc
   43 	  files.
   44 	- create the user "sendpage"
   45 	- figure out which group ID can write to your locks directory
   46 	  (usually "uucp" can write in "/var/lock")
   47 	- figure out which group ID can write to your modem device
   48 	  (usually "tty" can write to "/dev/ttyS0")
   49 	- make the queue area:
   50 
   51 		mkdir -p /var/spool/sendpage
   52 		chown sendpage /var/spool/sendpage
   53 		chmod og-rwx /var/spool/sendpage
   54 
   55 	- start the sendpage daemon as the root user (it will change
   56 	  user id to 'sendpage'):
   57 
   58 		sendpage -bd
   59 
   60 	- go check your /var/log/messages for the syslog line saying
   61 	  that sendpage started up:
   62 
   63 		starting Queue Manager and SNPP listener (sendpage vX.X.X)
   64 
   65 	- you can also use the "sendpage.init" file for SysV-style init
   66 	  script control.	
   67 	- make sure you have an entry in /etc/services for "snpp", which
   68 	  should be port 444.
   69 
   70    Sending a page.
   71 
   72 	- run the "snpp" command to send yourself a test page:
   73 
   74 		snpp -d -f me@yourdomain.org -m 'hi there!' yourPIN@yourPC
   75 
   76 	- if you want to write pages directly to the paging queue instead of
   77 	  using SNPP, you can use "sendpage" itself, but you must be root:
   78 
   79 		sendpage -f me@place.org -m 'hello again!' yourPIN@yourPC
   80 
   81 	  the sendpage daemon must be running for this to actually be delivered.
   82 
   83 	
   84 
   85 Long Version
   86 ------------
   87 Sendpage (the C program) was originally written in 1995 almost entirely
   88 by Mark Fullmer.  Version "7" was when I became aware of it picked up
   89 the code, since Mark didn't want to maintain it any more.  I developed
   90 a "configure" script to make compiling easier, started working on merging
   91 some features that other people had written, and stomping out a few bugs.
   92 I released a series called "0.8", which still had a bunch of problems,
   93 but seemed to mostly work for most people.  Then after not looking at the C
   94 code for about a year, it was getting rather dusty.  I was about to
   95 work on porting it up to RedHat 6.1 and realized it would be easier to
   96 redesign it from scratch.  I decided to use Perl because of all the great
   97 modules I could use to help me get my job done.  And then I could spread
   98 the blame around when things didn't work right.  ;)
   99 
  100 And at this point I'd like to apologize here for my sloppy Perl modules.
  101 I was new to writing *modules* under Perl, so I fear that I've violated
  102 module and CPAN specs left and right.  I will try to correct any of these
  103 problems as I learn about them.  My final goal is to produce a set of
  104 modules that would be useful to any other packages that need to send
  105 pages directly, and could be installed via CPAN. 
  106 
  107 To get it started you'll need the following Perl modules installed:
  108 
  109 	- a serial port module.  Either
  110 		Device::SerialPort (for POSIX (unix))
  111 			-or-
  112 		Win32::SerialPort (for Windoze)
  113 	- Mail::MailTools
  114 	- Net::SNPP
  115 
  116 You can get these from http://cpan.perl.org/
  117 
  118 Now, build sendpage itself.  Right now, just do:
  119 	cd sendpage-X.X.X
  120 	perl Makefile.PL
  121 	make
  122 	make install
  123 
  124 to install this package.  The important man page (sendpage's) is done.
  125 The others are mostly just overviews.  I need to finish those.  If you
  126 want to put the files somewhere besides where Perl wants to put them,
  127 you can always create the Makefile is "perl Makefile.PL PREFIX=/usr/local"
  128 or where ever you want the files to be forced to go.
  129 
  130 Make sure you create a sendpage user, and identify the group who has
  131 write access to /var/lock, and the group who has write access to your
  132 modem device.
  133 
  134 Once that's working, take a look at "sendpage.cf", and configure it
  135 for your modem, paging central, etc.  Turn on the debugging if you're
  136 interested.  Note that "sendpage.cf" needs to live in /etc, or where ever
  137 you run "sendpage -C" with.  Please note, that you can safely ignore any
  138 "Attempt to free unreferenced scalar." messages you get while shutting
  139 down sendpage if you have debugging turned on.  This is just Perl
  140 complaining about the paging centrals for some reason.  Hopefully these
  141 should be gone now.
  142 
  143 Install and edit the "email2page.conf" file for the email-to-page
  144 converting tool.  Documentation is in the conf file for that one right now.
  145 
  146 Install and edit the "snpp.conf" file for the snpp's default
  147 server.  Documentation is in the conf file for that one right now.
  148 
  149 Now there is the "sendpage" daemon itself.  Run (as root) the command:
  150 	sendpage -bd
  151 to start up the daemon mode.  (Make sure that "sendpage" is in the PATH
  152 for the root user.)  The SNPP server connections and Paging Centrals will
  153 lose root privs when the fork, so that should be safe.  "sendpage -bs" will
  154 stop sendpage.  The file "sendpage.init" has been included to run it as a
  155 SysV-style init script, which takes "start" and "stop" arguments.  This
  156 script assumes that sendpage is installed in /usr/bin, so be sure to
  157 change it if you need to.
  158 
  159 To put a page into the queue, run "snpp RECIP" where RECIP is either a 
  160 valid alias "recip" section in /etc/sendpage.cf, or has the form PIN@PC,
  161 where the PC is a valid "pc" section in /etc/sendpage.cf.  It will deliver
  162 directly to the named PIN.  "snpp" will read from STDIN for the message,
  163 unless you use the '-m' flag.  To use "snpp" from other networked machines,
  164 you'll need to edit sendpage.cf to bind snpp to "0.0.0.0" or some other
  165 network interface, and then use "snpp -s SERVER" from the remote client.
  166 Be sure to read and set at least one "snpp-acl" line so that your remote
  167 machine will have permission to connect to the SNPP server.
  168 
  169 To force a queue run immediately, run (as root) "sendpage -q".  If you have
  170 debugging turned on, it should be flooding your syslog with lots of fun
  171 information while delivering the pages.
  172 
  173 Look in the "docs" and "examples" directories for various misc information
  174 files, including the TAP specifications, the SNPP RFC, and a list of
  175 the known paging centrals in the file "PagingCentrals.txt".  See if the
  176 PCs for your area are listed.  If not, and you locate them, you should
  177 email them to me, and I'll update this list.  There is also a searchable
  178 database of these available at the website below.  For an example
  179 of how to set up sendpage as an email gateway, read "sendmail.txt".
  180 For an example of how to make a web page to send pages, look at the
  181 "sendpage.php" PHP script.  Also in this directory is the beginnings of
  182 my official "Sendpage Manual" in LyX format.
  183 
  184 Logging
  185 -------
  186 
  187 By default, sendpage uses syslog facility "daemon" to do it's reporting,
  188 with all messages set to "info" or higher.  This should be seen by any
  189 sanely configured syslog daemon.
  190 
  191 For myself, I wanted to keep my sendpage syslogs out of my general syslog
  192 file ("/var/log/messages"), and I wanted debugging to be reported at
  193 the syslog level "debug".  I changed the facility to "local6", and the
  194 minimum level to "debug" with the following lines in my sendpage.cf:
  195 
  196 syslog-facility = local6
  197 syslog-minlevel = debug
  198 
  199 and changed my /etc/syslog.conf looks like this:
  200 
  201 *.info;mail.none;news.none;authpriv.none;local6.none  /var/log/messages 
  202 
  203 local6.*                                              /var/log/sendpage
  204 local6.=debug                                         /var/log/sendpage.debug
  205 local6.info                                           /var/log/sendpage.info 
  206 
  207 This way "messages" doesn't get anything from "local6" (sendpage), and I  
  208 can watch the sendpage output in three ways: either everything going to  
  209 local6 ("/var/log/sendpage"), JUST the stuff *at* the "debug" level
  210 ("/var/log/sendpage.debug"), or everything "info" and higher
  211 ("/var/log/sendpage.info").
  212 
  213 
  214 Compatibility
  215 -------------
  216 Linux:	  This tool (and Device::SerialPort) was written and tested under
  217 	  Linux.  There really shouldn't be any compatibility issues under
  218 	  Linux.
  219 
  220 Solaris:  Some headers under Solaris don't behave very well, so I had
  221 	  to define "__sparc" explicitly in my patch to Device::SerialPort.
  222 	  Also, under Solaris, many of the "make test" tests for
  223 	  Device::SerialPort seem to hang and/or fail.  Most of these
  224 	  seem safe to ignore as far as using sendpage with Device::SerialPort,
  225 	  as the test failures seem to be with timings and/or flushes.
  226 	  Most of that is unreliable anyway under Linux, so sendpage has
  227 	  already worked around these bugs.
  228 
  229 	  From the following URL:
  230 	  http://www.stokely.com/unix.serial.port.resources/tutorials.html
  231 
  232 		DTR Delay Problems: By default, Suns have a three second
  233 		delay in toggling dtr. If your Sun has a zs serial port you
  234 		can set the variable default_dtrlow to control the number of
  235 		seconds of the delay. If the variable is set to zero, dtr
  236 		can be toggled many times a second. For example, in
  237 		/etc/system add the line "set zs:default_dtrlow=1" to have
  238 		a 1 second delay.  
  239 
  240 		If your workstation has an se serial port, the /etc/system
  241 		line should be "set se:se_default_dtrlow = 1". However, in
  242 		initial versions of the se driver, the delay was the value
  243 		of (se_default_dtrlow + 1) seconds. If you have this version
  244 		of the se driver, don't set the value to -1 in /etc/system or
  245 		the port will hang on open. If you need to toggle dtr quickly,
  246 		you can still set the value to -1 after the terminal is
  247 		opened by using adb to set the variable manually.
  248 
  249 		All this is Sun bugid 4230310, fixed by patch 105924-09 or
  250 		higher. The patch makes se_default_dtrlow behave like
  251 		default_dtrlow (i.e. setting se_default_dtrlow to 0 will allow
  252 		rapid toggling of dtr instead of once per second). 
  253 
  254 	  So, since I have zs serial ports on my Sun, I added the line:
  255 
  256 		set zs:default_dtrlow=0
  257 
  258 	  so I could toggle the DTR rapidly.
  259 
  260 	  Also, I've seen trouble using Syslog correctly under Solaris.
  261 	  Once again, this appears to be Perl's fault.  If it breaks
  262 	  ("Your vendor has not defined the Sys::Syslog macro _PATH_LOG")
  263 	  then just edit KeesLog.pm and remove the calls to "setlogsock".
  264 
  265 AIX:	  Tested with 4.3.2, and works fine, some modem lines don't work.
  266 
  267 *BSD:     Tested.  Carrier detection works after Sendpage 0.9.13.
  268 
  269 HPUX:	  Untested so far...
  270 
  271 SCO7:     Install notes from Pat Gunn:
  272 
  273           Removed system perl first (MUST happen before installing skunkperl
  274           or perl will become messed up)
  275 
  276           Then installed skunkperl from skunkware
  277           (stage.caldera.com/uw7/Packages/)
  278         
  279           Used CPAN module to upgrade prerequisites (didn't allow it to
  280           rebuild Perl itself. I have GCC and other gnu tools installed)
  281 
  282           Installed Device::Serialport (after these mods, it might work through
  283           CPAN, but you're better off doing it by hand so you can troubleshoot
  284           problems more easily)
  285 
  286           Installed sendpage.
  287 
  288           Created sendpage user, created /var/lock, set its group to uucp and
  289           changed its mode to 775, created sendpage spool directory, configured
  290           sendpage.conf and snpp.conf. Note that syslog does not appear to work
  291           with sendpage's logging component, so it's probably better to log to
  292           stderr. Change snpp.conf accordingly. It might be possible to fix
  293           this with some tinkering, but I'm not interested enough to take the
  294           time.
  295 
  296           The modem device on my system (serial port A) is /dev/term/00m,
  297           although I made a symlink to there from /dev/modem, and put
  298           /dev/modem in the configfile.
  299 
  300 
  301 Porting Device::SerialPort
  302 --------------------------
  303 If you're trying to get Device::SerialPort to work on an untested platform,
  304 please take a look at "configure.ac" for the list of files being included.
  305 Basically, SerialPort.pm needs the following constants from .h files to
  306 operate correctly:
  307 
  308 Must have these:
  309 	TIOCM_RTS
  310 	TIOCM_DTR
  311 	TIOCMBIS
  312 	TIOCMBIC
  313 	TIOCMGET
  314 
  315 Optional: I have only found these on OpenBSD (and are required for OpenBSD):
  316 	TIOCSDTR
  317 	TIOCCDTR
  318 
  319 Optional: I have only found *both* of these under Linux:
  320 	TIOCINQ
  321 	TIOCOUTQ
  322 
  323 Optional: I have only found this one under Linux:
  324 	TIOCSERGETLSR
  325 
  326 Once you get SerialPort.pm running happily (you can set $DEBUG=1
  327 near the top), try modifying (from the sendpage package) the script
  328 "modemtest" in the "examples" directory to use your serial port with
  329 a modem attached.  This script will try to examine all the possible
  330 settings for your vendor's serial port, and will try to talk to the
  331 modem using Device::SerialPort.  If you can get this script talking to
  332 the modem, sendpage should operate just fine.
  333 
  334 
  335 Misc
  336 ----
  337 The TODO file lists a large number of things I still want to have done.
  338 
  339 For further information, check out the sendpage web site at:
  340 	http://sendpage.org/
  341 
  342 For CVS updates, check out the sourceforge project at:
  343 	http://sourceforge.net/projects/sendpage
  344 
  345 
  346 
  347 Thanks for using sendpage!
  348 
  349 
  350 -Kees Cook
  351  kees@outflux.net
  352 
  353 # $Id: README 183 2005-02-24 01:21:07Z nemies $