Networking Forums

Networking Forums > Computer Networking > Linux Networking > mgetty+sendfax mail.module: Mal-scaling due to errors in transmission

Reply
Thread Tools Display Modes

mgetty+sendfax mail.module: Mal-scaling due to errors in transmission

 
 
bkortleven
Guest
Posts: n/a

 
      06-12-2006, 02:45 PM
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection speed issues - Window Scaling ? Jim.J Windows Networking 0 02-11-2008 10:02 PM
TCP Window Scaling not happening -sometimes- Dan Stromberg Linux Networking 4 12-20-2005 11:04 PM
e-mail errors William Broadband Hardware 1 08-15-2004 03:27 PM
Problems with mgetty/pppd and more than one modem draoi Linux Networking 0 04-02-2004 03:33 PM
Dialup via PPP/mgetty works, but can't get to anything beyond server Alex Linux Networking 9 08-21-2003 10:55 AM



1 2 3 4 5 6 7 8 9 10 11