Package: efax
Version: 1:0.9a-19
Severity: wishlist
Tags: Patch

Hello,

I have a script that might be of general interest for inclusion
as an example script.

It sends received faxes as pdf files (instead to multiple single
page tiff files, which is the default)

For usage, put set
NOTIFY='/path/to/faxmailpdf "$REMID" "$f" "$FAXMGR" $FILES | $SENDMAIL -oi 
$FAXMGR'
in /etc/efax.rc

The script depends on libtiff-tools and metamail

Bye,

Joerg


#!/bin/sh

REMID=$1
logf=$2
TO=$3
if [ "$#" -ge 4 ] ; then 
  shift 3
  FILES=`echo $@|cut -d" " -f-"$(($# - 1))"`
fi

echo "To: $TO"
echo "Subject: fax/message from $REMID : $FILES"
echo "Mime-Version: 1.0"
echo "Content-Type: multipart/mixed; boundary=EFAX_MAILPDF"
echo ""
echo "--EFAX_MAILPDF"
echo "Content-Type: text/plain; charset=\"us-ascii\""
echo "Content-Transfer-Encoding: 8bit"
echo ""
cat $logf

if [ -n "$FILES" ] ; then
  echo "--EFAX_MAILPDF"
  echo "Content-Type: application/pdf; name=\"$logf.pdf\""
  echo "Content-Transfer-Encoding: base64"
  echo "Content-Disposition: attachment; filename=\"$logf.pdf\""
  echo ""
  TMPFILE1=`mktemp` 
  TMPFILE2=`mktemp` 
  tiffcp $FILES $TMPFILE1
  tiff2pdf -o $TMPFILE2 $TMPFILE1
  mimencode $TMPFILE2
  rm $TMPFILE2
  rm $TMPFILE1
fi



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to