HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

[hylafax-users] Re: faxrcvd proplem





allen@gist.net.au said:
> I am running the 
> latest Mandrake 7.1 Linux release, with hylafax 4.0pl2.rjc11 ( that is
> the  package name)

> I have got it set up, and working to the point that I can send and
> receive  faxes with no problem.

> when receiving faxes the bin/faxrcvd program runs, and emails messages
> etc  etc. - It is set up to also print the faxes, however it does not.
> Now, before  we say the script is wrong, lets look at what is
> happening.

> I have added the uucp user to the lp grooup.

> If I su - uucp, then go to the /var/spool/fax dir, and execute 

>  bin/faxrcvd "recvq/fax00016.tif" "ttyS1" "00000122" ""

> (which is what log/c00000122 shows as the command that was run)

> the fax in question prints fine. HOWEVER, when this faxrcvd program is
> run by  hylafax upon receipt of fax, it runs the faxrcvd script, sends
> the emails, but  does not print.


I fixed this problem by running the following script every 15 minutes via cron

included are the 2 scripts required. (check all variables before running these)


 --start script /usr/local/bin/cronfax
 #!/bin/bash
 # cronfax - print hylafax faxes from crontab
 # GPL - Allen Bolderoff <allen@gist.net.au>
 # This script calls /usr/local/bin/printfaxes wwith all faxes received in 
 # last 2-15 minutes.

 # call this as a user with access to /var/spool/fax/ from crontab with the 
format
 # */15 * * * /usr/local/bin/cronfax 
 # This will execute every 15 minutes. 
 BASEDIR=/var/spool/fax

 # find all files that have appeared in the last 15 minutes, 
 # but not in the last 1 minute 
 # (to stop it from trying to print file that is still incoming)
 find $BASEDIR/recvq -name "fax*" -mmin -15 -mmin +1 -exec 
/usr/local/bin/printfaxes \{\} \;


 --endscript

 --startscript /usr/local/bin/printfaxes
 #!/bin/bash
 # printfaxes - needed by cronfax
 # GPL - Allen Bolderoff <allen@gist.net.au>
 #print the fax
 /usr/bin/tiff2ps -a1 $1 | /usr/bin/lpr -Plp

 # touch the file to make it older than 16 minutes. (to stop repeated 
printings)
 /bin/touch -d -16min $1


-- endscript
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Allen Bolderoff <allen@gist.net.au>
LNC -  Linux, help and commentary http://linux.netnerve.com
CTPC - Caffeine - get it here: http://www.coffee-tea-pots-cups.com/
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
GPG fingerprint = CBB0 8626 702C 3D01 B5AD  A54A DC2C 93B7 3E4B 6472
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Allen Bolderoff <allen@gist.net.au>
LNC -  Linux, help and commentary http://linux.netnerve.com
CTPC - Caffeine - get it here: http://www.coffee-tea-pots-cups.com/
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
GPG fingerprint = CBB0 8626 702C 3D01 B5AD  A54A DC2C 93B7 3E4B 6472
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Allen Bolderoff <allen@gist.net.au>
LNC -  Linux, help and commentary http://linux.netnerve.com
CTPC - Caffeine - get it here: http://www.coffee-tea-pots-cups.com/
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
GPG fingerprint = CBB0 8626 702C 3D01 B5AD  A54A DC2C 93B7 3E4B 6472
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




____________________ HylaFAX(tm) Users Mailing List _______________________
 To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null




Project hosted by iFAX Solutions