1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
From: Joerg Dorchain <joerg@dorchain.net>
Date: Mon, 15 Mar 2004 15:25:55 +0100
Subject: Actually attach faxes to faxmail (Closes: #238136)
diff -Nuar efax-0.9a.orig/fax efax-0.9a/fax
--- efax-0.9a.orig/fax 2004-03-01 22:54:11.000000000 +0100
+++ efax-0.9a/fax 2003-08-15 17:04:47.000000000 +0200
@@ -482,13 +482,15 @@
cat $f
for f in $FILES
do
- echo "--EFAX_MAIL"
- echo "Content-Type: image/tiff; name=\"$f.tiff\""
- echo "Content-Transfer-Encoding: base64"
- echo "Content-Disposition: attachment; filename=\"$f.tiff\""
- echo ""
- $EFIX -M <$f
- # echo "--EFAX_MAIL--"
+ if [ -r $f ] ; then
+ echo "--EFAX_MAIL"
+ echo "Content-Type: image/tiff; name=\"$f.tiff\""
+ echo "Content-Transfer-Encoding: base64"
+ echo "Content-Disposition: attachment; filename=\"$f.tiff\""
+ echo ""
+ $EFIX -M <$f
+ # echo "--EFAX_MAIL--"
+ fi
done
echo "--EFAX_MAIL--"
}
@@ -525,7 +527,10 @@
0)
$RM $f
;;
- 1) FILES=`sed -n -e '/received ->/s/^.*-> \(.*\)$/\1/p' $f`
+ 1)
+# FILES=`sed -n -e '/received ->/s/^.*-> \(.*\)$/\1/p' $f`
+ FILES=`sed -n -e '/wrote /s/^.* wrote \(.*\) as .*$/\1/p' $f`
+
FILES=`echo $FILES`
REMID=`sed -n -e '/remote ID ->/s/^.*-> \(.*\)$/\1/p' \
-e tok -e b -e ':ok' -e q $f`
|