I have a problem with my mgetty+sendfax implementation, and was
wondering if anyone has the same problem like I have.
When a certain sender sends me a fax, I see a few errors in the
transmission, resulting in one or more scattered lines/points, wider
than the normal page width. This makes the scaling to look at this
width as the maximum width, and scale everything so it fits a normal
page.
As a result of this, I have the real text in a very small scaled part
of the page (approx 1/10 of the normal size)
Is there anything that can be set as a parameter to avoid calculating
these lines as real data? Is there a way to skip these errors, so they
don't appear and get calculated as real data?
Is there a parameter that can be set so the page isn't scaled anymore?
below my mail-sending appl that gets called when a new fax arrives.
Thanks for helping!!!
mail.module:
-------------------
# MODULE mail
# A function to mail a fax to a user
# The files are attached as MIME-encoded GIF-pictures
#
# Written 1996 by Darko Krizic
#
mail()
{
mailer="/usr/sbin/sendmail -t"
log "mail to $data"
(
# some settings
tmp=/tmp/`basename $0`.$$
bound=Newfax_-${$}${$}
# optionally use the name
if [ -z "$name" ]
then
name=$id
fi
# write the mail
echo "\
Subject: Fax from $name ($pages pages)
From:
(E-Mail Removed) (Fax Subsystem)
To: $data
MIME-Version: 1.0
Content-type: multipart/mixed; boundary=\"$bound\"
--$bound
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
A new fax has arrived
Sender ID: $id
Name: $name
Pages: $pages
"
for file in $*
do
echo $file
g32pbm $file 2>>$log | pnmscale 1 2>>$log | pnmtops
-noturn -dpi=150 2>>$log >> /tmp/mail.module.$$.ps
done
ps2pdf /tmp/mail.module.$$.ps /tmp/mail.module.$$.pdf
2>>$log
echo "--$bound"
page=`echo $file | /usr/bin/awk -F\. '{ printf "%d", $NF }' -`
echo "Content-transfer-encoding: base64"
echo "Content-Disposition: attachment; filename=\"fax.pdf\";"
echo "Content-Type: application/octet-stream;
name=\"fax.pdf\";"
echo
uuenview -b /tmp/mail.module.$$.pdf 2>>$log
"/tmp/mail.module.$$.pdf"
rm -f /tmp/mail.module.$$.ps 2>>$log
rm -f /tmp/mail.module.$$.pdf 2>>$log
echo
echo "--$bound--"
) | tee /var/log/faxmail | $mailer
}
----------------------------
end of mail.module