Hi,
I'm having a little trouble using Mgetty sendfax and Samba together. I've managed to get the recieving part working to a satisfcatory standard (some little strange things going on, but I'll sort that out later), so I have a reasonable understanding of how it all works.
Where I'm struggling is the sendfax part. I've been finding the documentation available a little sparse on explaining what should be going on, but I think I can get it working if somebody could outline the process of interaction between samba and sendfax.
Here's a quick description of what I've done so far:
I've set up a printer in Samba called "fax" set up like so in smb.conf
[Fax]
comment = FAX (mgetty+sendfax)
path = /tmp
writable = yes
public = yes
printable = yes
create mode = 0700
browseable = yes
guest ok = yes
Another amendment I made to the globals section of smb.conf was to add these lines (some of which were already there):
printcap name = /etc/printcap
print command = /usr/bin/lpr -r -P %p %s
lpq command = /usr/bin/lpq -P %p
lprm command = /usr/bin/lprm -P %p %j
Also the instructions I've been following told me to edit /usr/bin/faxspool, but aren't exactly clear what to edit so I did this, starting line 361:
# user name (for authentification)
##########
#New which I was instructed to add to create samba fax server
if [ "$user" = "root" -o "$user" = "fax" -o \
"$user" = "lp" -o "$user" = "daemon" -o "$user" = "bin" ]
# I think I was supposed to remove this line, but as the instructions are not clear I can't be sure
#if user=`logname 2>/dev/null`
then :
else
id=`id`
user=`expr "$id" : "[^( ]*(\([^)]*\)"`
fi
test -z "$user" && user=$LOGNAME
test -z "$user" && user=$USER
Also I was told to add the following to /etc/printcap:
# FAX
lp3|fax:\
:lp=/dev/null:\
:sd=/usr/spool/lp3:\
:if=/etc/mgetty+sendfax/faxfilter:sh:sf:mx#0:\
:lf=/var/spool/fax/fax-log/fax-log:
I had to add some directories and change some bits to make this make sense (redhat 9 doesn't have a /usr/spool/). I think there may be some problems with the line :sd and :if lines, but as I'm not exactly sure what they're doing (though I can guess) I don't know for sure. In all of this I've had to try and guess at filling in the gaps in the documentation, not that I'm blaming it - I've noticed some of it was written some time ago.
This is all based on instructions from samba.org (
http://us2.samba.org/samba/ftp/cvs_c...-features.html) and what I've read in the mgetty+sendfax docs (
http://www.leo.org/~doering/mgetty/).
Some info on my machine:
Modem: 3com/US Robotics Sportster 56k Voice/Faxmodem
OS: RedHat 9 with kernel 2.4.20-19.9
mgetty: 1.1.30
Any help is much appreciated.
Thanks,
~James~