Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[hylafax-users] Sambafax problems
I'm running RH 7.0 and I've set up sambafax.I'm using LPRnG. I've followed
the directions closely. I can do a sendfax and it works great. Here's the
problem:
From my Win client I print to my Apple Postscript driver, I do a
faxstat -d -i -l -s and I see that the fax made it there but it doesn't fax
and it won't let me remove the job with a faxrm (id).
Here's what faxstat gives me:
Hylafax scheduler on HYLA: Running
Modem ttyS1 (xxx.xxx.xxxx): Running and idle
JID Pri S Owner Number Pages Dials TTS Status
4 127 W lp 95551212 0:0 0:12
Attatched are my smb.conf, sambafax and printcap.Also sambafax is
executable.
I'd really apreciate any ideas. Thanks.
-Andrew
;*******************section global*****************
[global]
netbios name = HYLASMB
workgroup = RESEARCH
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
printing = bsd
printcap name = /etc/printcap
load printers = yes
log file = /var/log/samba-log.%m
lock directory = /var/lock/samba
;*******************section homes*****************
[homes]
path = %H
writeable = yes
valid users = %S
create mode = 0600
directory mode = 0700
locking = no
[recvq]
comment = Fax Receive
browseable = yes
path = /var/spool/fax/recvq
public = yes
writable = no
[printers]
comment = All Printers
;security = server
path = /var/spool/samba
browseable = no
printable = yes
public = yes
writable = no
;create mode = 0700
directory=/tmp
#######################################smb.conf
##############sambafax###/var/spool/fax/bin####
#!/bin/sh
#
# Faxing with HylaFax through a faxprinter
#
# This script is heavily depending (just about copied) from the work of:
# -------------------------------------------------
# Faxfilter für MS-Windows und lpd und mgetty-paket
# Author : Wundrig Roland <roland@cygnus.muc.de>
# -------------------------------------------------
# The intellectual (c) remains with Roland Wundrig
# This rev created by ignace.suy@purpel3.nl, september 2000
# Developed and tested using Hylafax 4.1beta2 On SuSE 6.4.
#
# constants
SENDMAIL="/usr/sbin/sendmail"
# make up a temporary file
FAXFILE=/tmp/sambafax.$$
# retrieve the username and hostname from the paramaters
while :
do
case "$1" in
-n) Username="$2"
shift ; shift
;;
-h) Hostname="$2"
shift ; shift
;;
-*) shift
;;
*) break
esac
done
# if the samba user is anonymous then send mails to the postmaster
if [ "$Username" = "nobody" ];
then
MailTo="postmaster"
else
MailTo=${Username}
fi
# now dump the to-be faxed data (PostScript format) to the temp file
cat >${FAXFILE}
# retrieve the faxnumber from the printfile
FAXNUM=`ps2ascii ${FAXFILE} | awk '{ IGNORECASE=1 } /FAX-Nr ?: ?[0-9-]*/ \
{ $0=$0 "xxx"; \
gsub(/-/,""); \
anfang=match($0,/ ?: ?/); \
anfang=anfang+match(substr($0,anfang),/[0-9]/)-1; \
ende=match(substr($0,anfang),/[^0-9]/)-1; \
printf ("%s",substr($0,anfang,ende)) \
}' `
# if faxnumber is found fax the tempfile
# we do not check the validity of the faxnumber, let sendfax do this...
if [ "${FAXNUM}" = "" ] ; then
(echo "To: ${MailTo}"
echo "From: The HylaFAX Samba dancer <fax>"
echo "Subject: your facsimile request failed"
echo ""
echo "The faxnumber is not recognized in your fax of"
echo `date`
echo ""
echo "The faxnumber is recognised via this text:"
echo " Fax-Nr : ddd-ddddddd"
echo "No spaces or characters are allowed between the digits, just a -"
echo ""
echo "Please correct and retry"
) | 2>&1 $SENDMAIL -ffax -oi ${MailTo}
else
sendfax -n -f ${MailTo} -d ${FAXNUM} ${FAXFILE}
fi
# remove the temp file
rm -f ${FAXFILE}
# end of script ######################################################
###################printcap.local
# printcap.local
# :sh:sf:mx#0:
# This file is included by printconf's generated printcap,
# and can be used to specify custom hand edited printers.
faxlp:\
:lp=/dev/null:\
:sd=/var/spool/lpd:\
:if=/var/spool/fax/bin/sambafax:\
:sh:ff_separator:bkf:mx#0: