faxspool(1) / faxqueue(5): please comment

Uwe Fuerst (argus@ganymed.phiger.com)
Fri, 4 Mar 1994 10:11:16 +0100


Gert Doering wrote:
> 
> ....
> 
> So, please read the following man pages and send me your comments.
> 
> ::::::::::::::
> faxspool.man
> ::::::::::::::
> 
> faxspool(1)           mgetty+sendfax manual           faxspool(1)
> ....
> 
>        If   "phone-number"   contains   non-numeric   characters,
>        faxspool interprets it as an alias and tries to look it up
>        in /usr/local/lib/mgetty+sendfax/aliases and $HOME/.faxnrs
>        .   These  files  have  a very simple format: one line per
>        alias, alias name first, blank, phone number.
                                  ^^^^^
Just an idea: could you extend this to accept <TAB> (or preferable
              two or more TABs) as well? This would make the files
              a little more readable
> 
>        Access control is handled similar  to  the  way  "crontab"
>        does it: if a file /usr/local/lib/mgetty+sendfax/fax.allow
>        exists, only those users listed in that file (one name per
>        line) may use the fax service. If it does not exist, but a
>        file  /usr/local/lib/mgetty+sendfax/fax.deny  exists,  all
>        users  but  those listed in that file may use faxspool(1),
>        and if neither file exists,  only  root  may  send  faxes.

What happens if both files are there?

> ....
>        -D <destination>
>               Verbose form of the fax's  destination.  Used  only
>               for  informational  purposes, that is, faxq(1) will
>               show it, and faxrunq(1) will put it into the return
>               mail  ("Subject:  your  mail  from ..."). Later, it

Should be              "Subject:  your  fax   to   ...", shouldn't it?
                                        ^^^   ^^
>        -M <file name>
>               Multicasting - read a list of telephone numbers  to
>               send  the fax to from the given file. Do not use in
>               conjunction with "-m".

What format does this file have? Each number in a single line?

> FILES
>        /usr/spool/fax/outgoing/*
>               fax spool directory
> 
>        /usr/local/lib/mgetty+sendfax/aliases
>               global fax alias file
> 
>        $HOME/.faxnrs
>               private fax alias file
> 
>        /usr/local/lib/mgetty+sendfax/fax.allow
>               list of allowed users
> 
>        /usr/local/lib/mgetty+sendfax/fax.deny
>               list of denied users
> 
>        /usr/local/lib/mgetty+sendfax/faxheader
>               fax page header

Well, I'm not very happy with this path values, but I can live
with them. I used to install the whole mgetty/sendfax distribution
from the beginning under /usr/local/lib/fax (the "spool" dirs as
well as the binaries and configuration stuff). This is no problem
since I can easily adapt the settings in "policy.h", but the path
values in the man-pages stay as above. As I already said: I can
live with that, but if you (or someone else :-) have some spare
time, you could add some "sed ..." lines to the Makefile, changing
these path values to the configuration settings...

>        faxspool cannot do time scheduling

Is this on your TODO list? If so, you should think of leaving
it out of the "usage" message one gets when invoking "faxspool"
w/o any parameters, 'till it's implemented

	$ faxspool
	Usage: /usr/local/bin/faxspool [-t time] phone file ...

Otherwise this might be a little confusing for a "standard" user ;-)

>        Multicasting with the -m and -M  options  are  not  imple-
>        mented yet.

<hmpf> :-)

> ::::::::::::::
> faxqueue.man
> ::::::::::::::
> 
> ....
>        pages <file(s)>
>               The file names, relative to the directory where the
>               JOB file is found, that are to be sent  with  send-
>               fax(1). The files have to exist, and be readable by
>               the user that runs faxrunq(1). Required.

Required? We don't have such a file when we spooled a "fax polling"
job, do we?

> PROCESSING
>        While a given JOB file is processed  by  faxrunq(1),  it's
>        locked  against  sending  it  multiple times by temorarily
>        renaming it to JOB.locked,  thus  it  may  happen  that  a
>        faxq(1) command doesn't show this job.

What 'bout adding some lines of code to faxq(1) to show this "locked"
jobs as "currently beeing send" or something like this :-)

>        When  a job is successfully sent, it's not deleted but the
>        JOB file is renamed to JOB.done.  Because of this, you can
>        still  see  old jobs with "faxq -o". You should regularily
>        clean up the outgoing fax directory, removing  old  faxes.
>        If  you  don't  want this behaviour, look into the faxrunq
>        shell script, and remove the comment signs before the code
>        to delete the job files.

One could do this by a cronjob, similar to the "cleantmp" facility,
like
	find <faxspooldir> -atime +<days> -exec rm -f {} \;

(look at "/usr/lib/cleantmp" on SCO systems to get an idea of what
 I mean)

>        When  a  job cannot be sent in five tries, the JOB file is
>        renamed to JOB.suspended.  To re-queue  this  job,  rename
>        the JOB file back and remove all the "Status" lines in it.

This could be done by a yet to be written script faxreq(1) :-)

Great job so far!

Regards,
		Uwe
-- 
Uwe S. ___ # uf@phiger.com            Just my $0.02 (thanks for the bandwidth).
Fuerst <|> # "Ever since DOS Merge became available, Unix became susceptible to
       ~~~ # the ultimate PC virus -- MS-Windows! Virus characteristics: random
           # disk activity,indiscriminate memory usage,slows the system down.."