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: Tiff Attachments are zero bytes



Greg Kelley:
>I am using the following in my faxrcvd:
>
>echo "--$MIMEBOUNDARY"
>echo "Content-Type: Application/Octet-stream;name=\"$FILE\";type=Unknown"
>echo "Content-transfer-encoding: BASE64
>echo "Content-Description: FAX document"
>echo "Content-disposition: attachment; filename=\"$FILE\""
>echo ""
>#  $FAX2PS $FILE 2>/dev/null
>mmencode $FILE 2>/dev/null
>echo ""
>echo "--$MIMEBOUNDARY--"
>
>Attached tiff documents are zero bytes.  Any ideas?  Thanks!

Likely you wanted to say "$BIN/mmencode" instead of just "mmencode".

While we're at it: I didn't modify faxrcvd at all (which saved me a life
during reinstalls). Instead I just set up two new files in $SPOOL/etc:

$SPOOL/etc/FaxDispatch:
--------------------------------------------------------------------------------
# hack alert: modify bin/faxrcvd behaviour: output both PostScript and TIFF
FAX2PS=". $SPOOL/etc/FaxDispatch.local"

# send anything to hmo; change according to taste
case "$SENDER" in
	*) SENDTO=hmo;;
esac
--------------------------------------------------------------------------------

$SPOOL/etc/FaxDispatch.Local
--------------------------------------------------------------------------------
#!/bin/sh -x
# first output PostScript, then MIME boundary, then TIFF
# scale PostScript to A4 paper
$TIFFBIN/fax2ps -S -H11.6929 -W8.26772 $1
echo ""
echo "--$MIMEBOUNDARY"
echo "Content-Type: application/fax"
echo "Content-Description: FAX document"
echo "Content-Transfer-Encoding: base64"
echo "Content-Disposition: inline; filename=\"`basename $1`\""
echo ""
$BIN/mmencode $1
--------------------------------------------------------------------------------

This serves me with both a PostScript (for printing) and a TIFF version
(for viewing) of the received faxes. Feel free to improve.

Helge


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




Project hosted by iFAX Solutions