Personal tools
HylaFAX The world's most advanced open source fax server


Revision as of 14:44, 7 February 2013 by Endoit (talk | contribs)
Information and advice by the HylaFAX community

Please bear with me. I am fairly new to Hylafax and, haven’t done any Linux/Unix scripting in a long time. My company has a Hylafax server with 4 analog (dialup) modems. When a fax is received, it is saved as a PDF file to a Windows share for distribution to different departments. This works well for routine faxes. However, some of the faxes we receive are considered urgent and require immediate attention. Keep in mind that we receive between 6500 to 7000 faxes a month! So, when an urgent fax is received, it takes a long time to sort through the shared folder and find it. With that in mind, I have dedicated 1 of the modems to receive urgent faxes only. My next step is to configure the FaxDispatch file to save faxes from this modem to a STAT folder (Windows share). Below, is the FaxDispatch file I intend to use for this purpose. It would be nice to have some more experienced eyes to look at it and let me know if you think it would work. Thanks in advance for your help.


  1. Don't want emails


  1. New name

n=`date +%Y.%m.%d.%H.%M.%S`

  1. This section will save received faxes to a specified location depending upon
  2. which modem received the fax.

case "$DEVICE" in ttyS6) $TIFF2PDF -o $t.pdf $FILE /bin/mv $FILE /var/lib/samba/stat/$n;; ttyS5) $TIFF2PDF -o $t.pdf $FILE /bin/mv $FILE /var/lib/samba/fax/$n;; ttyS4) $TIFF2PDF -o $t.pdf $FILE /bin/mv $FILE /var/lib/samba/fax/$n;; ttyS1) $TIFF2PDF -o $t.pdf $FILE /bin/mv $FILE /var/lib/samba/fax/$n;; esac

  1. New destination
  2. t=/var/lib/samba/fax/$n
  1. See interesting information, commands could `2>&1 >>` here too
  2. set > /tmp/FaxDispatch.log
  1. make pdf in target
  2. $TIFF2PDF -o $t.pdf $FILE
  1. We only copy to the fax location, archive this just in case

/bin/cp $FILE $t.tif

  1. use this to move it instead, but then there is no archive and if
  2. a user deletes it from the Samba Share it's gone forever
  3. /bin/mv $FILE /var/lib/samba/fax
  1. Make infos like faxrcvd

if [ -f log/c$COMMID ]; then $SED -e '/-- data/d' \ -e '/start.*timer/d' -e '/stop.*timer/d' \ -e 's/=/=3D/g' \ log/c$COMMID elif [ -n "$COMMID" ]; then echo "$DICTNOLOGAVAIL ($DICTCOMMID c$COMMID)." else echo "$DICTNOLOGAVAIL." fi

Powered by MediaWiki
Attribution-ShareAlike 2.5

Project hosted by iFAX Solutions