Difference between revisions of "Spam"
(FaxDispatch Question) |
m |
||
Line 53: | Line 53: | ||
echo "$DICTNOLOGAVAIL." | echo "$DICTNOLOGAVAIL." | ||
fi | fi | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 14:44, 7 February 2013
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.
______________________________________________________________________________________
- Don't want emails
NOTIFY_FAXMASTER="never"
- New name
n=`date +%Y.%m.%d.%H.%M.%S`
- This section will save received faxes to a specified location depending upon
- 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
- New destination
- t=/var/lib/samba/fax/$n
- See interesting information, commands could `2>&1 >>` here too
- set > /tmp/FaxDispatch.log
- make pdf in target
- $TIFF2PDF -o $t.pdf $FILE
- We only copy to the fax location, archive this just in case
/bin/cp $FILE $t.tif
- use this to move it instead, but then there is no archive and if
- a user deletes it from the Samba Share it's gone forever
- /bin/mv $FILE /var/lib/samba/fax
- 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